AbstractFactory that produces ISmbiosTable objects. More...
#include <ISmbios.h>
Public Member Functions | |
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). | |
Static Public Member Functions | |
static SmbiosFactory * | getFactory () |
Create a factory object that you can use to create ISmbiosTable objects. | |
Protected Member Functions | |
SmbiosFactory () | |
Use getFactory() to get a factory. |
AbstractFactory that produces ISmbiosTable objects.
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.
virtual smbios::SmbiosFactory::~SmbiosFactory | ( | ) | throw () [virtual] |
smbios::SmbiosFactory::SmbiosFactory | ( | ) | [protected] |
Use getFactory() to get a factory.
static SmbiosFactory* smbios::SmbiosFactory::getFactory | ( | ) | [static] |
Create a factory object that you can use to create ISmbiosTable objects.
Factory entry point: This is the method to call to get a handle to the SmbiosFactory. 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 deleted by the factory when it is reset() or destructed.
virtual ISmbiosTable* smbios::SmbiosFactory::getSingleton | ( | ) | [pure virtual] |
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
virtual ISmbiosTable* smbios::SmbiosFactory::makeNew | ( | ) | [pure virtual] |
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.