Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File 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]
List of all members.

Public Methods

 TAO_Property_Evaluator_By_Name (const CosTrading::PropertySeq &properties ACE_ENV_ARG_DECL, CORBA::Boolean supports_dp=1) throw (CosTrading::DuplicatePropertyName, CosTrading::IllegalPropertyName)
 TAO_Property_Evaluator_By_Name (CosTrading::Offer &offer, CORBA::Boolean supports_dp=1)
int is_dynamic_property (const char *property_name)
CORBA::Anyproperty_value (const char *property_name ACE_ENV_ARG_DECL) throw (CosTradingDynamic::DPEvalFailure)
CORBA::TypeCode_ptr property_type (const char *property_name)
const CosTrading::Propertyget_property (const char *property_name)

Private Methods

 TAO_Property_Evaluator_By_Name (const TAO_Property_Evaluator_By_Name &)
TAO_Property_Evaluator_By_Name & operator= (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    ACE_ENV_ARG_DECL,
CORBA::Boolean    supports_dp = 1
throw (CosTrading::DuplicatePropertyName, CosTrading::IllegalPropertyName)
 

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    ACE_ENV_ARG_DECL throw (CosTradingDynamic::DPEvalFailure)
 

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:
Generated on Fri Apr 2 19:23:27 2004 for TAO_CosTrader by doxygen1.2.18