GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ORB::ORBReplicator Class Referenceabstract

#include <ORB.H>

Inheritance diagram for ORB::ORBReplicator:
Inheritance graph
[legend]
Collaboration diagram for ORB::ORBReplicator:
Collaboration graph
[legend]

Public Member Functions

 ORBReplicator (int argc, char *argv[], string transportNameIn, string ipAddress)
 
 ORBReplicator (int argc, char *argv[], string transportNameIn, string ipAddress, int basePortDifferent)
 
 ORBReplicator (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties)
 
 ORBReplicator (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties, int basePortDifferent)
 
virtual Ice::ObjectPtr create (const std::string &)=0
 
void addClass (Ice::ObjectPtr objectToORB, const string &name)
 
void shutdown (void)
 
template<typename PRXTYPE >
PRXTYPE getObjectProxy (const string &nameIn)
 
template<typename CLASSTYPE >
CLASSTYPE * getObjectPointer (const string &nameIn)
 
- Public Member Functions inherited from ORB::ORBOriginator
 ORBOriginator (int argc, char *argv[], string transportNameIn)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, int basePortDifferent)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, const vector< pair< string, string > > extraProperties)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, const vector< pair< string, string > > extraProperties, int basePortDifferent)
 
virtual ~ORBOriginator (void)
 Destructor. More...
 
void shutdown (const Ice::Current &cur)
 
void addClass (Ice::ObjectPtr objectToORB, const string &name)
 
void waitForShutdown (void)
 
- Public Member Functions inherited from ORB::ORBBase
 ORBBase (void)
 Constructor using ORB_DEFAULT_BASEPORT as the starting base network port. More...
 
 ORBBase (int basePortDifferent)
 
int getPortOffset (void)
 
void removePortOffset (int whichOffset)
 
int getTCPUDPPort (int portOffset)
 
int getSSLPort (int portOffset)
 
int getBasePort (void)
 
string generateEndPoint (const string &transportName, std::string &ipAddress, int &portOffset)
 
string generateEndPoint (string &transportName, string ipAddress, int portOffset)
 

Private Member Functions

void destroy ()
 
void initialise (void)
 

Private Attributes

ORB::ORBICEPrx oRBOriginatorPrx
 The proxy of the ORBOriginator on the other side of the network. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ORB::ORBOriginator
 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress, int basePortDifferent)
 
 ORBOriginator (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties, int basePortDifferent)
 
void initialise (int argc, char *argv[], string transportNameIn, string ipAddress, const vector< pair< string, string > > extraProperties)
 
void initialiseAdapter (void)
 
void getObjectPointer (const string &name, Ice::ObjectPtr &objectPointer, const Ice::Current &cur)
 
- Protected Attributes inherited from ORB::ORBOriginator
int portOffset
 The port offset of this application layer. More...
 
string hostAddress
 The hostname or IP address of the node to connect to, empty for the originator and set for the replicator. More...
 
string transportName
 Zeroc ICE application layer name. More...
 
Ice::CommunicatorPtr communicator
 Resident communicator. More...
 
Ice::ObjectAdapterPtr adapterPtr
 Resident adapter. More...
 

Detailed Description

Sets up a replicator which connects to an originator.

The local proxy objects will operate the originator's object's methods, get the proxy using the ORBReplicator::getObjectProxy method.

The local pointer objects will access the originator's object's variables, get the pointer using the ORBReplicator::getObjectPointer method.

Each ORBReplicator class must implement the purely virtual method ORBReplicator::create to instruct the class factory which classes to generate and how.

Definition at line 397 of file ORB.H.

Constructor & Destructor Documentation

ORB::ORBReplicator::ORBReplicator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress 
)
inline
Generates a new ZeroC ICE application layer replicator

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting

Definition at line 425 of file ORB.H.

ORB::ORBReplicator::ORBReplicator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
int  basePortDifferent 
)
inline
Generates a new ZeroC ICE application layer replicator

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 438 of file ORB.H.

ORB::ORBReplicator::ORBReplicator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties 
)
inline
Generates a new ZeroC ICE application layer replicator

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting
extraPropertiesExtra communicator properties to initialise the communicator with

Definition at line 451 of file ORB.H.

ORB::ORBReplicator::ORBReplicator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties,
int  basePortDifferent 
)
inline
Generates a new ZeroC ICE application layer replicator

The endpoints of the application layer are derived by ORBBase. The ice configuration transportName.Control and transportName.Endpoints are auto-generated

Parameters
argcThe command line argument count
agrvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
ipAddressthe host to connect to whos endpoints should be open and ready for connecting
extraPropertiesExtra communicator properties to initialise the communicator with
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 465 of file ORB.H.

Member Function Documentation

void ORB::ORBReplicator::addClass ( Ice::ObjectPtr  objectToORB,
const string &  name 
)
inline
      Register a class with the object factory.

When required ORBOriginator::create will make the required class.

Parameters
Theunique id which identifies the class to create
Template Parameters
ICEIDTYPEThe class to get the static id fromOverload this method so that it doesn't get called by mistake in a replicator

Definition at line 486 of file ORB.H.

virtual Ice::ObjectPtr ORB::ORBReplicator::create ( const std::string &  )
pure virtual

Each of your overloaded classes must implement the ORBOriginator::create method This is the method which is called to create your desired class when required

void ORB::ORBReplicator::destroy ( )
inlineprivate

Method required by Ice::ObjectFactory

Definition at line 402 of file ORB.H.

template<typename CLASSTYPE >
CLASSTYPE* ORB::ORBReplicator::getObjectPointer ( const string &  nameIn)
inline
Get a calss from the ORB layer (this will give you access to the variables as they are on the originator

however the methods run on the replicator) It is like creating the class locally but setting its state to be identical to that of the same clas on the originator at the point in time the method is executed. The proxy must be set using the ORBOriginator::addClass method first. This method returns a pointer to CLASSTYPE which is not memory managed. Ensure you call CLASSTYPE *c; c->__setNoDelete(false); to re-enable memory management

Parameters
nameInThe name of the class we are looking for on the ORB network
Returns
desired pointer or NULL on failure
Template Parameters
CLASSTYPEThe class which we want to get from the ORB network - must match the nameIn used in the ORBOriginator::addClass AND the iceIdIn

Definition at line 518 of file ORB.H.

template<typename PRXTYPE >
PRXTYPE ORB::ORBReplicator::getObjectProxy ( const string &  nameIn)
inline
Get a proxy from the ORB layer (this will give you access to the methods on the originator)

The proxy must be set using the ORBOriginator::addClass method first.

Parameters
nameInThe name of the class we are looking for on the ORB network
Returns
desired proxy or NULL on failure
Template Parameters
PRXTYPEThe class which we want to get from the ORB network

Definition at line 503 of file ORB.H.

void ORB::ORBReplicator::initialise ( void  )
inlineprivate
Gets the ORBOriginator proxy and sets the oRBOriginatorPrx variable.

Upon failure, an assertion is generated (this may need to be replaced in future).

Definition at line 408 of file ORB.H.

void ORB::ORBReplicator::shutdown ( void  )
inline

Tell the SerlialiseOriginator to shutdown

Definition at line 492 of file ORB.H.

Member Data Documentation

ORB::ORBICEPrx ORB::ORBReplicator::oRBOriginatorPrx
private

The proxy of the ORBOriginator on the other side of the network.

Definition at line 398 of file ORB.H.


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