Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AMOS::BankSet_t Class Reference

A non-redundant, complete collection of AMOS banks. More...

#include <universals_AMOS.hh>

List of all members.

Public Member Functions

 BankSet_t ()
 Constructs a BankSet_t w/ default banks.
 ~BankSet_t ()
 Destroys a UniveralSet_t and closes its contained banks.
iterator begin ()
 Returns an iterator to the beginning of the set.
const_iterator begin () const
void clearAll ()
 Issues a clear command to each bank in the set.
void closeAll ()
 Issues a close command to each bank in the set.
iterator end ()
 Returns an iterator to the end of the set.
const_iterator end () const
bool exists (NCode_t ncode)
 Checks if a bank with a given NCode exists in the set.
Size_t getSize ()
 Returns the number of known AMOS banks.
Bank_toperator[] (NCode_t ncode)
 Returns a reference to the bank with the given NCode.
const Bank_toperator[] (NCode_t ncode) const
Bank_toperator[] (const std::string &ncode)
const Bank_toperator[] (const std::string &ncode) const


Detailed Description

A non-redundant, complete collection of AMOS banks.

Provides a non-redundant, complete collection of static AMOS banks accessible by their NCode and iteration. Useful when all possible AMOS banks are required, but the exact makeup of banks is unknown. Banks stored in this set are static, and only destruced when the class is destructed. Banks are stored in order that will preserve the def-before-ref rule - meaning two banks A,B where B has a link to A will always appear in the order A,B when iterating through the set.

Definition at line 241 of file universals_AMOS.hh.


Constructor & Destructor Documentation

BankSet_t::BankSet_t  ) 
 

Constructs a BankSet_t w/ default banks.

Definition at line 73 of file universals_AMOS.cc.

References begin(), and end().

BankSet_t::~BankSet_t  ) 
 

Destroys a UniveralSet_t and closes its contained banks.

Definition at line 93 of file universals_AMOS.cc.

References begin(), and end().


Member Function Documentation

const_iterator AMOS::BankSet_t::begin  )  const [inline]
 

Definition at line 325 of file universals_AMOS.hh.

References begin().

iterator AMOS::BankSet_t::begin  )  [inline]
 

Returns an iterator to the beginning of the set.

Iterator on all the banks in the set. Operates just like a std::vector iterator, however it does not support iterator addition/subtraction or reverse iteration. Banks will always be ordered definition-before-reference, meaning if B refers to A, A will always appear before B when iterating forward.

Returns:
An iterator to the beginning of the set
Definition at line 324 of file universals_AMOS.hh.

Referenced by BankSet_t(), begin(), clearAll(), closeAll(), and ~BankSet_t().

void BankSet_t::clearAll  ) 
 

Issues a clear command to each bank in the set.

Returns:
void
Definition at line 104 of file universals_AMOS.cc.

References begin(), and end().

void BankSet_t::closeAll  ) 
 

Issues a close command to each bank in the set.

Returns:
void
Definition at line 112 of file universals_AMOS.cc.

References begin(), and end().

const_iterator AMOS::BankSet_t::end  )  const [inline]
 

Definition at line 350 of file universals_AMOS.hh.

References end().

iterator AMOS::BankSet_t::end  )  [inline]
 

Returns an iterator to the end of the set.

Returns:
An iterator to the end of the set
Definition at line 349 of file universals_AMOS.hh.

References end().

Referenced by BankSet_t(), clearAll(), closeAll(), end(), exists(), operator[](), and ~BankSet_t().

bool AMOS::BankSet_t::exists NCode_t  ncode  )  [inline]
 

Checks if a bank with a given NCode exists in the set.

Returns:
true if it exists, false otherwise
Definition at line 358 of file universals_AMOS.hh.

References end(), and AMOS::NCode_t.

Size_t AMOS::BankSet_t::getSize  )  [inline]
 

Returns the number of known AMOS banks.

Returns:
The number of banks in the set
Definition at line 369 of file universals_AMOS.hh.

References AMOS::Size_t.

const Bank_t& AMOS::BankSet_t::operator[] const std::string &  ncode  )  const [inline]
 

Definition at line 411 of file universals_AMOS.hh.

References AMOS::Encode(), and operator[]().

Bank_t& AMOS::BankSet_t::operator[] const std::string &  ncode  )  [inline]
 

Definition at line 404 of file universals_AMOS.hh.

References AMOS::Encode(), and operator[]().

const Bank_t& AMOS::BankSet_t::operator[] NCode_t  ncode  )  const [inline]
 

Definition at line 393 of file universals_AMOS.hh.

References AMOS_THROW_ARGUMENT, AMOS::Decode(), end(), and AMOS::NCode_t.

Bank_t& AMOS::BankSet_t::operator[] NCode_t  ncode  )  [inline]
 

Returns a reference to the bank with the given NCode.

Precondition:
The NCode exists in the set
Exceptions:
ArgumentException_t 
Returns:
Pointer to the bank with the given NCode
Definition at line 382 of file universals_AMOS.hh.

References AMOS_THROW_ARGUMENT, AMOS::Decode(), end(), and AMOS::NCode_t.

Referenced by operator[]().


The documentation for this class was generated from the following files:
Generated on Tue May 17 15:19:52 2005 for libAMOS by doxygen 1.3.8