Version: 8.3.0
YACS::ENGINE::Catalog Class Reference

class for YACS catalogs. More...

#include <Catalog.hxx>

Inheritance diagram for YACS::ENGINE::Catalog:
Collaboration diagram for YACS::ENGINE::Catalog:

Public Member Functions

 Catalog (const std::string &name)
 
virtual ~Catalog ()
 
const std::string & getName () const
 
std::string getErrors ()
 
void setErrors (const std::string &errors)
 
NodegetNodeFromNodeMap (std::string name)
 
- Public Member Functions inherited from YACS::ENGINE::RefCounter
unsigned int getRefCnt () const
 
void incrRef () const
 
bool decrRef ()
 

Public Attributes

std::map< std::string, TypeCode * > _typeMap
 
std::map< std::string,
ComponentDefinition * > 
_componentMap
 
std::map< std::string, Node * > _nodeMap
 
std::map< std::string,
ComposedNode * > 
_composednodeMap
 

Protected Attributes

std::string _name
 
std::string _errors
 
- Protected Attributes inherited from YACS::ENGINE::RefCounter
unsigned int _cnt
 

Additional Inherited Members

- Static Public Attributes inherited from YACS::ENGINE::RefCounter
static unsigned int _totalCnt =0
 
- Protected Member Functions inherited from YACS::ENGINE::RefCounter
 RefCounter ()
 
 RefCounter (const RefCounter &other)
 
virtual ~RefCounter ()
 

Detailed Description

class for YACS catalogs.

Definition at line 41 of file Catalog.hxx.

Constructor & Destructor Documentation

Catalog::Catalog ( const std::string &  name)

Definition at line 32 of file Catalog.cxx.

32  :_name(name)
33 {
34 }
Catalog::~Catalog ( )
virtual

Definition at line 36 of file Catalog.cxx.

References _componentMap, _composednodeMap, _nodeMap, _typeMap, and DEBTRACE.

37 {
38  DEBTRACE("Catalog::~Catalog");
39  //decref type codes in map
40  std::map<std::string, TypeCode *>::iterator pt;
41  for(pt=_typeMap.begin();pt!=_typeMap.end();pt++)
42  ((*pt).second)->decrRef();
43 
44  //get rid of component definitions in map
45  std::map<std::string, ComponentDefinition*>::const_iterator lt;
46  for(lt=_componentMap.begin();lt!=_componentMap.end();lt++)
47  delete (*lt).second;
48 
49  //get rid of nodes in map
50  std::map<std::string, Node*>::const_iterator nt;
51  for(nt=_nodeMap.begin();nt!=_nodeMap.end();nt++)
52  delete (*nt).second;
53 
54  //get rid of composed nodes in map
55  std::map<std::string, ComposedNode*>::const_iterator ct;
56  for(ct=_composednodeMap.begin();ct!=_composednodeMap.end();ct++)
57  delete (*ct).second;
58 
59 }

Member Function Documentation

std::string YACS::ENGINE::Catalog::getErrors ( )
inline

Definition at line 47 of file Catalog.hxx.

47 {return _errors;}
const std::string& YACS::ENGINE::Catalog::getName ( ) const
inline

Definition at line 46 of file Catalog.hxx.

46 { return _name; }
Node* YACS::ENGINE::Catalog::getNodeFromNodeMap ( std::string  name)
inline

Definition at line 53 of file Catalog.hxx.

53 {return _nodeMap[name];}
void YACS::ENGINE::Catalog::setErrors ( const std::string &  errors)
inline

Member Data Documentation

std::string YACS::ENGINE::Catalog::_errors
protected

Definition at line 56 of file Catalog.hxx.

std::string YACS::ENGINE::Catalog::_name
protected

Definition at line 55 of file Catalog.hxx.

std::map<std::string,Node*> YACS::ENGINE::Catalog::_nodeMap

The documentation for this class was generated from the following files: