IPCPartition Class Reference

This class provides a set of functions for accessing objects registered with a certain partition. More...

#include <partition.h>

List of all members.

Public Member Functions

 IPCPartition () throw ()
 IPCPartition (const char *name) throw ()
 IPCPartition (const std::string &name) throw ()
 IPCPartition (const IPCPartition &p) throw ()
IPCPartitionoperator= (const IPCPartition &p) throw ()
const std::string & name () const throw ()
bool isValid () const throw ()
void getTypes (std::list< std::string > &list) const throw (daq::ipc::InvalidPartition)
ipc::partition_var getImplementation () const throw (daq::ipc::InvalidPartition)
template<class T>
void getObjects (std::map< std::string, typename T::_var_type > &map) const throw ( daq::ipc::InvalidPartition )
template<class T>
bool isObjectValid (const std::string &object_name) const throw ( daq::ipc::InvalidPartition )
template<class T>
T::_ptr_type lookup (const std::string &object_name) const throw ( daq::ipc::InvalidPartition, daq::ipc::ObjectNotFound, daq::ipc::InvalidObjectName )
template<class T, template< class, template< class > class > class RP, template< class > class VP>
void getObjects (std::map< std::string, typename T::_var_type > &map, const std::string &type_name=ipc::util::getTypeName< T >()) const throw ( daq::ipc::InvalidPartition )
template<class T, template< class, template< class > class > class RP, template< class > class VP>
bool isObjectValid (const std::string &object_name, const std::string &type_name=ipc::util::getTypeName< T >()) const throw ( daq::ipc::InvalidPartition, daq::ipc::InvalidObjectName )
template<class T, template< class, template< class > class > class RP, template< class > class VP>
T::_ptr_type lookup (const std::string &object_name, const std::string &type_name=ipc::util::getTypeName< T >()) const throw ( daq::ipc::InvalidPartition, daq::ipc::ObjectNotFound, daq::ipc::InvalidObjectName )

Static Public Member Functions

static void getPartitions (std::list< IPCPartition > &list) throw ()
template<template< class, template< class > class > class RP>
static void getPartitions (std::list< IPCPartition > &list, short=0) throw ()

Friends

class IPCNamedObjectOperations
class Partition_impl


Detailed Description

This class provides a set of functions for accessing objects registered with a certain partition.

See also:


Constructor & Destructor Documentation

IPCPartition::IPCPartition (  )  throw () [inline]

Creates the object which represents the default partition

IPCPartition::IPCPartition ( const char *  name  )  throw () [inline]

Creates the object which represents the named partition.

Parameters:
name partition's name

IPCPartition::IPCPartition ( const std::string &  name  )  throw () [inline]

Creates the object which represents the named partition.

Parameters:
name partition's name

IPCPartition::IPCPartition ( const IPCPartition p  )  throw () [inline]

Copy constructor.


Member Function Documentation

ipc::partition_var IPCPartition::getImplementation (  )  const throw (daq::ipc::InvalidPartition)

Returns reference to the partition implementation object.

Returns:
CORBA object which references the remote partition
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection

template<class T, template< class, template< class > class > class RP, template< class > class VP>
void IPCPartition::getObjects ( std::map< std::string, typename T::_var_type > &  map,
const std::string &  type_name = ipc::util::getTypeName<T>() 
) const throw ( daq::ipc::InvalidPartition ) [inline]

Enumerates remote objects of a certain type. Class T represents the type of the objects to be listed. Class RP defines the resolution policy. This policy defines how object resolution will be done. There are two implementations of this policy defined in the IPC library: ipc::use_cache and ipc::no_cache. Class VP defines the validation policy. This policy defines how to check the validity of the remote object reference. There are three implementations of this policy defined in the IPC library: ipc::unchecked_narrow, ipc::narrow and ipc::non_existent.

Parameters:
map standard library map to be filled with the objects references
type_name type name of the objects which have to be enumerated. This parameter has default value which is calculated from the objects type T (the first template parameter for this function). One can use another type name in case one wants to enumerate the obejcts whose corresponding C++ type is not known at compilation time.
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection

template<class T>
void IPCPartition::getObjects ( std::map< std::string, typename T::_var_type > &  map  )  const throw ( daq::ipc::InvalidPartition ) [inline]

Lists objects registered with the current partition. T represents the type of objects to be listed. In practice such type is generated by the IDL to C++ compiler for any IDL interface.

Parameters:
map This map will be filled with the available objects.
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection

template<template< class, template< class > class > class RP>
static void IPCPartition::getPartitions ( std::list< IPCPartition > &  list,
short  = 0 
) throw () [inline, static]

Lists all available partitions except the default one Class T represents the type of the object to be constucted. Class RP defines the resolution policy. This policy defines how object resolution will be done. There are two implementations of this policy defined in the IPC library: ipc::use_cache, ipc::no_cache.

Parameters:
list will be filled with partitions.
Exceptions:
Never throws exceptions

void IPCPartition::getPartitions ( std::list< IPCPartition > &  list  )  throw () [static]

Enumerates all available partitions except the default one

Parameters:
list will be filled with partitions.
Exceptions:
Never throws exceptions

void IPCPartition::getTypes ( std::list< std::string > &  list  )  const throw (daq::ipc::InvalidPartition)

Lists types of the objects registered with this partititon.

Parameters:
list will be filled with object type names.
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection

template<class T, template< class, template< class > class > class RP, template< class > class VP>
bool IPCPartition::isObjectValid ( const std::string &  object_name,
const std::string &  type_name = ipc::util::getTypeName<T>() 
) const throw ( daq::ipc::InvalidPartition, daq::ipc::InvalidObjectName ) [inline]

Checks existence of the remote object. Class T represents the type of the objects to be checked. Class RP defines the resolution policy. This policy defines how object resolution will be done. There are two implementations of this policy defined in the IPC library: ipc::use_cache and ipc::no_cache. Class VP defines the validation policy. This policy defines how to check the validity of the remote object reference. There are three implementations of this policy defined in the IPC library: ipc::unchecked_narrow, ipc::narrow and ipc::non_existent.

Parameters:
object_name Name of the object to be checked.
type_name type name of the object which has to be checked. This parameter has default value which is calculated from the objects type T (the first template parameter for this function). One can use another type name in case one wants to enumerate the obejcts whose corresponding C++ type is not known at compilation time.
Returns:
Returns true if object exists and reachible, false otherwise.
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection
daq::ipc::InvalidObjectName object's name is invalid.

template<class T>
bool IPCPartition::isObjectValid ( const std::string &  object_name  )  const throw ( daq::ipc::InvalidPartition ) [inline]

Checks existence of the remote object. Class T represents the type of the object to be chekced.

Parameters:
object_name Name of the object to be checked.
Returns:
Returns true if object exists and reachible, false otherwise.
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection

bool IPCPartition::isValid (  )  const throw ()

Checks validity of the current partition.

Returns:
Returns true if the object, which implements current partition exists and reachable, false otherwise.
Exceptions:
Never throws exceptions

template<class T, template< class, template< class > class > class RP, template< class > class VP>
T::_ptr_type IPCPartition::lookup ( const std::string &  object_name,
const std::string &  type_name = ipc::util::getTypeName<T>() 
) const throw ( daq::ipc::InvalidPartition, daq::ipc::ObjectNotFound, daq::ipc::InvalidObjectName ) [inline]

Returns a reference to the remote object. This function never returns CORBA::Object::nil() reference. Class T represents the type of the object to be resolved. Class RP defines the resolution policy. This policy defines how object resolution will be done. There are two implementations of this policy defined in the IPC library: ipc::use_cache and ipc::no_cache. Class VP defines the validation policy. This policy defines how to check the validity of the remote object reference. There are three implementations of this policy defined in the IPC library: ipc::unchecked_narrow, ipc::narrow and ipc::non_existent.

Parameters:
object_name Name of the object to resolve.
type_name type name of the object which has to be resolved. This parameter has default value which is calculated from the objects type T (the first template parameter for this function). One can use another type name in case one wants to enumerate the obejcts whose corresponding C++ type is not known at compilation time.
Returns:
object reference
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection
daq::ipc::InvalidObjectName object's name is invalid.
daq::ipc::ObjectNotFound target object does not exist or is not registered with the partition server.

template<class T>
T::_ptr_type IPCPartition::lookup ( const std::string &  object_name  )  const throw ( daq::ipc::InvalidPartition, daq::ipc::ObjectNotFound, daq::ipc::InvalidObjectName ) [inline]

Returns a reference to the remote object. This function never returns CORBA::Object::nil() reference. Class T represents the type of the object to be resolve.

Parameters:
object_name Name of the object to resolve.
Returns:
object reference
Exceptions:
daq::ipc::InvalidPartition partiton IPC server is unavailable, i.e. either it is not running or there are problems with network connection
daq::ipc::InvalidObjectName object's name is invalid.
daq::ipc::ObjectNotFound target object does not exist or is not registered with the partition server.

const std::string& IPCPartition::name (  )  const throw () [inline]

Retruns name of the current partition.

Returns:
partition name.
Exceptions:
Never throws exceptions

IPCPartition& IPCPartition::operator= ( const IPCPartition p  )  throw () [inline]

Copy operator.


The documentation for this class was generated from the following files:
Generated on Tue Aug 8 17:08:23 2006 for IPC User API by  doxygen 1.4.7