RbuFactory Class Reference

AbstractFactory that produces IRbuHdr objects. More...

#include <DellRbu.h>

Inheritance diagram for RbuFactory:

IFactory List of all members.

Public Types

enum  { AutoDetectMode, UnitTestMode }
enum  { defaultMode = AutoDetectMode }

Public Member Functions

virtual ~RbuFactory () throw ()
virtual IRbuHdrmakeNew (std::string filename)=0
 Create a new IRbuHdr object that the caller must delete. (NOT RECOMMENDED).
virtual void setParameter (const std::string name, const std::string value)=0
virtual void setParameter (const std::string name, const u32 value)=0
virtual void setMode (const int mode)=0
virtual void reset ()=0
virtual std::string getParameterString (const std::string name) const=0
virtual u32 getParameterNum (const std::string name) const=0
virtual int getMode () const=0

Static Public Member Functions

static RbuFactorygetFactory ()
 Create a factory object that you can use to create IRbuHdr objects.

Protected Member Functions

 RbuFactory ()
 Use getFactory() to get a factory.

Detailed Description

AbstractFactory that produces IRbuHdr objects.

The RbuFactory class is based on the Factory design pattern. The RbuFactory is the recommended method to create IRbuHdr objects.

The getSingleton() is the recommended method to call to create tables. You need not delete the pointer returned by this method, it will be delete by the factory when it is reset() or destructed.

Most users of the factory need call nothing more than getFactory() and then getSingleton() on the returned factory object.

Advanced users can call setParameter() to set up internal factory variables that control creation of tables.

Definition at line 72 of file DellRbu.h.


Member Enumeration Documentation

anonymous enum [inherited]

Enumerator:
AutoDetectMode 
UnitTestMode 

Definition at line 57 of file IFactory.h.

anonymous enum [inherited]

Enumerator:
defaultMode 

Definition at line 58 of file IFactory.h.


Constructor & Destructor Documentation

~RbuFactory (  )  throw () [virtual]

Definition at line 40 of file RbuHdr.cpp.

RbuFactory (  )  [protected]

Use getFactory() to get a factory.

Definition at line 41 of file RbuHdr.cpp.


Member Function Documentation

RbuFactory * getFactory (  )  [static]

Create a factory object that you can use to create IRbuHdr objects.

Factory entry point: This is the method to call to get a handle to the RbuFactory. The RbuFactory is the recommended method to create IRbuHdr objects.

The getSingleton() is the recommended method to call to create tables. You need not delete the pointer returned by this method, it will be deleted by the factory when it is reset() or destructed.

Returns:
Singleton RbuFactory object pointer.

Definition at line 43 of file RbuHdr.cpp.

Referenced by testRbu::testRbuBadData().

virtual IRbuHdr* makeNew ( std::string  filename  )  [pure virtual]

Create a new IRbuHdr object that the caller must delete. (NOT RECOMMENDED).

The makeNew() method returns a pointer to a newly allocated IRbuHdr object. The caller is responsible for deleting this reference when it is finished with it. It is recommended that the caller store the pointer in an std::auto_ptr<IRbuHdr>.

The getSingleton() method is preferred over this method.

Returns:
(IRbuHdr *) -- caller must delete

virtual void setParameter ( const std::string  name,
const std::string  value 
) [pure virtual, inherited]

Implemented in TFactory< factory::IFactory >.

Referenced by testPlatform::testConstructionOffset2(), and testStandalone::testMemoryBadFiles().

virtual void setParameter ( const std::string  name,
const u32  value 
) [pure virtual, inherited]

Implemented in TFactory< factory::IFactory >.

virtual void setMode ( const int  mode  )  [pure virtual, inherited]

Implemented in TFactory< factory::IFactory >.

virtual void reset (  )  [pure virtual, inherited]

Implemented in TFactory< factory::IFactory >.

Referenced by testStandalone::testNonXml().

virtual std::string getParameterString ( const std::string  name  )  const [pure virtual, inherited]

Implemented in TFactory< factory::IFactory >.

virtual u32 getParameterNum ( const std::string  name  )  const [pure virtual, inherited]

Implemented in TFactory< factory::IFactory >.

virtual int getMode (  )  const [pure virtual, inherited]

Implemented in TFactory< factory::IFactory >.


The documentation for this class was generated from the following files:
Generated on Sat Apr 21 11:36:10 2007 for SMBIOS Library by  doxygen 1.5.2