#include <CSD_Strategy_Repository.h>
Classes | |
struct | Strategy_Node |
Public Member Functions | |
TAO_CSD_Strategy_Repository () | |
Constructor. | |
virtual | ~TAO_CSD_Strategy_Repository () |
Virtual Destructor. | |
int | init (int argc, ACE_TCHAR **argv) |
CSD_Framework::Strategy_ptr | find (const ACE_CString &poa_name) |
Factory method used to create a CSD_Strategy object. | |
int | add_strategy (const ACE_CString &poa_name, CSD_Framework::Strategy_ptr strategy) |
Private Attributes | |
Strategy_Node * | strategy_list_head_ |
Definition at line 38 of file CSD_Strategy_Repository.h.
TAO_CSD_Strategy_Repository::TAO_CSD_Strategy_Repository | ( | ) |
TAO_CSD_Strategy_Repository::~TAO_CSD_Strategy_Repository | ( | ) | [virtual] |
Virtual Destructor.
Definition at line 18 of file CSD_Strategy_Repository.cpp.
{ delete this->strategy_list_head_; }
int TAO_CSD_Strategy_Repository::add_strategy | ( | const ACE_CString & | poa_name, | |
CSD_Framework::Strategy_ptr | strategy | |||
) |
Definition at line 54 of file CSD_Strategy_Repository.cpp.
{ Strategy_Node *node = 0; ACE_NEW_RETURN (node, Strategy_Node(name,strat),-1); if (this->strategy_list_head_ == 0) this->strategy_list_head_ = node; else this->strategy_list_head_->add_node(node); if (TAO_debug_level > 3) { ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Strategy_Repository::add_strategy for %C\n"), name.c_str ())); } return 0; }
CSD_Framework::Strategy_ptr TAO_CSD_Strategy_Repository::find | ( | const ACE_CString & | poa_name | ) |
Factory method used to create a CSD_Strategy object.
Definition at line 39 of file CSD_Strategy_Repository.cpp.
{ if (this->strategy_list_head_ != 0) { Strategy_Node *node = this->strategy_list_head_->find(name); if (node != 0) return CSD_Framework::Strategy::_duplicate (node->strategy_.in()); } return CSD_Framework::Strategy::_nil(); }
int TAO_CSD_Strategy_Repository::init | ( | int | argc, | |
ACE_TCHAR ** | argv | |||
) |
Definition at line 24 of file CSD_Strategy_Repository.cpp.
{ static int initialized = 0; // Only allow initialization once. if (initialized) return 0; initialized = 1; this->strategy_list_head_ = 0; return 0; }
Definition at line 68 of file CSD_Strategy_Repository.h.