OSB_LIB::DescriptionItem Class Reference

Inheritance diagram for OSB_LIB::DescriptionItem:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::DescriptionItem:

Collaboration graph
[legend]
List of all members.

Detailed Description

Descriptive product item.

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.

Public Types

Public Member Functions

Static Public Attributes

Private Member Functions

Database operations
DescriptionItem doesn't need specialized database operations: All related function just return true.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

OSB_LIB::DescriptionItem::DescriptionItem ( const Oid oid,
const std::string &  name = "",
const std::string &  des = "" 
)

Constructor with object id, name and description.

Remarks:
Copy constructor, assignment and destructor from compiler.


Member Function Documentation

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.

Returns:
The function returns 0.

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.

Parameters:
session Database session to use.
Returns:
True if the item was found and deleted from the database, else false.

Implements OSB_LIB::ProductItem.

bool OSB_LIB::DescriptionItem::insSpecific ( const OSB_DB::Session session  )  [private, virtual]

Insert type specific members to the database.

Parameters:
session Database session to use.
Returns:
True if the item was inserted into the database, else false.

Implements OSB_LIB::ProductItem.

bool OSB_LIB::DescriptionItem::readSpecific ( const OSB_DB::Session session  )  [private, virtual]

Read type specific data members from database.

Parameters:
session Database session to use.
Returns:
True if the item was found and read from the database, else false.

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).

Remarks:
Derived classes declare the function private.

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.

Parameters:
session Database session to use.
Returns:
True if the item was found and updated in the database, else false.

Implements OSB_LIB::ProductItem.


Member Data Documentation

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().


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