The standard implementation of the Event_Persistence_Strategy interface. More...
#include <Standard_Event_Persistence.h>


Public Member Functions | |
| Standard_Event_Persistence () | |
| Constructor. | |
| virtual | ~Standard_Event_Persistence () |
| Destructor. | |
| virtual int | init (int argc, ACE_TCHAR *argv[]) |
| virtual int | fini () |
| virtual Event_Persistence_Factory * | get_factory () |
Private Member Functions | |
| virtual void | reset () |
Private Attributes | |
| ACE_TString | filename_ |
| ACE_UINT32 | block_size_ |
| Standard_Event_Persistence_Factory * | factory_ |
The standard implementation of the Event_Persistence_Strategy interface.
Definition at line 101 of file Standard_Event_Persistence.h.
| TAO_Notify::Standard_Event_Persistence::Standard_Event_Persistence | ( | ) |
Constructor.
Definition at line 15 of file Standard_Event_Persistence.cpp.
: filename_ (ACE_TEXT ("__PERSISTENT_EVENT__.DB")) , block_size_ (512) , factory_ (0) { }
| TAO_Notify::Standard_Event_Persistence::~Standard_Event_Persistence | ( | ) | [virtual] |
| int TAO_Notify::Standard_Event_Persistence::fini | ( | void | ) | [virtual] |
Reimplemented from ACE_Shared_Object.
Definition at line 108 of file Standard_Event_Persistence.cpp.
| Event_Persistence_Factory * TAO_Notify::Standard_Event_Persistence::get_factory | ( | ) | [virtual] |
Implements TAO_Notify::Event_Persistence_Strategy.
Definition at line 28 of file Standard_Event_Persistence.cpp.
| int TAO_Notify::Standard_Event_Persistence::init | ( | int | argc, | |
| ACE_TCHAR * | argv[] | |||
| ) | [virtual] |
Reimplemented from ACE_Shared_Object.
Definition at line 57 of file Standard_Event_Persistence.cpp.
{
int result = 0;
bool verbose = false;
for (int narg = 0; narg < argc; ++narg)
{
ACE_TCHAR * av = argv[narg];
if (ACE_OS::strcasecmp (av, ACE_TEXT ("-v")) == 0)
{
verbose = true;
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) Standard_Event_Persistence: -verbose\n")
));
}
else if (ACE_OS::strcasecmp (av, ACE_TEXT ("-file_path")) == 0 && narg + 1 < argc)
{
this->filename_ = argv[narg + 1];
if (TAO_debug_level > 0 || verbose)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) Standard_Event_Persistence: Setting -file_path: %s\n"),
this->filename_.c_str ()
));
}
narg += 1;
}
else if (ACE_OS::strcasecmp (av, ACE_TEXT ("-block_size")) == 0 && narg + 1 < argc)
{
this->block_size_ = ACE_OS::atoi(argv[narg + 1]);
if (TAO_debug_level > 0 || verbose)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) Standard_Event_Persistence: Setting -block_size: %d\n"),
this->block_size_
));
}
narg += 1;
}
else
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) Unknown parameter to Standard Event Persistence: %s\n"),
argv[narg]
));
result = -1;
}
}
return result;
}
| void TAO_Notify::Standard_Event_Persistence::reset | ( | void | ) | [private, virtual] |
Implements TAO_Notify::Event_Persistence_Strategy.
Definition at line 50 of file Standard_Event_Persistence.cpp.
ACE_UINT32 TAO_Notify::Standard_Event_Persistence::block_size_ [private] |
Definition at line 124 of file Standard_Event_Persistence.h.
Definition at line 125 of file Standard_Event_Persistence.h.
Definition at line 123 of file Standard_Event_Persistence.h.
1.7.0