The class stores the personalized product items of a pers. product node for a given period of time. The goals of the class are:
Definition at line 80 of file persitems.h.
typedef List::const_iterator OSB_LIB::PersProductItems::ConstIterator |
typedef List::iterator OSB_LIB::PersProductItems::Iterator |
typedef std::list<PersProductItem*> OSB_LIB::PersProductItems::List |
typedef List::size_type OSB_LIB::PersProductItems::SizeType |
OSB_LIB::PersProductItems::PersProductItems | ( | ) | [inline] |
Default constructor.
The default constructor set the flag itemsRead_ to false.
Definition at line 105 of file persitems.h.
OSB_LIB::PersProductItems::PersProductItems | ( | const PersProductItems & | rhs | ) |
Copy constructor: make a deep copy of the items.
OSB_LIB::PersProductItems::~PersProductItems | ( | ) |
Destructor: delete all pers. items in the list.
ConstIterator OSB_LIB::PersProductItems::begin | ( | ) | const [inline] |
Const iterator to the beginning of the list.
Definition at line 142 of file persitems.h.
References items_.
Iterator OSB_LIB::PersProductItems::begin | ( | ) | [inline] |
Iterator to the beginning of the list.
Definition at line 138 of file persitems.h.
References items_.
void OSB_LIB::PersProductItems::clear | ( | ) |
Clear the item list.
ConstIterator OSB_LIB::PersProductItems::end | ( | ) | const [inline] |
Const iterator to the end of the list.
Definition at line 144 of file persitems.h.
References items_.
Iterator OSB_LIB::PersProductItems::end | ( | ) | [inline] |
bool OSB_LIB::PersProductItems::erase | ( | const Id< PersProductItem > & | id | ) |
const PersProductItem* OSB_LIB::PersProductItems::find | ( | const Id< PersProductItem > & | id | ) | const |
Find a pers. item by its object id.
id | Id of the pers. item to find. |
const PersProductItem& OSB_LIB::PersProductItems::front | ( | ) | const [inline] |
PersProductItem& OSB_LIB::PersProductItems::front | ( | ) | [inline] |
const List& OSB_LIB::PersProductItems::items | ( | ) | const [inline] |
bool OSB_LIB::PersProductItems::itemsRead | ( | ) | const [inline] |
Flag if the pers. items have been read from the database.
The flag is set to true after the pers. product items are successfully read from the database.
Definition at line 125 of file persitems.h.
References itemsRead_.
PersProductItems& OSB_LIB::PersProductItems::operator= | ( | const PersProductItems & | rhs | ) |
Exception save assignment operator.
void OSB_LIB::PersProductItems::pushBack | ( | const PersProductItem & | item | ) |
Add an item to the list.
Adds a personalized item to the list. The function uses item.clone() to create a copy of the item and calls pushBack() with the returned auto pointer. The implementation is:
pushBack(item.clone());
item | Pers. product item to add. |
void OSB_LIB::PersProductItems::pushBack | ( | std::auto_ptr< PersProductItem > | pItem | ) |
Add an item to the list.
Adds a personalized item to the list. The function takes the ownership of the auto pointer's content and calls pushBack() of the STL container. The implementation is:
items_.push_back(pItem.release());
pItem | Auto pointer that owns the item to add. |
bool OSB_LIB::PersProductItems::replace | ( | std::auto_ptr< PersProductItem > | pItem | ) |
SizeType OSB_LIB::PersProductItems::size | ( | ) | const [inline] |
void OSB_LIB::PersProductItems::swap | ( | PersProductItems & | rhs | ) |
Swap the content of two lists.
friend class OSB_DB::PersProductGw [friend] |
After the personalized product items have been successfully read from the database, the gateway class sets `itemsRead_' to true.
Definition at line 86 of file persitems.h.
List OSB_LIB::PersProductItems::items_ [private] |
bool OSB_LIB::PersProductItems::itemsRead_ [private] |
Pers. items read from the database?
Definition at line 227 of file persitems.h.
Referenced by itemsRead().