TAO_Support_Attributes_i Class Reference

This class stores, allows access to and modification of trader's support attributes. More...

#include <Trader.h>

Collaboration diagram for TAO_Support_Attributes_i:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Support_Attributes_i (TAO_Lockable &locker)
 ~TAO_Support_Attributes_i ()
CORBA::Boolean supports_modifiable_properties (void) const
void supports_modifiable_properties (CORBA::Boolean)
CORBA::Boolean supports_dynamic_properties (void) const
void supports_dynamic_properties (CORBA::Boolean)
CORBA::Boolean supports_proxy_offers (void) const
void supports_proxy_offers (CORBA::Boolean)
CosTrading::TypeRepository_ptr type_repos (void) const
void type_repos (CosTrading::TypeRepository_ptr)
CosTradingRepos::ServiceTypeRepository_ptr service_type_repos (void) const

Private Attributes

TAO_Lockablelocker_
 A reference to the trader (needed for obtaining the lock.).

CORBA::Boolean supports_modifiable_properties_
 Indicator of whether the trader supports property modification.

CORBA::Boolean supports_dynamic_properties_
 Indicator of whether the trader supports dynamic properties.

CORBA::Boolean supports_proxy_offers_
 Indicator of whether the trader supports proxy offers.

CORBA::Object_var type_repos_
 A reference to the TypeRepostitory used by the trader.

CosTradingRepos::ServiceTypeRepository_var service_type_repos_
 Already narrowed reference to the ServiceTypeRepository.


Detailed Description

This class stores, allows access to and modification of trader's support attributes.

Contains a reference to the trader from which it is used so it can use trader's lock.

Definition at line 153 of file Trader.h.


Constructor & Destructor Documentation

TAO_Support_Attributes_i::TAO_Support_Attributes_i TAO_Lockable locker  ) 
 

Definition at line 171 of file Trader.cpp.

00172   : locker_ (locker),
00173     supports_modifiable_properties_ (1),
00174     supports_dynamic_properties_ (1),
00175     supports_proxy_offers_ (0),
00176     type_repos_ (CosTrading::TypeRepository::_nil ()),
00177     service_type_repos_ (CosTradingRepos::ServiceTypeRepository::_nil ())
00178 {
00179 }

TAO_Support_Attributes_i::~TAO_Support_Attributes_i  ) 
 

Definition at line 181 of file Trader.cpp.

00182 {
00183 }


Member Function Documentation

CosTradingRepos::ServiceTypeRepository_ptr TAO_Support_Attributes_i::service_type_repos void   )  const
 

Definition at line 258 of file Trader.cpp.

References service_type_repos_.

Referenced by TAO_Register< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::_cxx_export(), TAO_Register< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::modify(), TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::query(), and TAO_Register< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::withdraw_using_constraint().

00259 {
00260   return this->service_type_repos_.ptr ();
00261 }

void TAO_Support_Attributes_i::supports_dynamic_properties CORBA::Boolean   ) 
 

Definition at line 212 of file Trader.cpp.

References ACE_WRITE_GUARD.

00213 {
00214   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00215   this->supports_dynamic_properties_ = new_value;
00216 }

CORBA::Boolean TAO_Support_Attributes_i::supports_dynamic_properties void   )  const
 

Definition at line 202 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

Referenced by TAO_Policies::boolean_prop(), TAO_Trader_Factory::manufacture_trader(), and TAO_Register< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::withdraw_using_constraint().

00203 {
00204   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (),
00205                          0);
00206 
00207   return this->supports_dynamic_properties_;
00208 }

void TAO_Support_Attributes_i::supports_modifiable_properties CORBA::Boolean   ) 
 

Definition at line 195 of file Trader.cpp.

References ACE_WRITE_GUARD.

00196 {
00197   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00198   this->supports_modifiable_properties_ = new_value;
00199 }

CORBA::Boolean TAO_Support_Attributes_i::supports_modifiable_properties void   )  const
 

Definition at line 186 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

Referenced by TAO_Policies::boolean_prop(), and TAO_Trader_Factory::manufacture_trader().

00187 {
00188   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (),
00189                          0);
00190   return this->supports_modifiable_properties_;
00191 }

void TAO_Support_Attributes_i::supports_proxy_offers CORBA::Boolean   ) 
 

Definition at line 229 of file Trader.cpp.

References ACE_WRITE_GUARD, and supports_proxy_offers_.

00230 {
00231   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00232   this->supports_proxy_offers_ = new_value;
00233 }

CORBA::Boolean TAO_Support_Attributes_i::supports_proxy_offers void   )  const
 

Definition at line 219 of file Trader.cpp.

References ACE_READ_GUARD_RETURN, and supports_proxy_offers_.

Referenced by TAO_Policies::boolean_prop().

00220 {
00221   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (),
00222                          0);
00223 
00224   return this->supports_proxy_offers_;
00225 }

void TAO_Support_Attributes_i::type_repos CosTrading::TypeRepository_ptr   ) 
 

Definition at line 245 of file Trader.cpp.

References ACE_DECLARE_NEW_CORBA_ENV, ACE_ENV_ARG_PARAMETER, ACE_WRITE_GUARD, service_type_repos_, and type_repos_.

00246 {
00247   // @@ Seth, There is no way to propagate the exception out.
00248   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00249 
00250   ACE_DECLARE_NEW_CORBA_ENV;
00251   this->type_repos_ = new_value;
00252   // @@ What can we do even if we catch this?
00253   this->service_type_repos_ =
00254     CosTradingRepos::ServiceTypeRepository::_narrow (new_value ACE_ENV_ARG_PARAMETER);
00255 }

CosTrading::TypeRepository_ptr TAO_Support_Attributes_i::type_repos void   )  const
 

Definition at line 236 of file Trader.cpp.

References ACE_READ_GUARD_RETURN, and type_repos_.

Referenced by TAO_Trading_Loader::create_object().

00237 {
00238   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (),
00239                          CosTrading::TypeRepository::_nil ());
00240   return this->type_repos_.ptr ();
00241 }


Member Data Documentation

TAO_Lockable& TAO_Support_Attributes_i::locker_ [private]
 

A reference to the trader (needed for obtaining the lock.).

Definition at line 178 of file Trader.h.

CosTradingRepos::ServiceTypeRepository_var TAO_Support_Attributes_i::service_type_repos_ [private]
 

Already narrowed reference to the ServiceTypeRepository.

Definition at line 193 of file Trader.h.

Referenced by service_type_repos(), and type_repos().

CORBA::Boolean TAO_Support_Attributes_i::supports_dynamic_properties_ [private]
 

Indicator of whether the trader supports dynamic properties.

Definition at line 184 of file Trader.h.

CORBA::Boolean TAO_Support_Attributes_i::supports_modifiable_properties_ [private]
 

Indicator of whether the trader supports property modification.

Definition at line 181 of file Trader.h.

CORBA::Boolean TAO_Support_Attributes_i::supports_proxy_offers_ [private]
 

Indicator of whether the trader supports proxy offers.

Definition at line 187 of file Trader.h.

Referenced by supports_proxy_offers().

CORBA::Object_var TAO_Support_Attributes_i::type_repos_ [private]
 

A reference to the TypeRepostitory used by the trader.

Definition at line 190 of file Trader.h.

Referenced by type_repos().


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