#include <Standard_Event_Persistence.h>
Inheritance diagram for TAO_Notify::Standard_Event_Persistence:
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_ |
Definition at line 101 of file Standard_Event_Persistence.h.
|
Constructor.
Definition at line 14 of file Standard_Event_Persistence.cpp. References ACE_TEXT().
00015 : filename_ (ACE_TEXT ("__PERSISTENT_EVENT__.DB")) 00016 , block_size_ (512) 00017 , factory_ (0) 00018 { 00019 } |
|
Destructor.
Definition at line 21 of file Standard_Event_Persistence.cpp.
00022 { 00023 } |
|
Reimplemented from ACE_Shared_Object. Definition at line 107 of file Standard_Event_Persistence.cpp.
|
|
Implements TAO_Notify::Event_Persistence_Strategy. Definition at line 27 of file Standard_Event_Persistence.cpp. References ACE_NEW_NORETURN, and TAO_Notify::Standard_Event_Persistence_Factory::open().
00028 { 00029 //@@todo guard? ; doublecheck? 00030 if (this->factory_ == 0) 00031 { 00032 ACE_NEW_NORETURN ( 00033 this->factory_, 00034 Standard_Event_Persistence_Factory () 00035 ); 00036 if (this->factory_ != 0) 00037 { 00038 if (!this->factory_->open (this->filename_.c_str ())) 00039 { 00040 this->factory_ = 0; 00041 } 00042 } 00043 } 00044 return this->factory_; 00045 } |
|
Reimplemented from ACE_Shared_Object. Definition at line 56 of file Standard_Event_Persistence.cpp. References ACE_DEBUG, ACE_ERROR, ACE_TCHAR, ACE_TEXT(), ACE_OS::atoi(), LM_DEBUG, LM_ERROR, ACE_OS::strcasecmp(), and TAO_debug_level.
00057 { 00058 int result = 0; 00059 bool verbose = false; 00060 for (int narg = 0; narg < argc; ++narg) 00061 { 00062 ACE_TCHAR * av = argv[narg]; 00063 if (ACE_OS::strcasecmp (av, ACE_TEXT ("-v")) == 0) 00064 { 00065 verbose = true; 00066 ACE_DEBUG ((LM_DEBUG, 00067 ACE_TEXT ("(%P|%t) Standard_Event_Persistence: -verbose\n") 00068 )); 00069 } 00070 else if (ACE_OS::strcasecmp (av, ACE_TEXT ("-file_path")) == 0 && narg + 1 < argc) 00071 { 00072 this->filename_ = argv[narg + 1]; 00073 if (TAO_debug_level > 0 || verbose) 00074 { 00075 ACE_DEBUG ((LM_DEBUG, 00076 ACE_TEXT ("(%P|%t) Standard_Event_Persistence: Setting -file_path: %s\n"), 00077 this->filename_.c_str () 00078 )); 00079 } 00080 narg += 1; 00081 } 00082 else if (ACE_OS::strcasecmp (av, ACE_TEXT ("-block_size")) == 0 && narg + 1 < argc) 00083 { 00084 this->block_size_ = ACE_OS::atoi(argv[narg + 1]); 00085 if (TAO_debug_level > 0 || verbose) 00086 { 00087 ACE_DEBUG ((LM_DEBUG, 00088 ACE_TEXT ("(%P|%t) Standard_Event_Persistence: Setting -block_size: %d\n"), 00089 this->block_size_ 00090 )); 00091 } 00092 narg += 1; 00093 } 00094 else 00095 { 00096 ACE_ERROR ((LM_ERROR, 00097 ACE_TEXT ("(%P|%t) Unknown parameter to Standard Event Persistence: %s\n"), 00098 argv[narg] 00099 )); 00100 result = -1; 00101 } 00102 } 00103 return result; 00104 } |
|
Implements TAO_Notify::Event_Persistence_Strategy. Definition at line 49 of file Standard_Event_Persistence.cpp.
|
|
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. |