OSB_LIB::ServiceItem Class Reference

Inheritance diagram for OSB_LIB::ServiceItem:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Service item keeps the available services (service tuple) to a product.

Each ServiceItem has a service tuple that represents an available service to a product.

Definition at line 144 of file serviceitem.h.

Public Types

Public Member Functions

Read access to data member:
Modify data members:

Static Public Attributes

Private Member Functions

Database operation:

Private Attributes

Friends


Member Typedef Documentation

typedef std::auto_ptr<ServiceItem> OSB_LIB::ServiceItem::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 155 of file serviceitem.h.


Constructor & Destructor Documentation

OSB_LIB::ServiceItem::ServiceItem ( const Oid oid  ) 

Constructor with only object id provided.

OSB_LIB::ServiceItem::ServiceItem ( const Oid oid,
const std::string &  name,
const std::string &  des,
const ServiceTuple st 
)

Constructor of the service item class.

This constructor will take in a service tuple and create an instance of service item that contains the said service tuple. Besides that, it also accept a parameter which indicates the type of personalization applied to this instance.

Parameters:
oid Database link of this object.
name Name of this service item.
des Description of this service Item.
st ServiceTuple that is to be represented.


Member Function Documentation

virtual ProductItem::CfgType OSB_LIB::ServiceItem::canConfigure (  )  const [inline, virtual]

The configuration type of service item (Mandatory).

Implements OSB_LIB::ProductItem.

Definition at line 206 of file serviceitem.h.

References OSB_LIB::ProductItem::cfgMandatory.

virtual ProductItem::DefPersType OSB_LIB::ServiceItem::canDefPers (  )  const [inline, virtual]

The default personalization type of service item (None).

Implements OSB_LIB::ProductItem.

Definition at line 212 of file serviceitem.h.

References OSB_LIB::ProductItem::defPersNone.

CfgPersType OSB_LIB::ServiceItem::canPersonalize (  )  const [virtual]

The personalization type of service item.

Implements OSB_LIB::ProductItem.

AutoPtr OSB_LIB::ServiceItem::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented from OSB_LIB::ProductItem.

virtual ProductItem* OSB_LIB::ServiceItem::clone_ (  )  const [private, virtual]

Virtual copy construction.

For details see quality manual, implementation patterns.

Implements OSB_LIB::ProductItem.

std::auto_ptr<PersProductItem> OSB_LIB::ServiceItem::crePersProductItem (  )  const [virtual]

Create an auto pointer of PersService.

This function will create an auto_ptr of PersService and initialize it with default personalization.

Returns:
An auto pointer to a PersService.

Implements OSB_LIB::ProductItem.

const PersProductItem* OSB_LIB::ServiceItem::defPersItem (  )  const [virtual]

Pointer to the default personalize product item.

Implements OSB_LIB::ProductItem.

virtual bool OSB_LIB::ServiceItem::delSpecific ( const OSB_DB::Session session  )  [private, virtual]

Delete a service item from the database.

Implements OSB_LIB::ProductItem.

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

Insert a service item into database.

Implements OSB_LIB::ProductItem.

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

Read a service item from database.

Implements OSB_LIB::ProductItem.

const ServiceTuple& OSB_LIB::ServiceItem::serviceTuple (  )  const

Retrieve the service tuple represented by this service item.

void OSB_LIB::ServiceItem::setServiceTuple ( const ServiceTuple service  ) 

Set the service represented by this service item.

Parameters:
service Service to be represented by this service item.

Type OSB_LIB::ServiceItem::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 183 of file serviceitem.h.

References type_.

virtual bool OSB_LIB::ServiceItem::updSpecific ( const OSB_DB::Session session  )  [private, virtual]

Updata a service item in the database.

Implements OSB_LIB::ProductItem.


Friends And Related Function Documentation

friend struct OSB_DB::ServiceItemGw [friend]

The database gateway needs to populate data members after construction.

Definition at line 149 of file serviceitem.h.


Member Data Documentation

PersService OSB_LIB::ServiceItem::defPersService_ [private]

Default personalize service item.

Definition at line 260 of file serviceitem.h.

ServiceTuple OSB_LIB::ServiceItem::serviceTuple_ [private]

ServiceTuple contained in this ServiceItem.

Definition at line 258 of file serviceitem.h.

const Type OSB_LIB::ServiceItem::type_ [static]

The product item type id: PiType::piService.

Definition at line 152 of file serviceitem.h.

Referenced by type().


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