OSB_LIB::TariffObject Class Reference

Inheritance diagram for OSB_LIB::TariffObject:

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

Collaboration graph
[legend]
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 {
      public:
          // Typesafe object identifier.
          typedef Id<TariffSystem> Oid;
      public:
          // Default constructor with optional object id.
          explicit TariffSystem(
              const Oid& oid = Oid()
          );
          // Read access to object id.
          const Oid& oid() const { return oid_; };
      private:
          // 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.

Note:
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.

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

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

Set the name.

Parameters:
name Name for tariff object.
Exceptions:
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.

Parameters:
session Database session to use.
noWait Wait if locked by another session?
Exceptions:
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