OSB_LIB::RoundRuleList Class Reference

Collaboration diagram for OSB_LIB::RoundRuleList:

Collaboration graph
[legend]
List of all members.

Detailed Description

Manager of RoundRules, implemented as a singleton.

Definition at line 266 of file roundrule.h.

Public Types

STL container type definitions

Public Member Functions

Pure wrappers to the STL container
Remarks:
Do not add an STL operation to this group if the function does more than just wrapping!
All functions return the STL operation on list_.

Private Attributes


Member Typedef Documentation

typedef List::const_iterator OSB_LIB::RoundRuleList::ConstIterator

STL const_iterator.

Definition at line 275 of file roundrule.h.

typedef List::iterator OSB_LIB::RoundRuleList::Iterator

STL iterator.

Definition at line 273 of file roundrule.h.

typedef std::vector<RoundRule*> OSB_LIB::RoundRuleList::List

STL container type used to store the pointer of object.

Definition at line 271 of file roundrule.h.

typedef List::size_type OSB_LIB::RoundRuleList::SizeType

STL container size_type.

Definition at line 277 of file roundrule.h.


Constructor & Destructor Documentation

OSB_LIB::RoundRuleList::RoundRuleList (  )  [inline]

Empty constructor.

Definition at line 281 of file roundrule.h.

OSB_LIB::RoundRuleList::RoundRuleList ( const RoundRuleList rhs  ) 

Copy constructor.

Creates (allocates) a copy for each round rule in the STL container.

OSB_LIB::RoundRuleList::~RoundRuleList (  ) 

Delete all stored objects.


Member Function Documentation

ConstIterator OSB_LIB::RoundRuleList::begin (  )  const [inline]

Const iterator to the beginning of the list.

Definition at line 310 of file roundrule.h.

References list_.

Iterator OSB_LIB::RoundRuleList::begin (  )  [inline]

Iterator to the beginning of the list.

Definition at line 306 of file roundrule.h.

References list_.

void OSB_LIB::RoundRuleList::clear (  ) 

Clear the list.

Destructs each item in the list and afterwards calls clear() of the STL container.

ConstIterator OSB_LIB::RoundRuleList::end (  )  const [inline]

Const iterator to the end of the list.

Definition at line 312 of file roundrule.h.

References list_.

Iterator OSB_LIB::RoundRuleList::end (  )  [inline]

Iterator to the end of the list.

Definition at line 308 of file roundrule.h.

References list_.

Iterator OSB_LIB::RoundRuleList::erase ( Iterator  pos  ) 

Erase a round rule from the list.

Removes a round rule from the list and calls its destructor.

Parameters:
pos iterator to the round rule to remove.
Returns:
An iterator to the following element of the list.

const RoundRule* OSB_LIB::RoundRuleList::findRoundRule ( const RoundRule::Oid oid  )  const

Find the round rule based on the given oid.

Parameters:
oid Oid of the round rule.
Returns:
Pointer to the round rule,
NULL pointer if round rule can not be found.

const RoundRule& OSB_LIB::RoundRuleList::getRoundRule ( const RoundRule::Oid oid  )  const

Find the round rule based on the given oid.

Parameters:
oid Oid of the round rule.
Returns:
Reference to the round rule.
Exceptions:
OsbException if round rule can not be found.

RoundRule::Oid OSB_LIB::RoundRuleList::getRoundRuleByName ( const std::string &  name  )  const

Find the round rule based on the given name.

Parameters:
name Name of the round rule.
Returns:
Unique id of the round rule if found else return ID_NOT_SET.

const List& OSB_LIB::RoundRuleList::list (  )  const [inline]

Access to the list of round rules.

Definition at line 370 of file roundrule.h.

References list_.

RoundRuleList& OSB_LIB::RoundRuleList::operator= ( const RoundRuleList rhs  ) 

Exception save assignment operator.

void OSB_LIB::RoundRuleList::push_back ( RoundRule::AutoPtr  ap  ) 

Insert a new round rule.

Adds a new round rule at the end of the internal list. The function takes the ownership of the argument pointer, it is typically called like this:

          RoundRuleList list;
          RoundRule::AutoPtr a = createRoundRule(...);
          // work with a
          list.push_back(a);

Parameters:
ap Auto pointer owning round rule to add.

void OSB_LIB::RoundRuleList::push_back ( const RoundRule rr  ) 

Insert a new round rule.

Adds a round rule at the end of the list. The function uses rr.clone() to create a copy of the round rule.

Parameters:
rr Round rule to add.
Remarks:
Overload this function as needed. If a pointer is passed as function argument make it VERY CLEAR whether or not the function takes ownership of the pointer.

long OSB_LIB::RoundRuleList::read ( const OSB_DB::Session session  ) 

Read all round rules from the database.

Parameters:
session Database session to use, transactions are not commited.
Returns:
Number of round rules read.

SizeType OSB_LIB::RoundRuleList::size (  )  const [inline]

The size of the list.

Definition at line 314 of file roundrule.h.

References list_.

void OSB_LIB::RoundRuleList::swap ( RoundRuleList rhs  ) 

Swap the content of two lists.


Member Data Documentation

List OSB_LIB::RoundRuleList::list_ [private]

The STL container with the round rule.

Definition at line 410 of file roundrule.h.

Referenced by begin(), end(), list(), and size().


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:13:02 2006 for OSB Library by  doxygen 1.4.7