TAO_Import_Attributes_i Class Reference

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

#include <Trader.h>

Collaboration diagram for TAO_Import_Attributes_i:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Import_Attributes_i (TAO_Lockable &locker)
 ~TAO_Import_Attributes_i (void)
CORBA::ULong def_search_card (void) const
void def_search_card (CORBA::ULong)
CORBA::ULong max_search_card (void) const
void max_search_card (CORBA::ULong)
CORBA::ULong def_match_card (void) const
void def_match_card (CORBA::ULong)
CORBA::ULong max_match_card (void) const
void max_match_card (CORBA::ULong)
CORBA::ULong def_return_card (void) const
void def_return_card (CORBA::ULong)
CORBA::ULong max_return_card (void) const
void max_return_card (CORBA::ULong)
CORBA::ULong max_list (void) const
void max_list (CORBA::ULong)
CORBA::ULong def_hop_count (void) const
void def_hop_count (CORBA::ULong)
CORBA::ULong max_hop_count (void) const
void max_hop_count (CORBA::ULong)
CosTrading::FollowOption def_follow_policy (void) const
void def_follow_policy (CosTrading::FollowOption)
CosTrading::FollowOption max_follow_policy (void) const
void max_follow_policy (CosTrading::FollowOption)

Private Attributes

TAO_Lockablelocker_
CORBA::ULong def_search_card_
CORBA::ULong max_search_card_
 Maximum upper bound of offers to be searched.

CORBA::ULong def_match_card_
CORBA::ULong max_match_card_
 Maximum upper bound of matched offers to be ordered.

CORBA::ULong def_return_card_
CORBA::ULong max_return_card_
 Maximum upper bound of ordered offers to be returned.

CORBA::ULong max_list_
 Upper bound of depth.

CORBA::ULong def_hop_count_
CORBA::ULong max_hop_count_
 Maximum upper bound of depth of links to be traversed.

CosTrading::FollowOption def_follow_policy_
 Default link follow policy for a particular trader.

CosTrading::FollowOption max_follow_policy_

Detailed Description

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

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

Definition at line 236 of file Trader.h.


Constructor & Destructor Documentation

TAO_Import_Attributes_i::TAO_Import_Attributes_i TAO_Lockable locker  ) 
 

Definition at line 265 of file Trader.cpp.

00266   : locker_ (locker),
00267     def_search_card_ (200),
00268     max_search_card_ (500),
00269     def_match_card_ (200),
00270     max_match_card_ (500),
00271     def_return_card_ (200),
00272     max_return_card_ (500),
00273     max_list_ (0),
00274     def_hop_count_ (5),
00275     max_hop_count_ (10),
00276     def_follow_policy_ (CosTrading::if_no_local),
00277     max_follow_policy_ (CosTrading::always)
00278 {
00279 }

TAO_Import_Attributes_i::~TAO_Import_Attributes_i void   ) 
 

Definition at line 282 of file Trader.cpp.

00283 {
00284 }


Member Function Documentation

void TAO_Import_Attributes_i::def_follow_policy CosTrading::FollowOption   ) 
 

Definition at line 449 of file Trader.cpp.

References ACE_WRITE_GUARD.

00450 {
00451   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00452 
00453   if (new_value > this->max_follow_policy_)
00454     this->def_follow_policy_ = this->max_follow_policy_;
00455   else
00456     this->def_follow_policy_ = new_value;
00457 }

CosTrading::FollowOption TAO_Import_Attributes_i::def_follow_policy void   )  const
 

Definition at line 442 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

Referenced by TAO_Trader_Factory::manufacture_trader().

00443 {
00444   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), CosTrading::local_only);
00445   return this->def_follow_policy_;
00446 }

void TAO_Import_Attributes_i::def_hop_count CORBA::ULong   ) 
 

Definition at line 414 of file Trader.cpp.

References ACE_WRITE_GUARD.

00415 {
00416   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00417 
00418   if (new_value > this->max_hop_count_)
00419     this->def_hop_count_ = this->max_hop_count_;
00420   else
00421     this->def_hop_count_ = new_value;
00422 }

CORBA::ULong TAO_Import_Attributes_i::def_hop_count void   )  const
 

Definition at line 407 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00408 {
00409   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 0);
00410   return this->def_hop_count_;
00411 }

void TAO_Import_Attributes_i::def_match_card CORBA::ULong   ) 
 

Definition at line 330 of file Trader.cpp.

References ACE_WRITE_GUARD.

00331 {
00332   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00333 
00334   if (new_value > this->max_match_card_)
00335     this->def_match_card_ = this->max_match_card_;
00336   else
00337     this->def_match_card_ = new_value;
00338 }

CORBA::ULong TAO_Import_Attributes_i::def_match_card void   )  const
 

Definition at line 323 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00324 {
00325   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 10);
00326   return this->def_match_card_;
00327 }

void TAO_Import_Attributes_i::def_return_card CORBA::ULong   ) 
 

Definition at line 365 of file Trader.cpp.

References ACE_WRITE_GUARD.

00366 {
00367   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00368 
00369   if (new_value > this->max_return_card_)
00370     this->def_return_card_ = this->max_return_card_;
00371   else
00372     this->def_return_card_ = new_value;
00373 }

CORBA::ULong TAO_Import_Attributes_i::def_return_card void   )  const
 

Definition at line 358 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00359 {
00360   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 10);
00361   return this->def_return_card_;
00362 }

void TAO_Import_Attributes_i::def_search_card CORBA::ULong   ) 
 

Definition at line 294 of file Trader.cpp.

References ACE_WRITE_GUARD.

00295 {
00296   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00297 
00298   if (new_value > this->max_search_card_)
00299     this->def_search_card_ = this->max_search_card_;
00300   else
00301     this->def_search_card_ = new_value;
00302 }

CORBA::ULong TAO_Import_Attributes_i::def_search_card void   )  const
 

Definition at line 287 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00288 {
00289   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 10);
00290   return this->def_search_card_;
00291 }

void TAO_Import_Attributes_i::max_follow_policy CosTrading::FollowOption   ) 
 

Definition at line 467 of file Trader.cpp.

References ACE_WRITE_GUARD.

00468 {
00469   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00470   this->max_follow_policy_ = new_value;
00471 
00472   if (this->def_follow_policy_ > this->max_follow_policy_)
00473     this->def_follow_policy_ = this->max_follow_policy_;
00474 }

CosTrading::FollowOption TAO_Import_Attributes_i::max_follow_policy void   )  const
 

Definition at line 460 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

Referenced by TAO_Trader_Factory::manufacture_trader().

00461 {
00462   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), CosTrading::local_only);
00463   return this->max_follow_policy_;
00464 }

void TAO_Import_Attributes_i::max_hop_count CORBA::ULong   ) 
 

Definition at line 432 of file Trader.cpp.

References ACE_WRITE_GUARD.

00433 {
00434   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00435   this->max_hop_count_ = new_value;
00436 
00437   if (this->def_hop_count_ > this->max_hop_count_)
00438     this->def_hop_count_ = this->max_hop_count_;
00439 }

CORBA::ULong TAO_Import_Attributes_i::max_hop_count void   )  const
 

Definition at line 425 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00426 {
00427   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 0);
00428   return this->max_hop_count_;
00429 }

void TAO_Import_Attributes_i::max_list CORBA::ULong   ) 
 

Definition at line 400 of file Trader.cpp.

References ACE_WRITE_GUARD, and max_list_.

00401 {
00402   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00403   this->max_list_ = new_value;
00404 }

CORBA::ULong TAO_Import_Attributes_i::max_list void   )  const
 

Definition at line 393 of file Trader.cpp.

References ACE_READ_GUARD_RETURN, and max_list_.

00394 {
00395   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 0);
00396   return this->max_list_;
00397 }

void TAO_Import_Attributes_i::max_match_card CORBA::ULong   ) 
 

Definition at line 348 of file Trader.cpp.

References ACE_WRITE_GUARD.

00349 {
00350   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00351   this->max_match_card_ = new_value;
00352 
00353   if (this->def_match_card_ > this->max_match_card_)
00354     this->def_match_card_ = this->max_match_card_;
00355 }

CORBA::ULong TAO_Import_Attributes_i::max_match_card void   )  const
 

Definition at line 341 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00342 {
00343   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 10);
00344   return this->max_match_card_;
00345 }

void TAO_Import_Attributes_i::max_return_card CORBA::ULong   ) 
 

Definition at line 383 of file Trader.cpp.

References ACE_WRITE_GUARD.

00384 {
00385   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00386   this->max_return_card_ = new_value;
00387 
00388   if (this->def_return_card_ > this->max_return_card_)
00389     this->def_return_card_ = this->max_return_card_;
00390 }

CORBA::ULong TAO_Import_Attributes_i::max_return_card void   )  const
 

Definition at line 376 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00377 {
00378   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 10);
00379   return this->max_return_card_;
00380 }

void TAO_Import_Attributes_i::max_search_card CORBA::ULong   ) 
 

Definition at line 312 of file Trader.cpp.

References ACE_WRITE_GUARD.

00313 {
00314   ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->locker_.lock ());
00315 
00316   this->max_search_card_ = new_value;
00317 
00318   if (this->def_search_card_ > this->max_search_card_)
00319     this->def_search_card_ = this->max_search_card_;
00320 }

CORBA::ULong TAO_Import_Attributes_i::max_search_card void   )  const
 

Definition at line 305 of file Trader.cpp.

References ACE_READ_GUARD_RETURN.

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

00306 {
00307   ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->locker_.lock (), 10);
00308   return this->max_search_card_;
00309 }


Member Data Documentation

CosTrading::FollowOption TAO_Import_Attributes_i::def_follow_policy_ [private]
 

Default link follow policy for a particular trader.

Definition at line 316 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::def_hop_count_ [private]
 

Upper bound of depth of links to be traversed if is not specified.

Definition at line 310 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::def_match_card_ [private]
 

Upper bound of matched offers to be ordered if is not specified).

Definition at line 293 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::def_return_card_ [private]
 

Upper bound of ordered offers to be returned if is not specified.

Definition at line 300 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::def_search_card_ [private]
 

Upper bound of offers to be searched if is not specified.

Definition at line 286 of file Trader.h.

TAO_Lockable& TAO_Import_Attributes_i::locker_ [private]
 

Definition at line 282 of file Trader.h.

CosTrading::FollowOption TAO_Import_Attributes_i::max_follow_policy_ [private]
 

Limiting link follow policy for all links of the trader - overrides both link and importer policies.

Definition at line 320 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::max_hop_count_ [private]
 

Maximum upper bound of depth of links to be traversed.

Definition at line 313 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::max_list_ [private]
 

Upper bound of depth.

Definition at line 306 of file Trader.h.

Referenced by max_list().

CORBA::ULong TAO_Import_Attributes_i::max_match_card_ [private]
 

Maximum upper bound of matched offers to be ordered.

Definition at line 296 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::max_return_card_ [private]
 

Maximum upper bound of ordered offers to be returned.

Definition at line 303 of file Trader.h.

CORBA::ULong TAO_Import_Attributes_i::max_search_card_ [private]
 

Maximum upper bound of offers to be searched.

Definition at line 289 of file Trader.h.


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