OSB_LIB::RatingFns Class Reference

Collaboration diagram for OSB_LIB::RatingFns:

Collaboration graph
[legend]
List of all members.

Detailed Description

Container for a list of rating functions.

RatingFn is an abstract base class. This means that we have to store pointers to the rating function in the list and not the objects themselves. The structure is a wrapper to an STL container that takes care on correct object desstruction.

Definition at line 534 of file ratingfn.h.

Public Types

STL container type definition.

Public Member Functions

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


Private Attributes

Friends


Member Typedef Documentation

typedef List::const_iterator OSB_LIB::RatingFns::ConstIterator

STL const_iterator.

Definition at line 566 of file ratingfn.h.

typedef List::iterator OSB_LIB::RatingFns::Iterator

STL iterator.

Definition at line 564 of file ratingfn.h.

typedef std::list<RatingFn*> OSB_LIB::RatingFns::List

Define a list of rating function pointer as List.

Definition at line 562 of file ratingfn.h.

typedef List::size_type OSB_LIB::RatingFns::SizeType

STL container size_type.

Definition at line 568 of file ratingfn.h.


Constructor & Destructor Documentation

OSB_LIB::RatingFns::RatingFns (  )  [inline]

Empty constructor.

Definition at line 543 of file ratingfn.h.

OSB_LIB::RatingFns::RatingFns ( const RatingFns rhs  ) 

Copy constructor.

Creates (allocates) a copy of every rating function in the STL container.

OSB_LIB::RatingFns::~RatingFns (  ) 

Delete all stored objects.


Member Function Documentation

ConstIterator OSB_LIB::RatingFns::begin (  )  const

Const iterator to the begining of the list.

Iterator OSB_LIB::RatingFns::begin (  ) 

Iterator to the begining of the list.

void OSB_LIB::RatingFns::clear (  ) 

Clear the list.

Destruct each item in the list and afterwards, call the std::list::clear() of the STL container.

ConstIterator OSB_LIB::RatingFns::end (  )  const

Const iterator to the end of the list.

Iterator OSB_LIB::RatingFns::end (  ) 

Iterator to the end of the list.

void OSB_LIB::RatingFns::erase ( const RatingFn rf  ) 

Erase a rating function from the list.

Remove a rating function from the list and call its destructor.

Parameters:
rf Rating function to be removed.

const RatingFn* OSB_LIB::RatingFns::findRatingFn ( const RatingFn::Oid id  )  const

Find a rating function based on id.

Parameters:
id Unique id of a rating function.
Returns:
Pointer to the rating function, NULL pointer if rating function can not be found.

List& OSB_LIB::RatingFns::getList (  )  [inline]

Return list of rating functions.

Definition at line 595 of file ratingfn.h.

References items_.

const RatingFn& OSB_LIB::RatingFns::getRatingFn ( const RatingFn::Oid id  )  const

Find a rating function based on id.

Parameters:
id Unique id of a rating function.
Exceptions:
ObjectNotFound if rating function not found.
Returns:
Reference to the rating function.

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

Return list of rating functions.

Definition at line 592 of file ratingfn.h.

References items_.

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

Exception save assignment operator.

void OSB_LIB::RatingFns::pushBack ( RatingFn::AutoPtr  rf  ) 

Insert a new rating function.

Adds a rating function at the end of the list. The function uses RatingFn::clone() to create a copy of the rating function.

Parameters:
rf Auto pointer of rating function to be added.

void OSB_LIB::RatingFns::pushBack ( const RatingFn rf  ) 

Insert a new rating function.

Adds a rating function at the end of the list. The function uses RatingFn::clone() to create a copy of the rating function.

Parameters:
rf Rating function to be added.

RatingFn* OSB_LIB::RatingFns::ratingFn ( const RatingFn::Oid id  )  const

Find a rating function based on id.

Parameters:
id Unique id of a rating function.
Returns:
Pointer to the rating function, NULL pointer if rating function can not be found.

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

Read all rating functions from the database.

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

SizeType OSB_LIB::RatingFns::size (  )  const

The size of the list.

void OSB_LIB::RatingFns::swap ( RatingFns rhs  ) 

Swap the content of two lists.


Friends And Related Function Documentation

friend struct OSB_DB::RatingFnGw [friend]

The database gateway needs to populate data members after construction.

Definition at line 539 of file ratingfn.h.


Member Data Documentation

List OSB_LIB::RatingFns::items_ [private]

STL container for rating functions.

Definition at line 681 of file ratingfn.h.

Referenced by getList(), and list().


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