OSB_LIB::TariffObject Class Reference

Inheritance diagram for OSB_LIB::TariffObject:

Inheritance graph
Collaboration diagram for OSB_LIB::TariffObject:

Collaboration graph
List of all members.

Detailed Description

Base class for tariff objects.

The main purpose of this class is to define a unique interface for all tariff objects.

Object identification

Because the OSB library uses typesafe object identifiers (see template class Id) this base class can not define the object id.
Derived classes should implement the object id as follows:

      class TariffSystem : public TariffObject {
          // Typesafe object identifier.
          typedef Id<TariffSystem> Oid;
          // Default constructor with optional object id.
          explicit TariffSystem(
              const Oid& oid = Oid()
          // Read access to object id.
          const Oid& oid() const { return oid_; };
          // Object identifier, database link.
          Oid oid_;

Definition at line 304 of file tariffobject.h.

Public Member Functions

Protected Member Functions

Protected Attributes

Constructor & Destructor Documentation

OSB_LIB::TariffObject::TariffObject (  )  [protected]

Default constructor.

Derived classes should provide a default constructor with optional object id (see class description).

virtual OSB_LIB::TariffObject::~TariffObject (  )  [protected, pure virtual]

Virtual empty destructor.

Member Function Documentation

const std::string& OSB_LIB::TariffObject::des (  )  const

Description of tariff object.

const std::string& OSB_LIB::TariffObject::name (  )  const

Name of tariff object.

long OSB_LIB::TariffObject::objVs (  )  const [protected]

Get object version.

TariffObject& OSB_LIB::TariffObject::operator= ( const TariffObject rhs  )  [protected]

Prevent assignment through base class.

void OSB_LIB::TariffObject::setDes ( const std::string &  des  ) 

Set the description.

des Description for the tariff object.
OsbException if des is too long.

void OSB_LIB::TariffObject::setName ( const std::string &  name  ) 

Set the name.

name Name for tariff object.
OsbException if name is empty.
OsbException if name is too long.

Member Data Documentation

std::string OSB_LIB::TariffObject::des_ [protected]

Description of tariff object.

Definition at line 366 of file tariffobject.h.

std::string OSB_LIB::TariffObject::name_ [protected]

Name of tariff object.

session Database session to use.
noWait Wait if locked by another session?
ObjectNotFound if the object as identified by its object id does not exist in the database.
ObjectModified if objVs_ does not match the object version in the database.
OsbException if noWait is true and another application has the object locked.

Definition at line 364 of file tariffobject.h.

long OSB_LIB::TariffObject::objVs_ [protected]

Object version: set by the gateways during database operations.

Definition at line 369 of file tariffobject.h.

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