OSB_LIB::RoundRuleFactory Class Reference

List of all members.

Detailed Description

Factory for round rule.

The class create a round rule of appropriate type based on the (hardcoded) type identifier of the round rule class.

The class is purely static, no object of the class should be instantiated: The default and copy constructors are declared private and not implemented.

Definition at line 425 of file roundrule.h.

Static Public Member Functions

Private Member Functions


Constructor & Destructor Documentation

OSB_LIB::RoundRuleFactory::RoundRuleFactory (  )  [private]

Prevent construction: not implemented.

OSB_LIB::RoundRuleFactory::RoundRuleFactory ( const RoundRuleFactory rhs  )  [private]

Prevent construction: not implemented.


Member Function Documentation

static RoundRule::AutoPtr OSB_LIB::RoundRuleFactory::create ( const RoundRule::Type type,
const RoundRule::Oid oid,
const std::string &  name,
const std::string &  desc,
const Decimal threshold,
const Decimal multiple 
) [static]

Create a round rule.

Parameters:
type Identifies the type of round rule to create.
oid Object id of the new round rule.
name Name of the new round rule.
desc Description of the new round rule.
threshold Threshold of rounding Up rule.
multiple Rounding "grid spacing".
Returns:
An auto pointer that owns a round rule of the requested type. If the round rule type is not supported, the pointer is 0.
Exceptions:
OsbException It throws OsbException(16) if threshold and multiple is null for RoundUp rounding rule;
It throws OsbException(18) if threshold and multiple is not null for DontRound rounding rule.
Remarks:
The caller of the function should check the content of the returned auto pointer and take appropriate action (e.g. throw an exception) if it is 0.

static RoundRule::AutoPtr OSB_LIB::RoundRuleFactory::create ( const RoundRule::Type type,
const RoundRule::Oid oid,
const Decimal threshold,
const Decimal multiple 
) [static]

Create a round rule.

Parameters:
type Identifies the type of round rule to create.
oid Object id of the new round rule.
threshold Threshold of rounding Up rule.
multiple Rounding "grid spacing".
Returns:
An auto pointer that owns a round rule of the requested type. If the round rule type is not supported, the pointer is 0.
Exceptions:
OsbException It throws OsbException(16) if threshold and multiple is null for RoundUp rounding rule;
It throws OsbException(18) if threshold and multiple is not null for DontRound rounding rule.
Remarks:
The caller of the function should check the content of the returned auto pointer and take appropriate action (e.g. throw an exception) if it is 0.


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