diff options
Diffstat (limited to 'ACE/TAO/utils/logWalker/Session.h')
-rw-r--r-- | ACE/TAO/utils/logWalker/Session.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/ACE/TAO/utils/logWalker/Session.h b/ACE/TAO/utils/logWalker/Session.h new file mode 100644 index 00000000000..7bb8c05b04c --- /dev/null +++ b/ACE/TAO/utils/logWalker/Session.h @@ -0,0 +1,58 @@ +// -*- C++ -*- + +// $Id$ +// + +#ifndef LOG_WALKER_SESSION_H +#define LOG_WALKER_SESSION_H + +#include "ace/Hash_Map_Manager.h" +#include "ace/RB_Tree.h" +#include "ace/Functor.h" +#include "ace/SString.h" +#include "ace/Synch.h" + +class Log; +class HostProcess; + +typedef ACE_RB_Tree<long, HostProcess *, ACE_Less_Than<long>, ACE_Null_Mutex> Processes; +typedef ACE_RB_Tree<ACE_CString, HostProcess *, ACE_Less_Than<ACE_CString>, ACE_Null_Mutex> Procs_By_Name; +typedef ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_Null_Mutex> AltAddresses; + +class Session +{ +public: + Session (); + + ~Session (void); + + void add_process (HostProcess *proc); + HostProcess *find_process (long pid); + HostProcess *find_host (ACE_CString &endpoint, bool server); + void reconcile (void); + + static void set_tao_version (ACE_TCHAR *str); + static long tao_version (void); + void alternate_address (const char *string); + void default_service (const char *string); + + void make_dir (const char * ); + void outfile (const char * ); + + bool has_dir (void); + bool has_outfile (void); + + void dump (); + +private: + ostream * stream_for ( ostream *, HostProcess * = 0, const char * = 0); + + Processes processes_; + Procs_By_Name procs_by_name_; + AltAddresses alt_addrs_; + ACE_CString base_dir_; + ACE_CString outfile_; + static long tao_version_; +}; + +#endif // LOG_WALKER_SESSION_H |