OSB_LIB::PersCallingCard Class Reference

Inheritance diagram for OSB_LIB::PersCallingCard:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Calling card as personalized item.

Definition at line 143 of file callingcard.h.

Public Types

Public Member Functions

Static Public Attributes

Private Member Functions

Database operations
All the database operations on personalized calling card do not commit or rollback the transactions. This is indicated by taking a const OSB_DB::Session as argument.

Private Attributes

Friends


Member Typedef Documentation

typedef std::auto_ptr<PersCallingCard> OSB_LIB::PersCallingCard::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 149 of file callingcard.h.


Constructor & Destructor Documentation

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

Constructor with optional object id.

OSB_LIB::PersCallingCard::PersCallingCard ( const PersCallingCard rhs  ) 

Copy constructor: copy create the assigned calling card.

OSB_LIB::PersCallingCard::~PersCallingCard (  ) 

Destructor: delete the assigned calling card.


Member Function Documentation

void OSB_LIB::PersCallingCard::assign ( const CallingCard rhs  )  [private]

Assign a calling card.

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

The configuration type of calling card item.

Implements OSB_LIB::PersProductItem.

AutoPtr OSB_LIB::PersCallingCard::clone (  )  const

Virtual copy construction.

For details see quality manual, implementation patterns.

Reimplemented from OSB_LIB::PersResource.

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

Internal virtual copy constructor.

For details see quality manual, implementation patterns.

Implements OSB_LIB::PersProductItem.

Resource* OSB_LIB::PersCallingCard::createResource ( const Resource::Oid resourceId  )  [private]

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

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

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

Non-const access to the previous assigned resource.

Returns:
A pointer to the previous assigned resource. It is 0 if no old resource is assigned.

Implements OSB_LIB::PersResource.

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

Documentation from base class.

Implements OSB_LIB::PersResource.

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

Assignment operator: copy create the assigned calling card.

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

Read pers calling card data from the database.

For calling cards no personalization specific data exists. The function just wraps to readPersResource().

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

Implements OSB_LIB::PersProductItem.

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

Non-const access to the assigned resource.

Returns:
A pointer to the assigned resource. It is 0 if no resource is assigned.

Implements OSB_LIB::PersResource.

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

Access to the assigned resource.

Returns:
A pointer to the assigned resource, it is 0 if no resource is assigned.

Implements OSB_LIB::PersResource.

Type OSB_LIB::PersCallingCard::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 164 of file callingcard.h.

References type_.

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


Friends And Related Function Documentation

friend class OSB_DB::CallingCardGw [friend]

Definition at line 144 of file callingcard.h.


Member Data Documentation

CallingCard* OSB_LIB::PersCallingCard::callingCard_ [private]

Definition at line 227 of file callingcard.h.

CallingCard* OSB_LIB::PersCallingCard::oldCallingCard_ [private]

Pointer to the previous assigned calling card.

Definition at line 229 of file callingcard.h.

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

The product item type id: PiType::piCallingCard.

Definition at line 147 of file callingcard.h.

Referenced by type().


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