#include <ISmbios.h>
Inheritance diagram for SmbiosFactory:
Public Types | |
enum | { AutoDetectMode, UnitTestMode } |
enum | { defaultMode = AutoDetectMode } |
Public Methods | |
virtual | ~SmbiosFactory () throw () |
virtual ISmbiosTable * | getSingleton ()=0 |
Recommended way to get an ISmbiosTable object. | |
virtual ISmbiosTable * | makeNew ()=0 |
Create a new ISmbiosTable 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 Methods | |
SmbiosFactory * | getFactory () |
Create a factory object that you can use to create ISmbiosTable objects. | |
Protected Methods | |
SmbiosFactory () | |
Use getFactory() to get a factory. |
The SmbiosFactory class is based on the Factory design pattern. The SmbiosFactory is the recommended method to create ISmbiosTable 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 71 of file ISmbios.h.
|
Definition at line 57 of file IFactory.h. |
|
Definition at line 58 of file IFactory.h. |
|
Definition at line 34 of file SmbiosFactory.cpp. |
|
Use getFactory() to get a factory.
Definition at line 36 of file SmbiosFactory.cpp. |
|
|
Implemented in TFactory< factory::IFactory >. |
|
Implemented in TFactory< factory::IFactory >. |
|
Implemented in TFactory< factory::IFactory >. |
|
Recommended way to get an ISmbiosTable object. getSingleton() returns a pointer to a Singleton ISmbiosTable object. The user need not delete the pointer returned by this method. The singleton will be deleted when the factory is destructed or the reset() method is called
Referenced by smbios::getBits_FromItem(), smbios::getData_UsingXml(), TokenTableFactoryImpl::getSingleton(), smbios::getString_FromItem(), and rbu::getSupportedPacketType(). |
|
Create a new ISmbiosTable object that the caller must delete. (NOT RECOMMENDED). The makeNew() method returns a pointer to a newly allocated ISmbiosTable 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<ISmbiosTable>. The getSingleton() method is preferred over this method.
Referenced by testPlatform::testConstructionOffset2(), and testStandalone::testNonXml(). |
|
Implemented in TFactory< factory::IFactory >. Referenced by testStandalone::testNonXml(). |
|
Implemented in TFactory< factory::IFactory >. |
|
Implemented in TFactory< factory::IFactory >. |
|
Implemented in TFactory< factory::IFactory >. Referenced by testPlatform::testConstructionOffset2(), and testStandalone::testMemoryBadFiles(). |