Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

baci::CDBPropertySet Class Reference

#include <baciCDBPropertySet.h>

Collaboration diagram for baci::CDBPropertySet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~CDBPropertySet (void)
void registerCharacteristicModel (const char *modelName, CharacteristicModelImpl *model)
void deregisterCharacteristicModel (const char *modelName)
const char * getRepositoryId ()
char * getObjectId ()
CosPropertyService::PropertySet * getPropertySet (const char *propertyName)
virtual void define_property (const char *property_name, const CORBA::Any &property_value)
virtual void define_properties (const CosPropertyService::Properties &nproperties)
virtual CORBA::ULong get_number_of_properties ()
virtual void get_all_property_names (CORBA::ULong how_many, CosPropertyService::PropertyNames_out property_names, CosPropertyService::PropertyNamesIterator_out rest)
virtual CORBA::Any * get_property_value (const char *property_name)
virtual CORBA::Boolean get_properties (const CosPropertyService::PropertyNames &property_names, CosPropertyService::Properties_out nproperties)
virtual void get_all_properties (CORBA::ULong how_many, CosPropertyService::Properties_out nproperties, CosPropertyService::PropertiesIterator_out rest)
virtual void delete_property (const char *property_name)
virtual void delete_properties (const CosPropertyService::PropertyNames &property_names)
virtual CORBA::Boolean delete_all_properties ()
virtual CORBA::Boolean is_property_defined (const char *property_name)

Static Public Member Functions

CDBPropertySetcreateInstance (CORBA::ORB_ptr orb, PortableServer::POAManager_ptr poa_manager, PortableServer::POA_ptr root_poa)
CDBPropertySetgetInstance ()

Protected Member Functions

 CDBPropertySet (CORBA::ORB_ptr orb, PortableServer::POAManager_ptr poa_manager, PortableServer::POA_ptr root_poa)

Private Types

typedef std::map< std::string,
CharacteristicModelImpl * > 
CharacteristicModelImplMap

Private Member Functions

void operator= (const CDBPropertySet &)
 CDBPropertySet (const CDBPropertySet &)

Private Attributes

PortableServer::POA_var poa_m
 POA using DEFAULT_SERVANT policy.
PortableServer::Current_var poaCurrent_m
 POA Current.
CharacteristicModelImplMap modelMap
 Map of characteristic models.

Static Private Attributes

CDBPropertySetinstance_mp
 Instance to this object.

Detailed Description

The PropertySet interface provides operations to define and modify properties, list and get properties, and delete properties.

This implementation of PropertySet retrieves data from CDB.
By using the USE_DEFAULT_SERVANT policy, a POA will use a single servant to implement all of its objects. This approach is useful when there is very little data associated with each object, so little that the data can be encoded in the Object Id.

NOTE: before using CDBPropertySet methods you must create singleton by calling CDBPropertySet::createInstance()

Author:
Matej Sekoranja, Jozef Stefan Institute, Slovenia


Member Typedef Documentation

typedef std::map<std::string, CharacteristicModelImpl*> baci::CDBPropertySet::CharacteristicModelImplMap [private]
 


Constructor & Destructor Documentation

baci::CDBPropertySet::CDBPropertySet CORBA::ORB_ptr  orb,
PortableServer::POAManager_ptr  poa_manager,
PortableServer::POA_ptr  root_poa
[protected]
 

Protected constructor which actually creates a singleton.

Parameters:
orb CORBA ORB reference
poa_manager POA Manager reference
root_poa root POA reference
Returns:
CDBPropertySet reference to the CDBPropertySet singleton
See also:
CDBPropertySet::createInstance

virtual baci::CDBPropertySet::~CDBPropertySet void   )  [virtual]
 

Destructor.

baci::CDBPropertySet::CDBPropertySet const CDBPropertySet  )  [private]
 

ALMA C++ coding standards state copy constructors should be disabled.


Member Function Documentation

CDBPropertySet* baci::CDBPropertySet::createInstance CORBA::ORB_ptr  orb,
PortableServer::POAManager_ptr  poa_manager,
PortableServer::POA_ptr  root_poa
[static]
 

This constructor creates a singleton, it has to be called BEFORE using any of CDBPropertySet methods and has to be called only once.

Parameters:
orb CORBA ORB reference
poa_manager POA Manager reference
root_poa root POA reference
Returns:
CDBPropertySet reference to the CDBPropertySet singleton

virtual void baci::CDBPropertySet::define_properties const CosPropertyService::Properties &  nproperties  )  [virtual]
 

Support for defining and modifying multiple properties at once. Will modify or add a property to the PropertySet. If the property already exists, then the property type is checked before the value is overwritten. If the property does not exist, then the property is added to the PropertySet.
NOTE: The implementation of CDBPropertySet acts only as accessor, therefore this method throws CosPropertyService::ReadOnlyProperty() exception.

Parameters:
nproperties list of properties (name-value pairs)
Exceptions:
CosPropertyService::MultipleExceptions 

virtual void baci::CDBPropertySet::define_property const char *  property_name,
const CORBA::Any &  property_value
[virtual]
 

Support for defining and modifying properties. Will modify or add a property to the PropertySet. If the property already exists, then the property type is checked before the value is overwritten. If the property does not exist, then the property is added to the PropertySet.
NOTE: The implementation of CDBPropertySet acts only as accessor, therefore this method throws CosPropertyService::ReadOnlyProperty() exception.

Parameters:
property_name name of the property
property_value value of the property
Exceptions:
CosPropertyService::InvalidPropertyName 
CosPropertyService::ConflictingProperty 
CosPropertyService::UnsupportedTypeCode 
CosPropertyService::UnsupportedProperty 
CosPropertyService::ReadOnlyProperty 

virtual CORBA::Boolean baci::CDBPropertySet::delete_all_properties  )  [virtual]
 

Validation of delete_properties. Applies to all properties. NOTE: The implementation of CDBPropertySet acts only as accessor, therefore this method always returns false.

Returns:
false

virtual void baci::CDBPropertySet::delete_properties const CosPropertyService::PropertyNames &  property_names  )  [virtual]
 

Support for Deleting Properties. Deletes the properties defined in the property_names parameter. This is a batch operation that returns the MultipleExceptions exception if any delete failed.
NOTE: The implementation of CDBPropertySet acts only as accessor, therefore this method throws list of CosPropertyService::FixedProperty() exceptions.

Parameters:
property_names sequence of propery names
Exceptions:
CosPropertyService::MultipleExceptions 

virtual void baci::CDBPropertySet::delete_property const char *  property_name  )  [virtual]
 

Support for Deleting Properties. Deletes the specified property if it exists from a PropertySet.
NOTE: The implementation of CDBPropertySet acts only as accessor, therefore this method throws CosPropertyService::FixedProperty() exception.

Parameters:
property_name name of the property
Exceptions:
CosPropertyService::PropertyNotFound 
CosPropertyService::InvalidPropertyName 
CosPropertyService::FixedProperty 

void baci::CDBPropertySet::deregisterCharacteristicModel const char *  modelName  ) 
 

Deregister characteristic model.

virtual void baci::CDBPropertySet::get_all_properties CORBA::ULong  how_many,
CosPropertyService::Properties_out  nproperties,
CosPropertyService::PropertiesIterator_out  rest
[virtual]
 

Returns all of the property names currently defined in the PropertySet. If the PropertySet contains more than how_many property names, then the remaining property names are put into the PropertyNamesIterator.

Parameters:
how_many upper bound of number of properties returned in <property_names> sequence
nproperties out sequence of Properties (name-valie pairs)
rest reference to iterator to the rest of Properties

virtual void baci::CDBPropertySet::get_all_property_names CORBA::ULong  how_many,
CosPropertyService::PropertyNames_out  property_names,
CosPropertyService::PropertyNamesIterator_out  rest
[virtual]
 

Returns all of the property names currently defined in the PropertySet. If the PropertySet contains more than how_many property names, then the remaining property names are put into the PropertyNamesIterator.

Parameters:
how_many upper bound of number of properties returned in <property_names> sequence
properties_names out sequence of property names
rest reference to iterator to the rest of property names

virtual CORBA::ULong baci::CDBPropertySet::get_number_of_properties  )  [virtual]
 

Support for Getting Properties and their Names. Returns the current number of properties associated with this PropertySet.

Returns:
number of properties

virtual CORBA::Boolean baci::CDBPropertySet::get_properties const CosPropertyService::PropertyNames &  property_names,
CosPropertyService::Properties_out  nproperties
[virtual]
 

Returns the values of the properties listed in property_names.

Parameters:
property_names sequence of property names

virtual CORBA::Any* baci::CDBPropertySet::get_property_value const char *  property_name  )  [virtual]
 

Returns the value of a property in the PropertySet.

Parameters:
property_name name of the property
Exceptions:
CosPropertyService::PropertyNotFound 
CosPropertyService::InvalidPropertyName 

CDBPropertySet* baci::CDBPropertySet::getInstance  )  [inline, static]
 

Accessor to CDBPropertySet singleton.

Returns:
CDBPropertySet reference to the CDBPropertySet singleton

char* baci::CDBPropertySet::getObjectId  ) 
 

Returns ObjectId of this servant.

Returns:
ObjectId of this servant

CosPropertyService::PropertySet* baci::CDBPropertySet::getPropertySet const char *  propertyName  ) 
 

Returns PropertySet reference (if neccessary also creates a reference to the CDBPropertySet default servant). This methos creates objects without actually incarnating them with servants. NODE: registerCharacteristicModel(propertyName, model) has to be called first!

Parameters:
propertyName name of the property
Returns:
PropertySet reference

const char* baci::CDBPropertySet::getRepositoryId  ) 
 

Returns RepositoryId of this servant.

Returns:
RepositoryId of this servant

virtual CORBA::Boolean baci::CDBPropertySet::is_property_defined const char *  property_name  )  [virtual]
 

Support for Existence Check. The is_property_defined operation returns true if the property is defined in the PropertySet, and returns false otherwise.

Parameters:
property_name name of the property
Exceptions:
CosPropertyService::InvalidPropertyName 

void baci::CDBPropertySet::operator= const CDBPropertySet  )  [private]
 

ALMA C++ coding standards state assignment operators should be disabled.

void baci::CDBPropertySet::registerCharacteristicModel const char *  modelName,
CharacteristicModelImpl model
 

Register characteristic model


Member Data Documentation

CDBPropertySet* baci::CDBPropertySet::instance_mp [static, private]
 

Instance to this object.

CharacteristicModelImplMap baci::CDBPropertySet::modelMap [private]
 

Map of characteristic models.

PortableServer::POA_var baci::CDBPropertySet::poa_m [private]
 

POA using DEFAULT_SERVANT policy.

PortableServer::Current_var baci::CDBPropertySet::poaCurrent_m [private]
 

POA Current.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:37:11 2009 for ACS C++ API by doxygen 1.3.8