OSB_LIB::NumberAnalyzerFactory Class Reference

List of all members.

Detailed Description

Factory for number analyzer.

The class create a number analyzer of the appropriate type. The class is purely static, no object of the class should be instantiated: The default and copy constructor are declared private and not implemented.

Definition at line 60 of file numberanalyzerfactory.h.

Static Public Member Functions

Private Member Functions


Constructor & Destructor Documentation

OSB_LIB::NumberAnalyzerFactory::NumberAnalyzerFactory (  )  [private]

Prevent constrction: not implemented.

OSB_LIB::NumberAnalyzerFactory::NumberAnalyzerFactory ( const NumberAnalyzerFactory  )  [private]

Prevent construction: not implemented.


Member Function Documentation

static NumberAnalyzer::AutoPtr OSB_LIB::NumberAnalyzerFactory::create ( const NumberAnalyzer::NumberAnalyzerType type,
const NumberAnalyzer::Oid oid = NumberAnalyzer::Oid() 
) [static]

Create a number analyzer of a specified type.

This function can be used to create a new number analyzer or to create an existing number analyzer.

Create new number analyzer:

          NumberAnalyzer::AutoPtr ptr = NumberAnalyzerFactory.create(na01);
          ptr->setTgId(tgId);
          ...
          ptr->insert(session);

Create an existing number analyzer:

          NumberAnalyzer::AutoPtr ptr =
              NumberAnalyzerFactory.create(na01, naId);
          ptr->read(session);

Parameters:
type Identify the type of number analyzer to create.
oid Object id of the number analyzer to create.
Returns:
An auto pointer that owns a number analyzer of the requested type and object id. Other data members are all empty. If the requested type is not supported, the auto pointer will be 0.
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:15:50 2006 for OSB Library by  doxygen 1.4.7