Each ServiceItem has a service tuple that represents an available service to a product.
Definition at line 144 of file serviceitem.h.
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.
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.
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. |
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] |
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.
Implements OSB_LIB::ProductItem.
const PersProductItem* OSB_LIB::ServiceItem::defPersItem | ( | ) | const [virtual] |
virtual bool OSB_LIB::ServiceItem::delSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
virtual bool OSB_LIB::ServiceItem::insSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
virtual bool OSB_LIB::ServiceItem::readSpecific | ( | const OSB_DB::Session & | session | ) | [private, virtual] |
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.
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).
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] |
friend struct OSB_DB::ServiceItemGw [friend] |
The database gateway needs to populate data members after construction.
Definition at line 149 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().