TAO_Trader_Base Class Reference

TAO_Trader inherits from this "helper" class. The sole purpose of this class is to factor some of TAO_Trader's data members out, so that they would not have to be templatized and be be aware of the type of lock they use. More...

#include <Trader.h>

Inheritance diagram for TAO_Trader_Base:

Inheritance graph
[legend]
Collaboration diagram for TAO_Trader_Base:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Trader_Components {
  LOOKUP = 0x001, REGISTER = 0x002, LINK = 0x004, PROXY = 0x008,
  ADMIN = 0x010
}

Public Member Functions

virtual ~TAO_Trader_Base (void)
TAO_Trading_Components_itrading_components (void)
const TAO_Trading_Components_itrading_components (void) const
TAO_Import_Attributes_iimport_attributes (void)
const TAO_Import_Attributes_iimport_attributes (void) const
TAO_Support_Attributes_isupport_attributes (void)
const TAO_Support_Attributes_isupport_attributes (void) const
TAO_Link_Attributes_ilink_attributes (void)
const TAO_Link_Attributes_ilink_attributes (void) const

Static Public Member Functions

CORBA::Boolean is_valid_identifier_name (const char *ident)
CORBA::Boolean is_valid_property_name (const char *ident)
CORBA::Boolean is_valid_link_name (const char *ident)

Protected Member Functions

 TAO_Trader_Base (void)
 Implemented.


Protected Attributes

TAO_Trading_Components_i trading_components_
 Stores and allows lookup of trader's components.

TAO_Import_Attributes_i import_attributes_
 Stores and allows access/modification of trader's import attributes.

TAO_Support_Attributes_i support_attributes_
 Stores and allows access/modification of trader's support attributes.

TAO_Link_Attributes_i link_attributes_
 Stores and allows access/modification of trader's link attributes.


Private Member Functions

 TAO_Trader_Base (const TAO_Trader_Base &TAO_Trader_Base)
 Unimplemented.

TAO_Trader_Baseoperator= (const TAO_Trader_Base &)

Detailed Description

TAO_Trader inherits from this "helper" class. The sole purpose of this class is to factor some of TAO_Trader's data members out, so that they would not have to be templatized and be be aware of the type of lock they use.

TAO_Trader is a template class. And while we want , , and use a lock contained in TAO_Trader, we do not want all these classes to be templatized. TAO_Trader_Base class solves this problem.

Definition at line 408 of file Trader.h.


Member Enumeration Documentation

enum TAO_Trader_Base::Trader_Components
 

Enumeration values:
LOOKUP 
REGISTER 
LINK 
PROXY 
ADMIN 

Definition at line 412 of file Trader.h.

00413   {
00414     LOOKUP = 0x001,
00415     REGISTER = 0x002,
00416     LINK = 0x004,
00417     PROXY = 0x008,
00418     ADMIN = 0x010
00419   };


Constructor & Destructor Documentation

TAO_Trader_Base::~TAO_Trader_Base void   )  [virtual]
 

Definition at line 28 of file Trader.cpp.

00029 {
00030 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Trader_Base::TAO_Trader_Base void   )  [protected]
 

Implemented.

Definition at line 20 of file Trader.cpp.

00021   : trading_components_ (*this),
00022     import_attributes_ (*this),
00023     support_attributes_ (*this),
00024     link_attributes_ (*this)
00025 {
00026 }

TAO_Trader_Base::TAO_Trader_Base const TAO_Trader_Base TAO_Trader_Base  )  [private]
 

Unimplemented.


Member Function Documentation

const TAO_Import_Attributes_i & TAO_Trader_Base::import_attributes void   )  const
 

Definition at line 39 of file Trader.cpp.

References import_attributes_.

00040 {
00041   return this->import_attributes_;
00042 }

TAO_Import_Attributes_i & TAO_Trader_Base::import_attributes void   ) 
 

Definition at line 33 of file Trader.cpp.

References import_attributes_.

Referenced by TAO_Trader_Factory::manufacture_trader().

00034 {
00035   return this->import_attributes_;
00036 }

CORBA::Boolean TAO_Trader_Base::is_valid_identifier_name const char *  ident  )  [static]
 

Determine whether the identifier is a valid one (i.e., if the first character is a letter, and the subsequent ones letter, numbers, or underscores.)

IDL identifier scoping and escaping rules apply.

Definition at line 106 of file Trader.cpp.

References ACE_OS::ace_isalnum(), ACE_OS::ace_isalpha(), ACE_OS::strlen(), and ACE_OS::strstr().

Referenced by TAO_Service_Type_Repository::add_type(), TAO_Service_Type_Repository::describe_type(), TAO_Service_Type_Repository::fully_describe_type(), TAO_Service_Type_Repository::mask_type(), TAO_Offer_Database< LOCK_TYPE >::parse_offer_id(), TAO_Service_Type_Repository::remove_type(), TAO_Service_Type_Repository::unmask_type(), and TAO_Service_Type_Repository::validate_supertypes().

00107 {
00108   static char const * const double_colon = "::";
00109 
00110   if (ident == 0)
00111     return 0;
00112 
00113   int return_value = 1;
00114 
00115   // Allow scoped identifiers
00116   CORBA::Boolean done = 0;
00117   char const * pos =
00118     ACE_OS::strstr (ident,
00119                     double_colon);
00120 
00121   do
00122   {
00123     if ('_' == ident[0])
00124       {
00125         // Treat escaped identifiers the same way as IDL
00126         ++ident;
00127       }
00128 
00129     size_t length =
00130       pos ? pos - ident : ACE_OS::strlen (ident);
00131 
00132     if (length >= 1 && ACE_OS::ace_isalpha (ident[0]))
00133       {
00134         // First character must be alpha
00135         for (size_t i = 0; i < length; ++i)
00136           {
00137             if (! (ACE_OS::ace_isalnum (ident[i])
00138                    || ident[i] == '_'))
00139               {
00140                 // Subsequent characters is not alpha, numeric, or '_'
00141                 return_value = 0;
00142                 break;
00143               }
00144           }
00145       }
00146     else
00147       return_value = 0;
00148 
00149     if (pos)
00150       {
00151         // More identifiers
00152         ident = pos + 2;
00153         pos = ACE_OS::strstr (ident, double_colon);
00154       }
00155     else
00156       {
00157         // Last or only identifier
00158         done = 1;
00159       }
00160   }
00161   while (!done);
00162 
00163   return return_value;
00164 }

CORBA::Boolean TAO_Trader_Base::is_valid_link_name const char *  ident  )  [inline, static]
 

Determine whether the link name is a valid one currently defined the same as property name.

Definition at line 463 of file Trader.h.

Referenced by TAO_Link< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::add_link(), TAO_Link< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::describe_link(), TAO_Link< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::modify_link(), TAO_Link< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::remove_link(), and TAO_Register< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::resolve().

00464   {
00465     return is_valid_property_name (ident);
00466   }

CORBA::Boolean TAO_Trader_Base::is_valid_property_name const char *  ident  )  [static]
 

Determine whether the identifier is a valid one (i.e., if the first character is a letter, and the subsequent ones letter, numbers, or underscores.)

Definition at line 81 of file Trader.cpp.

References ACE_OS::ace_isalnum(), ACE_OS::ace_isalpha(), and ACE_OS::strlen().

Referenced by TAO_Offer_Modifier::delete_properties(), TAO_Offer_Modifier::merge_properties(), TAO_Property_Evaluator_By_Name::TAO_Property_Evaluator_By_Name(), TAO_Property_Filter::TAO_Property_Filter(), and TAO_Service_Type_Repository::validate_properties().

00082 {
00083   bool return_value = false;
00084 
00085   if (ident == 0)
00086     return return_value;
00087 
00088   size_t length = ACE_OS::strlen (ident);
00089   if (length >= 1 && ACE_OS::ace_isalpha (ident[0]))
00090     {
00091       return_value = true;
00092       for (size_t i = 0; i < length; i++)
00093         {
00094           if (! (ACE_OS::ace_isalnum (ident[i]) || ident[i] == '_'))
00095             {
00096               return_value = false;
00097               break;
00098             }
00099         }
00100     }
00101 
00102   return return_value;
00103 }

const TAO_Link_Attributes_i & TAO_Trader_Base::link_attributes void   )  const
 

Definition at line 63 of file Trader.cpp.

References link_attributes_.

00064 {
00065   return this->link_attributes_;
00066 }

TAO_Link_Attributes_i & TAO_Trader_Base::link_attributes void   ) 
 

Definition at line 57 of file Trader.cpp.

References link_attributes_.

00058 {
00059   return this->link_attributes_;
00060 }

TAO_Trader_Base& TAO_Trader_Base::operator= const TAO_Trader_Base  )  [private]
 

const TAO_Support_Attributes_i & TAO_Trader_Base::support_attributes void   )  const
 

Definition at line 51 of file Trader.cpp.

References support_attributes_.

00052 {
00053   return this->support_attributes_;
00054 }

TAO_Support_Attributes_i & TAO_Trader_Base::support_attributes void   ) 
 

Definition at line 45 of file Trader.cpp.

References support_attributes_.

Referenced by TAO_Trader_Factory::manufacture_trader().

00046 {
00047   return this->support_attributes_;
00048 }

const TAO_Trading_Components_i & TAO_Trader_Base::trading_components void   )  const
 

Definition at line 75 of file Trader.cpp.

References trading_components_.

00076 {
00077   return this->trading_components_;
00078 }

TAO_Trading_Components_i & TAO_Trader_Base::trading_components void   ) 
 

Definition at line 69 of file Trader.cpp.

References trading_components_.

Referenced by TAO_Trader< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::TAO_Trader().

00070 {
00071   return this->trading_components_;
00072 }


Member Data Documentation

TAO_Import_Attributes_i TAO_Trader_Base::import_attributes_ [protected]
 

Stores and allows access/modification of trader's import attributes.

Definition at line 475 of file Trader.h.

Referenced by import_attributes().

TAO_Link_Attributes_i TAO_Trader_Base::link_attributes_ [protected]
 

Stores and allows access/modification of trader's link attributes.

Definition at line 481 of file Trader.h.

Referenced by link_attributes().

TAO_Support_Attributes_i TAO_Trader_Base::support_attributes_ [protected]
 

Stores and allows access/modification of trader's support attributes.

Definition at line 478 of file Trader.h.

Referenced by support_attributes().

TAO_Trading_Components_i TAO_Trader_Base::trading_components_ [protected]
 

Stores and allows lookup of trader's components.

Definition at line 472 of file Trader.h.

Referenced by trading_components().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 14:01:18 2006 for TAO_CosTrader by doxygen 1.3.6