TAO_CosTrader  2.4.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TAO_Property_Evaluator_By_Name Class Reference

This class extends the TAO_Property_Evaluator to allow lookups based on the property name of interest. Since the property information is contained within an integer indexed array, lookups may occur in O(n) time, where n is the length of the array. To make lookups by name more efficient, TAO_Property_Evaluator_By_Name creates a mapping of property names to integer indicies, upon which lookups are guaranteed to be O(lg n). More...

#include <Trader_Utils.h>

Inheritance diagram for TAO_Property_Evaluator_By_Name:
Inheritance graph
[legend]
Collaboration diagram for TAO_Property_Evaluator_By_Name:
Collaboration graph
[legend]

Public Member Functions

 TAO_Property_Evaluator_By_Name (const CosTrading::PropertySeq &properties, CORBA::Boolean supports_dp=1)
 
 TAO_Property_Evaluator_By_Name (CosTrading::Offer &offer, CORBA::Boolean supports_dp=1)
 
int is_dynamic_property (const char *property_name)
 
CORBA::Any * property_value (const char *property_name)
 
CORBA::TypeCode_ptr property_type (const char *property_name)
 
const CosTrading::Propertyget_property (const char *property_name)
 
- Public Member Functions inherited from TAO_Property_Evaluator
 TAO_Property_Evaluator (const CosTrading::PropertySeq &properties, CORBA::Boolean supports_dp=1)
 
 TAO_Property_Evaluator (CosTrading::Offer &offer, CORBA::Boolean supports_dp=1)
 
virtual ~TAO_Property_Evaluator (void)
 Clean up dynamic properties. More...
 
int is_dynamic_property (int index)
 
CORBA::Any * property_value (int index)
 
CORBA::TypeCode_ptr property_type (int index)
 

Private Member Functions

 TAO_Property_Evaluator_By_Name (const TAO_Property_Evaluator_By_Name &)
 
TAO_Property_Evaluator_By_Nameoperator= (const TAO_Property_Evaluator_By_Name &)
 

Private Attributes

TAO_Lookup_Table table_
 

Additional Inherited Members

- Protected Types inherited from TAO_Property_Evaluator
typedef CosTradingDynamic::DynamicProp DP_Struct
 
typedef CosTradingDynamic::DynamicPropEval DP_Eval
 
- Protected Attributes inherited from TAO_Property_Evaluator
const CosTrading::PropertySeqprops_
 
int supports_dp_
 
CORBA::Any ** dp_cache_
 

Detailed Description

This class extends the TAO_Property_Evaluator to allow lookups based on the property name of interest. Since the property information is contained within an integer indexed array, lookups may occur in O(n) time, where n is the length of the array. To make lookups by name more efficient, TAO_Property_Evaluator_By_Name creates a mapping of property names to integer indicies, upon which lookups are guaranteed to be O(lg n).

Constructor & Destructor Documentation

TAO_Property_Evaluator_By_Name::TAO_Property_Evaluator_By_Name ( const CosTrading::PropertySeq properties,
CORBA::Boolean  supports_dp = 1 
)
TAO_Property_Evaluator_By_Name::TAO_Property_Evaluator_By_Name ( CosTrading::Offer offer,
CORBA::Boolean  supports_dp = 1 
)

Construct an instance of TAO_Property_Evaluator that operates on an <offer> where the support for dynamic properties is dictated by <supports_dynamic_properties>.

TAO_Property_Evaluator_By_Name::TAO_Property_Evaluator_By_Name ( const TAO_Property_Evaluator_By_Name )
private

Member Function Documentation

const CosTrading::Property * TAO_Property_Evaluator_By_Name::get_property ( const char *  property_name)
int TAO_Property_Evaluator_By_Name::is_dynamic_property ( const char *  property_name)

Returns 1 if the property whose name is <property_name> is defined and dynamic. If the property is undefined, this method will throw a Property_Undefined exception with impunity.

TAO_Property_Evaluator_By_Name& TAO_Property_Evaluator_By_Name::operator= ( const TAO_Property_Evaluator_By_Name )
private
CORBA::TypeCode_ptr TAO_Property_Evaluator_By_Name::property_type ( const char *  property_name)

This method is identical to its counterpart in TAO_Property_Evaluator, exception property_type first discovers the index through a string matching lookup.

CORBA::Any * TAO_Property_Evaluator_By_Name::property_value ( const char *  property_name)

This method is identical to its counterpart in TAO_Property_Evaluator, except property_value first discovers the index through a string matching lookup.

Member Data Documentation

TAO_Lookup_Table TAO_Property_Evaluator_By_Name::table_
private

The instance of the above mapping for the offer provided in the constructor.


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