OSB_LIB::PersTrunk Class Reference

Inheritance diagram for OSB_LIB::PersTrunk:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Trunk resource as personalized items.

ToDo: Description.

Definition at line 261 of file trunkresource.h.

Public Types

Public Member Functions

Static Public Attributes

Private Member Functions

Database operations:
ToDo: currently not implemented!

Private Attributes


Member Typedef Documentation

typedef std::auto_ptr<PersTrunk> OSB_LIB::PersTrunk::AutoPtr

Short-cut for an auto pointer.

For details see quality manual, implementation patterns: Virtual copy construction.

Reimplemented from OSB_LIB::PersResource.

Definition at line 264 of file trunkresource.h.


Constructor & Destructor Documentation

OSB_LIB::PersTrunk::PersTrunk ( const Oid oid = Oid()  ) 

Constructor with optional object id.

OSB_LIB::PersTrunk::PersTrunk ( const PersTrunk rhs  ) 

Copy constructor: copy create the assigned trunk resource.

OSB_LIB::PersTrunk::~PersTrunk (  ) 

Destructor: delete the assigned trunk resource.


Member Function Documentation

void OSB_LIB::PersTrunk::assign ( const TrunkResource trunkResource  ) 

Assign a trunk resource.

virtual bool OSB_LIB::PersTrunk::canConfig (  )  const [virtual]

The configuration type of personalized trunk.

Returns:
true: Personalized trunks allow to assign a TrunkResource.

Implements OSB_LIB::PersProductItem.

AutoPtr OSB_LIB::PersTrunk::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented from OSB_LIB::PersResource.

PersProductItem* OSB_LIB::PersTrunk::clone_ (  )  const [private, virtual]

Internal virtual copy constructor.

For details see quality manual, implementation patterns.

Implements OSB_LIB::PersProductItem.

virtual Resource* OSB_LIB::PersTrunk::createResource ( const Resource::Oid resourceId  )  [private, virtual]

Documentation from base class.

virtual bool OSB_LIB::PersTrunk::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::PersProductItem.

virtual bool OSB_LIB::PersTrunk::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.

Implements OSB_LIB::PersProductItem.

virtual Resource* OSB_LIB::PersTrunk::oldResource (  )  [private, virtual]

Documentation from base class.

Implements OSB_LIB::PersResource.

virtual const Resource* OSB_LIB::PersTrunk::oldResource (  )  const [virtual]

Documentation from base class.

Implements OSB_LIB::PersResource.

PersTrunk& OSB_LIB::PersTrunk::operator= ( const PersTrunk rhs  ) 

Assignment operator: copy create the assigned trunk resource.

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

Read a pers. trunk from the database.

ToDo: implement, describe logic. Doc of return: ToDo: Doc of return: what about the trunk resource?

Parameters:
session Database session to use.
Exceptions:
OsbException in case of database error.
Returns:
true if the pers. trunk exists in the database and was successfully read.

Implements OSB_LIB::PersProductItem.

virtual Resource* OSB_LIB::PersTrunk::resource (  )  [private, virtual]

Documentation from base class.

Implements OSB_LIB::PersResource.

virtual const Resource* OSB_LIB::PersTrunk::resource (  )  const [virtual]

Documentation from base class.

Implements OSB_LIB::PersResource.

virtual Type OSB_LIB::PersTrunk::type (  )  const [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.

virtual bool OSB_LIB::PersTrunk::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::PersProductItem.


Member Data Documentation

TrunkResource* OSB_LIB::PersTrunk::oldTrunkResource_ [private]

Pointer to the previous assigned trunk resource.

Definition at line 351 of file trunkresource.h.

TrunkResource* OSB_LIB::PersTrunk::trunkResource_ [private]

Pointer to the assigned trunk resource.

Definition at line 349 of file trunkresource.h.

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

The product item type id: PiType::piTrunkItem.

Definition at line 267 of file trunkresource.h.


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