TAO_PortableGroup
2.0.8
|
#include <PG_Property_Set.h>
The PG_Property_Set captures the set of properties from a PortableGroup::Properties structure in a more usable format (a hash map), and provides methods for operating on these properties.
It supports "chains" of property sets to implement default value semantics. If a requested property is not found in this set, the default set(s) are searched. Thus, any property found at this level overrides the defaults.
See: PG_Properties_Support for more details on use of this object.
A PG_Property_Set may also be used for it's original purpose as a stand-alone helper class for extracting values from PortableGroup::Properties.
typedef ACE_Hash_Map_Manager< ACE_CString, const PortableGroup::Value *, ACE_SYNCH_NULL_MUTEX> TAO::PG_Property_Set::ValueMap [private] |
typedef ACE_Hash_Map_Iterator< ACE_CString, const PortableGroup::Value *, ACE_SYNCH_NULL_MUTEX> TAO::PG_Property_Set::ValueMapIterator [private] |
TAO::PG_Property_Set::PG_Property_Set | ( | void | ) |
constructor: empty set with no defaults.
TAO::PG_Property_Set::PG_Property_Set | ( | const PortableGroup::Properties & | property_set | ) |
constructor
property_set | the properties to be decoded |
TAO::PG_Property_Set::PG_Property_Set | ( | const PortableGroup::Properties & | property_set, |
PG_Property_Set * | defaults | ||
) |
constructor with defaults
property_set | the properties to be decoded |
defaults | a propert set decoder that supplies default values. |
TAO::PG_Property_Set::PG_Property_Set | ( | PG_Property_Set * | defaults | ) |
constructor with defaults, but no properties (yet) (note this is not a copy constructor)
defaults | a propert set decoder that supplies default values. |
TAO::PG_Property_Set::~PG_Property_Set | ( | ) |
TAO::PG_Property_Set::PG_Property_Set | ( | const PG_Property_Set & | rhs | ) | [private] |
void TAO::PG_Property_Set::clear | ( | ) |
Clear properties Does not clear default properties.
void TAO::PG_Property_Set::decode | ( | const PortableGroup::Properties & | property_set | ) |
Decode additional properties Duplicate values replace previous values.
property_set | the properties to be decoded |
void TAO::PG_Property_Set::export_properties | ( | PortableGroup::Properties & | property_set | ) | const |
Export the properties to a PortableGroup::Properties
This method is intended to be used to implement the PropertyManager::get_*_properties methods. If you want to access the properties for any purpose other than exporting them across a CORBA interface, it is much more efficient to use the find interface.
int TAO::PG_Property_Set::find | ( | const ACE_CString & | key, |
const PortableGroup::Value *& | pValue | ||
) | const |
general purpose find. returns a pointer to an Any if templated methods were available: template <typename type=""> int find (const ACE_CString & key, TYPE & value) const; instead, see global function below
key | the (simple) name of the property |
pValue | an out parameter to receive a pointer to the Any containing the value |
void TAO::PG_Property_Set::merge_properties | ( | ValueMap & | merged_values | ) | const [private] |
populate a ValueMap with the properties known to this decoder including but overriding default values
PG_Property_Set& TAO::PG_Property_Set::operator= | ( | const PG_Property_Set & | rhs | ) | [private] |
void TAO::PG_Property_Set::remove | ( | const PortableGroup::Properties & | property_set | ) |
void TAO::PG_Property_Set::set_property | ( | const char * | name, |
const PortableGroup::Value & | value | ||
) |
set or replace a single property
PG_Property_Set* TAO::PG_Property_Set::defaults_ [private] |
a parent to another property decoder that provides default values these can be chained indefinitely.
TAO_SYNCH_MUTEX TAO::PG_Property_Set::internals_ [mutable, private] |
Protect internal state.
ValueMap TAO::PG_Property_Set::values_ [private] |