TAO_PortableGroup 4.0.0
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TAO::PG_Property_Set Class Reference

#include <PG_Property_Set.h>

Collaboration diagram for TAO::PG_Property_Set:
Collaboration graph
[legend]

Public Member Functions

 PG_Property_Set ()
 
 PG_Property_Set (const PortableGroup::Properties &property_set)
 
 PG_Property_Set (const PortableGroup::Properties &property_set, const PG_Property_Set_var &defaults)
 
 PG_Property_Set (const PG_Property_Set_var &defaults)
 
 ~PG_Property_Set ()
 
int find (const ACE_CString &key, const PortableGroup::Value *&pValue) const
 
void decode (const PortableGroup::Properties &property_set)
 
void clear ()
 
void remove (const PortableGroup::Properties &property_set)
 
void set_property (const char *name, const PortableGroup::Value &value)
 
void export_properties (PortableGroup::Properties &property_set) const
 

Private Types

typedef ACE_Hash_Map_Manager< ACE_CString, const PortableGroup::Value *, ACE_SYNCH_NULL_MUTEXValueMap
 
typedef ACE_Hash_Map_Iterator< ACE_CString, const PortableGroup::Value *, ACE_SYNCH_NULL_MUTEXValueMapIterator
 

Private Member Functions

void merge_properties (ValueMap &merged_values) const
 
 PG_Property_Set (const PG_Property_Set &rhs)=delete
 
PG_Property_Setoperator= (const PG_Property_Set &rhs)=delete
 

Private Attributes

TAO_SYNCH_MUTEX internals_
 
ValueMap values_
 
PG_Property_Set_var defaults_
 

Detailed Description

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.

Member Typedef Documentation

◆ ValueMap

◆ ValueMapIterator

Constructor & Destructor Documentation

◆ PG_Property_Set() [1/5]

TAO::PG_Property_Set::PG_Property_Set ( )

constructor: empty set with no defaults.

◆ PG_Property_Set() [2/5]

TAO::PG_Property_Set::PG_Property_Set ( const PortableGroup::Properties & property_set)

constructor

Parameters
property_setthe properties to be decoded

◆ PG_Property_Set() [3/5]

TAO::PG_Property_Set::PG_Property_Set ( const PortableGroup::Properties & property_set,
const PG_Property_Set_var & defaults )

constructor with defaults

Parameters
property_setthe properties to be decoded
defaultsa propert set decoder that supplies default values.

◆ PG_Property_Set() [4/5]

TAO::PG_Property_Set::PG_Property_Set ( const PG_Property_Set_var & defaults)

constructor with defaults, but no properties (yet) (note this is not a copy constructor)

Parameters
defaultsa propert set decoder that supplies default values.

◆ ~PG_Property_Set()

TAO::PG_Property_Set::~PG_Property_Set ( )

◆ PG_Property_Set() [5/5]

TAO::PG_Property_Set::PG_Property_Set ( const PG_Property_Set & rhs)
privatedelete

Member Function Documentation

◆ clear()

void TAO::PG_Property_Set::clear ( )

Clear properties Does not clear default properties.

◆ decode()

void TAO::PG_Property_Set::decode ( const PortableGroup::Properties & property_set)

Decode additional properties Duplicate values replace previous values.

Parameters
property_setthe properties to be decoded

◆ export_properties()

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.

◆ find()

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

Parameters
keythe (simple) name of the property
pValuean out parameter to receive a pointer to the Any containing the value
Returns
boolean true if found

◆ merge_properties()

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

◆ operator=()

PG_Property_Set & TAO::PG_Property_Set::operator= ( const PG_Property_Set & rhs)
privatedelete

◆ remove()

void TAO::PG_Property_Set::remove ( const PortableGroup::Properties & property_set)

◆ set_property()

void TAO::PG_Property_Set::set_property ( const char * name,
const PortableGroup::Value & value )

set or replace a single property

Member Data Documentation

◆ defaults_

PG_Property_Set_var TAO::PG_Property_Set::defaults_
private

a parent to another property decoder that provides default values these can be chained indefinitely.

◆ internals_

TAO_SYNCH_MUTEX TAO::PG_Property_Set::internals_
mutableprivate

Protect internal state.

◆ values_

ValueMap TAO::PG_Property_Set::values_
private

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