OSB_LIB::BillcycleList Class Reference

Collaboration diagram for OSB_LIB::BillcycleList:

Collaboration graph
[legend]
List of all members.

Detailed Description

Manager of Billcycles.

Definition at line 379 of file billcycle.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::BillcycleList::ConstIterator

STL const_iterator.

Definition at line 388 of file billcycle.h.

typedef List::iterator OSB_LIB::BillcycleList::Iterator

STL iterator.

Definition at line 386 of file billcycle.h.

typedef std::vector<Billcycle*> OSB_LIB::BillcycleList::List

STL container type used to store the pointer of object.

Definition at line 384 of file billcycle.h.

typedef List::size_type OSB_LIB::BillcycleList::SizeType

STL container size_type.

Definition at line 390 of file billcycle.h.


Constructor & Destructor Documentation

OSB_LIB::BillcycleList::BillcycleList (  )  [inline]

Empty constructor.

Definition at line 394 of file billcycle.h.

OSB_LIB::BillcycleList::BillcycleList ( const BillcycleList rhs  ) 

Copy constructor.

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

OSB_LIB::BillcycleList::~BillcycleList (  ) 

Delete all stored objects.


Member Function Documentation

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

Const iterator to the beginning of the list.

Definition at line 423 of file billcycle.h.

References list_.

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

Iterator to the beginning of the list.

Definition at line 419 of file billcycle.h.

References list_.

void OSB_LIB::BillcycleList::clear (  ) 

Clear the list.

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

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

Const iterator to the end of the list.

Definition at line 425 of file billcycle.h.

References list_.

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

Iterator to the end of the list.

Definition at line 421 of file billcycle.h.

References list_.

Iterator OSB_LIB::BillcycleList::erase ( Iterator  pos  ) 

Erase a billcycle from the list.

Removes a billcycle from the list and calls its destructor.

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

Billcycle* OSB_LIB::BillcycleList::findBillcycle ( const Billcycle::Oid oid  )  const

Find the billcycle based on the given oid.

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

Billcycle& OSB_LIB::BillcycleList::getBillcycle ( const Billcycle::Oid oid  )  const

Find the billcycle based on the given oid.

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

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

Access to the list of billcycles.

Definition at line 483 of file billcycle.h.

References list_.

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

Exception save assignment operator.

void OSB_LIB::BillcycleList::push_back ( Billcycle::AutoPtr  ap  ) 

Insert a new billcycle.

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

          BillcycleList list;
          Billcycle::AutoPtr a = createBillcycle(...);
          // work with a
          list.push_back(a);

Parameters:
ap Auto pointer owning billcycle to add.

void OSB_LIB::BillcycleList::push_back ( const Billcycle bc  ) 

Insert a new billcycle.

Adds a billcycle at the end of the list. The function uses bc.clone() to create a copy of the billcycle.

Parameters:
bc billcycle 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::BillcycleList::read ( const OSB_DB::Session session  ) 

Read all billcycles from the database.

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

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

The size of the list.

Definition at line 427 of file billcycle.h.

References list_.

void OSB_LIB::BillcycleList::swap ( BillcycleList rhs  ) 

Swap the content of two lists.


Member Data Documentation

List OSB_LIB::BillcycleList::list_ [private]

The STL container with the billcycle.

Definition at line 514 of file billcycle.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:10:52 2006 for OSB Library by  doxygen 1.4.7