gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
ORB::ORBOriginator Class Reference

#include <ORB.H>

Inheritance diagram for ORB::ORBOriginator:
[legend]
Collaboration diagram for ORB::ORBOriginator:
[legend]

Public Member Functions

 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)
 
bool isShutdown ()
 
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)
 

Protected Member Functions

 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

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 an originator which others can connect to as replicators. The general idea is that any local classes can be added to the ORB network application layer using the ORBOriginator::addClass method. Once these classes have been added to the ORB network, the ORBReplicator class can be used to access them on the other end of the network. Maintains required resident classes (such as the communicator and adapter)

NOTE: Before using this class, you will require an install of the ZeroC ICE system (see http://www.zeroc.com/download.html for binary installers) On Debian derived systems : sudo apt-get install zeroc-ice34 libzeroc-ice34-dev ice34-translators

NOTE: If your version of slice2cpp generates errors when executing slice2cpp on the ORBICE.ice file, then you will need to upgrade to version 3.5 of the Zeroc ICE software.

To use this class and the ice files, look at the Makefile for how to generate C++ code from the network protocol .ice files and then how to compile them.

Examples:
ORBTest.C.

Definition at line 222 of file ORB.H.

Constructor & Destructor Documentation

◆ ORBOriginator() [1/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress 
)
inlineprotected

Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator).

Parameters
argcThe command line argument count
argvThe 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 (used by ORBReplicator)

Definition at line 237 of file ORB.H.

◆ ORBOriginator() [2/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties 
)
inlineprotected

Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator).

Parameters
argcThe command line argument count
argvThe 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 (used by ORBReplicator)
extraPropertiesExtra communicator properties to initialise the communicator with

Definition at line 248 of file ORB.H.

◆ ORBOriginator() [3/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
int  basePortDifferent 
)
inlineprotected

Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator).

Parameters
argcThe command line argument count
argvThe 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 (used by ORBReplicator)
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 259 of file ORB.H.

◆ ORBOriginator() [4/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties,
int  basePortDifferent 
)
inlineprotected

Generates a new ZeroC ICE application layer to connect to the originator (used by the ORBReplicator).

Parameters
argcThe command line argument count
argvThe 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 (used by ORBReplicator)
extraPropertiesExtra communicator properties to initialise the communicator with
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 271 of file ORB.H.

◆ ORBOriginator() [5/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn 
)
inline

Generates a new application layer originator for class Object Broking. 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
argvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints

Definition at line 327 of file ORB.H.

◆ ORBOriginator() [6/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
int  basePortDifferent 
)
inline

Generates a new application layer originator for Object Broking. 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
argvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 340 of file ORB.H.

◆ ORBOriginator() [7/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
const vector< pair< string, string > >  extraProperties 
)
inline

Generates a new application layer originator for class Object Broking. 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
argvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
extraPropertiesExtra communicator properties to initialise the communicator with

Definition at line 353 of file ORB.H.

◆ ORBOriginator() [8/8]

ORB::ORBOriginator::ORBOriginator ( int  argc,
char *  argv[],
string  transportNameIn,
const vector< pair< string, string > >  extraProperties,
int  basePortDifferent 
)
inline

Generates a new application layer originator for Object Broking. 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
argvThe command line arguments
transportNameInThe name of this application layer, which enables ICE to lookup using the appropriate endpoints
extraPropertiesExtra communicator properties to initialise the communicator with
basePortDifferentSpecify a different base port to the default normally used by ORBBase

Definition at line 367 of file ORB.H.

◆ ~ORBOriginator()

virtual ORB::ORBOriginator::~ORBOriginator ( void  )
inlinevirtual

Destructor.

Definition at line 373 of file ORB.H.

Member Function Documentation

◆ addClass()

void ORB::ORBOriginator::addClass ( Ice::ObjectPtr  objectToORB,
const string &  name 
)
inline

Make the network aware that a new class is available to the ORB application layer.

Parameters
objectToORBThe calss which will be added to the ORB application layer
nameThe name to give to the network. This name must be unique
Examples:
ORBTest.C.

Definition at line 399 of file ORB.H.

◆ getObjectPointer()

void ORB::ORBOriginator::getObjectPointer ( const string &  name,
Ice::ObjectPtr &  objectPointer,
const Ice::Current &  cur 
)
inlineprotected

This method implements the netowrk protocol ORB::ORBICE::getObjectPointer. The protocol for this method is specified in the ORBICE.ice network protocol specification file.

Definition at line 312 of file ORB.H.

◆ initialise()

void ORB::ORBOriginator::initialise ( int  argc,
char *  argv[],
string  transportNameIn,
string  ipAddress,
const vector< pair< string, string > >  extraProperties 
)
inlineprotected

Generates a new ZeroC ICE application layer originator. 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
argvThe 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 (used by ORBReplicator)
extraPropertiesExtra communicator properties to initialise the communicator with

Definition at line 284 of file ORB.H.

◆ initialiseAdapter()

void ORB::ORBOriginator::initialiseAdapter ( void  )
inlineprotected

Creates an adapter, as required by the ORBOriginator but not the ORBReplicator.

Definition at line 302 of file ORB.H.

◆ isShutdown()

bool ORB::ORBOriginator::isShutdown ( )
inline

Find out the state of the ORB origin.

Returns
true if shutdown has been called, returns true if the communicator is not allocated.

Definition at line 389 of file ORB.H.

◆ shutdown()

void ORB::ORBOriginator::shutdown ( const Ice::Current &  cur)
inline

An ICE network call to shutdown the communicator.

Parameters
curThe current ICE object

Definition at line 382 of file ORB.H.

◆ waitForShutdown()

void ORB::ORBOriginator::waitForShutdown ( void  )
inline

Run the ICE thread

Examples:
ORBTest.C.

Definition at line 409 of file ORB.H.

Member Data Documentation

◆ adapterPtr

Ice::ObjectAdapterPtr ORB::ORBOriginator::adapterPtr
protected

Resident adapter.

Definition at line 229 of file ORB.H.

◆ communicator

Ice::CommunicatorPtr ORB::ORBOriginator::communicator
protected

Resident communicator.

Definition at line 228 of file ORB.H.

◆ hostAddress

string ORB::ORBOriginator::hostAddress
protected

The hostname or IP address of the node to connect to, empty for the originator and set for the replicator.

Definition at line 225 of file ORB.H.

◆ portOffset

int ORB::ORBOriginator::portOffset
protected

The port offset of this application layer.

Definition at line 224 of file ORB.H.

◆ transportName

string ORB::ORBOriginator::transportName
protected

Zeroc ICE application layer name.

Definition at line 227 of file ORB.H.


The documentation for this class was generated from the following file:
gtkIOStream: ORB::ORBOriginator Class Reference
GTK+ IOStream  Beta