Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
igtl::SessionManager Class Reference

#include <igtlSessionManager.h>

Inheritance diagram for igtl::SessionManager:
Inheritance graph
[legend]
Collaboration diagram for igtl::SessionManager:
Collaboration graph
[legend]

Public Types

enum  {
  MODE_SERVER,
  MODE_CLIENT
}
 
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef SessionManager Self
 
typedef Object Superclass
 

Public Member Functions

int AddMessageHandler (MessageHandler *)
 
int Connect ()
 
virtual LightObject::Pointer CreateAnother () const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
virtual void Delete ()
 
int Disconnect ()
 
bool GetDebug () const
 
const char * GetHostname ()
 
int GetMode ()
 
virtual const char * GetNameOfClass () const
 
int GetPort ()
 
virtual int GetReferenceCount () const
 
 igtlTypeMacro (SessionManager, Object) igtlNewMacro(SessionManager)
 
 igtlTypeMacro (Object, LightObject)
 
void Print (std::ostream &os) const
 
int ProcessMessage ()
 
int PushMessage (MessageBase *)
 
virtual void Register () const
 
int RemoveMessageHandler (MessageHandler *)
 
void SetDebug (bool debugFlag) const
 
void SetHostname (const char *str)
 
void SetMode (int m)
 
void SetPort (int p)
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const
 

Static Public Member Functions

static void BreakOnError ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 

Protected Member Functions

virtual void PrintSelf (std::ostream &os) const
 
 SessionManager ()
 
 ~SessionManager ()
 
virtual void PrintHeader (std::ostream &os) const
 
virtual void PrintTrailer (std::ostream &os) const
 

Protected Attributes

bool m_ConfigurationUpdated
 
MessageHandlerm_CurrentMessageHandler
 
int m_CurrentReadIndex
 
igtl::MessageHeader::Pointer m_Header
 
int m_HeaderDeserialized
 
std::string m_Hostname
 
std::vector< MessageHandler *> m_MessageHandlerList
 
int m_Mode
 
int m_Port
 
volatile int m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 
Socket::Pointer m_Socket
 
igtl::TimeStamp::Pointer m_TimeStamp
 

Detailed Description

Definition at line 28 of file igtlSessionManager.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 35 of file igtlSessionManager.h.

◆ Pointer

Definition at line 34 of file igtlSessionManager.h.

◆ Self

Definition at line 32 of file igtlSessionManager.h.

◆ Superclass

Definition at line 33 of file igtlSessionManager.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MODE_SERVER 
MODE_CLIENT 

Definition at line 41 of file igtlSessionManager.h.

Constructor & Destructor Documentation

◆ SessionManager()

igtl::SessionManager::SessionManager ( )
protected

◆ ~SessionManager()

igtl::SessionManager::~SessionManager ( )
protected

Member Function Documentation

◆ AddMessageHandler()

int igtl::SessionManager::AddMessageHandler ( MessageHandler )

◆ BreakOnError()

static void igtl::LightObject::BreakOnError ( )
staticinherited

This method is called when igtlExceptionMacro executes. It allows the debugger to break on error.

◆ Connect()

int igtl::SessionManager::Connect ( )

◆ CreateAnother()

virtual LightObject::Pointer igtl::Object::CreateAnother ( ) const
virtualinherited

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from igtl::LightObject.

◆ DebugOff()

virtual void igtl::Object::DebugOff ( ) const
virtualinherited

Turn debugging output off.

◆ DebugOn()

virtual void igtl::Object::DebugOn ( ) const
virtualinherited

Turn debugging output on.

◆ Delete()

virtual void igtl::LightObject::Delete ( )
virtualinherited

Delete an igtl object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.

◆ Disconnect()

int igtl::SessionManager::Disconnect ( )

◆ GetDebug()

bool igtl::Object::GetDebug ( ) const
inherited

Get the value of the debug flag.

◆ GetGlobalWarningDisplay()

static bool igtl::Object::GetGlobalWarningDisplay ( )
staticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

◆ GetHostname()

const char* igtl::SessionManager::GetHostname ( )
inline

Definition at line 47 of file igtlSessionManager.h.

◆ GetMode()

int igtl::SessionManager::GetMode ( )
inline

Definition at line 54 of file igtlSessionManager.h.

◆ GetNameOfClass()

virtual const char* igtl::LightObject::GetNameOfClass ( ) const
inlinevirtualinherited

Return the name of this class as a string. Used by the object factory (implemented in New()) to instantiate objects of a named type. Also used for debugging and other output information.

Definition at line 84 of file igtlLightObject.h.

◆ GetPort()

int igtl::SessionManager::GetPort ( )
inline

Definition at line 49 of file igtlSessionManager.h.

◆ GetReferenceCount()

virtual int igtl::LightObject::GetReferenceCount ( ) const
inlinevirtualinherited

Gets the reference count on this object.

Definition at line 110 of file igtlLightObject.h.

◆ GlobalWarningDisplayOff()

static void igtl::Object::GlobalWarningDisplayOff ( )
inlinestaticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

Definition at line 116 of file igtlObject.h.

References igtl::Object::SetGlobalWarningDisplay().

◆ GlobalWarningDisplayOn()

static void igtl::Object::GlobalWarningDisplayOn ( )
inlinestaticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

Definition at line 114 of file igtlObject.h.

References igtl::Object::SetGlobalWarningDisplay().

◆ igtlTypeMacro() [1/2]

igtl::SessionManager::igtlTypeMacro ( SessionManager  ,
Object   
)

◆ igtlTypeMacro() [2/2]

igtl::Object::igtlTypeMacro ( Object  ,
LightObject   
)
inherited

Standard part of all igtl objects.

◆ New()

static Pointer igtl::Object::New ( )
staticinherited

Method for creation through the object factory.

◆ Print()

void igtl::LightObject::Print ( std::ostream &  os) const
inherited

Cause the object to print itself out.

◆ PrintHeader()

virtual void igtl::LightObject::PrintHeader ( std::ostream &  os) const
protectedvirtualinherited

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

◆ PrintSelf()

virtual void igtl::Object::PrintSelf ( std::ostream &  os) const
protectedvirtualinherited

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from igtl::LightObject.

Reimplemented in igtl::MultiThreader, igtl::MutexLock, igtl::ObjectFactoryBase, igtl::Socket, igtl::FastMutexLock, igtl::TimeStamp, igtl::ServerSocket, and igtl::ClientSocket.

◆ PrintTrailer()

virtual void igtl::LightObject::PrintTrailer ( std::ostream &  os) const
protectedvirtualinherited

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

◆ ProcessMessage()

int igtl::SessionManager::ProcessMessage ( )

◆ PushMessage()

int igtl::SessionManager::PushMessage ( MessageBase )

◆ Register()

virtual void igtl::Object::Register ( ) const
virtualinherited

Return this objects modified time. Update the modification time for this object. Many filters rely on the modification time to determine if they need to recompute their data. Increase the reference count (mark as used by another object).

Reimplemented from igtl::LightObject.

◆ RemoveMessageHandler()

int igtl::SessionManager::RemoveMessageHandler ( MessageHandler )

◆ SetDebug()

void igtl::Object::SetDebug ( bool  debugFlag) const
inherited

Set the value of the debug flag. A non-zero value turns debugging on.

◆ SetGlobalWarningDisplay()

static void igtl::Object::SetGlobalWarningDisplay ( bool  flag)
staticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

Referenced by igtl::Object::GlobalWarningDisplayOff(), and igtl::Object::GlobalWarningDisplayOn().

◆ SetHostname()

void igtl::SessionManager::SetHostname ( const char *  str)
inline

Definition at line 46 of file igtlSessionManager.h.

◆ SetMode()

void igtl::SessionManager::SetMode ( int  m)
inline

Definition at line 53 of file igtlSessionManager.h.

◆ SetPort()

void igtl::SessionManager::SetPort ( int  p)
inline

Definition at line 48 of file igtlSessionManager.h.

◆ SetReferenceCount()

virtual void igtl::Object::SetReferenceCount ( int  )
virtualinherited

Sets the reference count (use with care)

Reimplemented from igtl::LightObject.

◆ UnRegister()

virtual void igtl::Object::UnRegister ( ) const
virtualinherited

Decrease the reference count (release by another object).

Reimplemented from igtl::LightObject.

Member Data Documentation

◆ m_ConfigurationUpdated

bool igtl::SessionManager::m_ConfigurationUpdated
protected

Definition at line 73 of file igtlSessionManager.h.

◆ m_CurrentMessageHandler

MessageHandler* igtl::SessionManager::m_CurrentMessageHandler
protected

Definition at line 85 of file igtlSessionManager.h.

◆ m_CurrentReadIndex

int igtl::SessionManager::m_CurrentReadIndex
protected

Definition at line 82 of file igtlSessionManager.h.

◆ m_Header

igtl::MessageHeader::Pointer igtl::SessionManager::m_Header
protected

Definition at line 90 of file igtlSessionManager.h.

◆ m_HeaderDeserialized

int igtl::SessionManager::m_HeaderDeserialized
protected

Definition at line 83 of file igtlSessionManager.h.

◆ m_Hostname

std::string igtl::SessionManager::m_Hostname
protected

Definition at line 74 of file igtlSessionManager.h.

◆ m_MessageHandlerList

std::vector< MessageHandler* > igtl::SessionManager::m_MessageHandlerList
protected

Definition at line 87 of file igtlSessionManager.h.

◆ m_Mode

int igtl::SessionManager::m_Mode
protected

Definition at line 76 of file igtlSessionManager.h.

◆ m_Port

int igtl::SessionManager::m_Port
protected

Definition at line 75 of file igtlSessionManager.h.

◆ m_ReferenceCount

volatile int igtl::LightObject::m_ReferenceCount
mutableprotectedinherited

Number of uses of this object by other objects.

Definition at line 131 of file igtlLightObject.h.

◆ m_ReferenceCountLock

SimpleFastMutexLock igtl::LightObject::m_ReferenceCountLock
mutableprotectedinherited

Mutex lock to protect modification to the reference count

Definition at line 134 of file igtlLightObject.h.

◆ m_Socket

Socket::Pointer igtl::SessionManager::m_Socket
protected

Definition at line 88 of file igtlSessionManager.h.

◆ m_TimeStamp

igtl::TimeStamp::Pointer igtl::SessionManager::m_TimeStamp
protected

Definition at line 91 of file igtlSessionManager.h.


The documentation for this class was generated from the following file:

Generated at Sat Apr 15 2017 02:30:07 for OpenIGTLink by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2012