The class is the simplest concrete implementation for a ProductItem. It only provides a product item id, a name and a description, no personalization is possible.
The main usage of the class is to provide a description for product nodes that are used solely as bucket of other product nodes.
Definition at line 535 of file productitem.h.
typedef std::auto_ptr<DescriptionItem> OSB_LIB::DescriptionItem::AutoPtr |
Short-cut for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Reimplemented from OSB_LIB::ProductItem.
Definition at line 540 of file productitem.h.
OSB_LIB::DescriptionItem::DescriptionItem | ( | const Oid & | oid, | |
const std::string & | name = "" , |
|||
const std::string & | des = "" | |||
) |
Constructor with object id, name and description.
ProductItem::CfgType OSB_LIB::DescriptionItem::canConfigure | ( | ) | const [inline, virtual] |
The configuration type of description item.
Implements OSB_LIB::ProductItem.
Definition at line 568 of file productitem.h.
References OSB_LIB::ProductItem::cfgNone.
ProductItem::DefPersType OSB_LIB::DescriptionItem::canDefPers | ( | ) | const [inline, virtual] |
The default personalization type of description item.
Implements OSB_LIB::ProductItem.
Definition at line 574 of file productitem.h.
References OSB_LIB::ProductItem::defPersNone.
CfgPersType OSB_LIB::DescriptionItem::canPersonalize | ( | ) | const [inline, virtual] |
The personalization type of description item: none.
Implements OSB_LIB::ProductItem.
Definition at line 580 of file productitem.h.
References OSB_LIB::ProductItem::persNone.
AutoPtr OSB_LIB::DescriptionItem::clone | ( | ) | const |
Virtual copy construction.
For details see quality manual, implementation patterns.
Reimplemented from OSB_LIB::ProductItem.
ProductItem* OSB_LIB::DescriptionItem::clone_ | ( | ) | const [private, virtual] |
Virtual copy construction.
For details see quality manual, implementation patterns.
Implements OSB_LIB::ProductItem.
std::auto_ptr<PersProductItem> OSB_LIB::DescriptionItem::crePersProductItem | ( | ) | const [virtual] |
No personalization is availble for this class.
Implements OSB_LIB::ProductItem.
const PersProductItem* OSB_LIB::DescriptionItem::defPersItem | ( | ) | const [inline, virtual] |
Pointer to the default personalize product item: always 0.
Implements OSB_LIB::ProductItem.
Definition at line 586 of file productitem.h.
bool OSB_LIB::DescriptionItem::delSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Delete type specific entries from the database.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
bool OSB_LIB::DescriptionItem::insSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Insert type specific members to the database.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
bool OSB_LIB::DescriptionItem::readSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Read type specific data members from database.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
Type OSB_LIB::DescriptionItem::type | ( | ) | const [inline, virtual] |
The type of the product item.
The function returns the type of the product item. It is needed for only one reason: Corba clients must provide a configuration window that depends on the actual type.
No appropriate design can be provided: Unless on-line clients use the real product item type through-out the whole live cycle of an object, there must be a way to determine the actual type of a product item. No matter how clever we make our design, for on-line clients there will always be one step where they need to determine a product item's type in a switch-like statement. For this step I personally perfer to work with an enumeration type (and compiler warnings) rather than relying on dynamic casts (where errors can be detected only during run-time).
Implements OSB_LIB::ProductItemBase.
Definition at line 557 of file productitem.h.
References type_.
bool OSB_LIB::DescriptionItem::updSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
Update type specific members in the database.
session | Database session to use. |
Implements OSB_LIB::ProductItem.
const Type OSB_LIB::DescriptionItem::type_ [static] |
Type id of the class: PiType::piDescItem.
Definition at line 538 of file productitem.h.
Referenced by type().