#include <Trader_Constraint_Visitors.h>
Inheritance diagram for TAO_Trader_Constraint_Validator:
Public Member Functions | |
TAO_Trader_Constraint_Validator (const CosTradingRepos::ServiceTypeRepository::TypeStruct &type_struct) | |
virtual | ~TAO_Trader_Constraint_Validator (void) |
Desctructor. |
Definition at line 25 of file Trader_Constraint_Visitors.h.
TAO_Trader_Constraint_Validator::TAO_Trader_Constraint_Validator | ( | const CosTradingRepos::ServiceTypeRepository::TypeStruct & | type_struct | ) |
The constructor creates a map of property names to their values from the Type Description retrieved from the ServiceTypeRepository. The ServiceTypeRepository throws exceptions when it's displeased with the type name provided to it. The map allows O(lg n) associative access, rather than the O(n) sequential lookup from the CORBA data structures.
Definition at line 58 of file Trader_Constraint_Visitors.cpp.
References CosTradingRepos::ServiceTypeRepository::TypeStruct::props.
00059 { 00060 const CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq = 00061 type_struct.props; 00062 int length = prop_seq.length (); 00063 00064 // Create a map of the service type properties to their types. 00065 for (int i = 0; i < length; i++) 00066 { 00067 CORBA::TypeCode_ptr corba_type = 00068 CORBA::TypeCode::_duplicate (prop_seq[i].value_type.in ()); 00069 00070 CORBA::String_var prop_name_str = (const char*) prop_seq[i].name; 00071 this->type_map_.bind (prop_name_str, corba_type); 00072 } 00073 }
TAO_Trader_Constraint_Validator::~TAO_Trader_Constraint_Validator | ( | void | ) | [virtual] |