OSB_LIB::ProductItemFactory Class Reference

List of all members.

Detailed Description

Factory for product items.

The class creates a product item of the appropriate type based on the (hardcoded) type identifier of the product item class.

The class is purely static, no objects of the class should be instantiated: The default and the copy constructor are declared private and not implemented.

Definition at line 71 of file productitemfactory.h.

Static Public Member Functions

Private Member Functions


Constructor & Destructor Documentation

OSB_LIB::ProductItemFactory::ProductItemFactory (  )  [private]

Prevent construction: not implemented.

OSB_LIB::ProductItemFactory::ProductItemFactory ( const ProductItemFactory rhs  )  [private]

Prevent construction: not implemented.


Member Function Documentation

static PersProductItem::AutoPtr OSB_LIB::ProductItemFactory::create ( ProductItem::Type  type,
const PersProductItem::Oid oid 
) [static]

Create a personalized product item.

Parameters:
type Identifies the type of object to create.
oid Object id of the new pers. product item.
Returns:
An auto pointer that owns a product item of the requested type. The pointer is 0 if either
  • the product item type is not supported OR
  • no pers. product item for this type exist.
Remarks:
The caller of the function is responsible to check the content of the returned auto pointer.

Even if a new product item type can not be personalized, the related type id should be added to the function body. This avoids later research work about the missing type.

static ProductItem::AutoPtr OSB_LIB::ProductItemFactory::create ( ProductItem::Type  type,
const ProductItem::Oid oid 
) [static]

Create a product item.

Parameters:
type Identifies the type of object to create.
oid Object id of the new product item.
Returns:
An auto pointer that owns a product item of the requested type. If the product item type is not supported the pointer is 0.
Remarks:
The caller of the function should check the content of the returned auto pointer and take appropriate measures (e.g. throw an exception) if it is 0.


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