TAO_CosTrader  2.0.8
Public Member Functions | Private Member Functions | Private Attributes
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]

List of all members.

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)

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_

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

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines