#include <SmbiosWorkaroundImpl.h>
Inheritance diagram for SmbiosWorkaroundFactory:
Public Types | |
enum | { AutoDetectMode, UnitTestMode } |
enum | { defaultMode = AutoDetectMode } |
Public Member Functions | |
SmbiosWorkaroundFactory () | |
Use getFactory() to get a factory. | |
virtual | ~SmbiosWorkaroundFactory () throw () |
virtual SmbiosWorkaroundTable * | makeNew (const ISmbiosTable *table) |
Create a new SmbiosWorkaroundTable object that the caller must delete. | |
virtual void | reset () |
virtual void | setParameter (const std::string name, const std::string value) |
virtual void | setParameter (const std::string name, const u32 value) |
virtual void | setMode (const int newMode) |
virtual std::string | getParameterString (const std::string name) const |
virtual u32 | getParameterNum (const std::string name) const |
virtual int | getMode () const |
Static Public Member Functions | |
static factory::TFactory< smbios::SmbiosWorkaroundFactory > * | getFactory () |
Create a factory object that you can use to create SmbiosWorkaroundTable objects. | |
static TFactory< factory::IFactory > * | getFactory (R *foo=0) |
Protected Attributes | |
int | mode |
std::map< std::string, std::string > | strParamMap |
std::map< std::string, u32 > | numParamMap |
Static Protected Attributes | |
static SmbiosWorkaroundTable * | _tableInstance = 0 |
static TFactory< factory::IFactory > * | _instance |
As such, there is no ABI guarantee, so this class doesn't follow the XXXXFactory | XXXXFactoryImpl pattern that the rest of the Factories follow. That makes things a bit simpler in implementation.
There is no ISmbiosWorkaroundTable for the same reason as above.
General Theory of Operation: The SmbiosTable object contains a buffer of the raw SMBIOS table, as read from memory. As such, this is never changed and will always reflect bit-for-bit what is in memory.
As each SmbiosItem is created, the ->fixup() method is called, which alters the individual items. It will alter the actual item buffer that the item holds so that it has correct data.
Definition at line 52 of file SmbiosWorkaroundImpl.h.
anonymous enum [inherited] |
anonymous enum [inherited] |
SmbiosWorkaroundFactory | ( | ) | [inline] |
~SmbiosWorkaroundFactory | ( | ) | throw () [virtual] |
Definition at line 46 of file SmbiosWorkaround.cpp.
References SmbiosWorkaroundFactory::_tableInstance.
factory::TFactory< smbios::SmbiosWorkaroundFactory > * getFactory | ( | ) | [static] |
Create a factory object that you can use to create SmbiosWorkaroundTable objects.
Factory entry point: This is the method to call to get a handle to the SmbiosWorkaroundFactory. The SmbiosWorkaroundFactory is the recommended method to create SmbiosWorkaroundTable objects.
Definition at line 38 of file SmbiosWorkaround.cpp.
References TFactory::getFactory().
Referenced by SmbiosTable::initializeWorkaround().
SmbiosWorkaroundTable * makeNew | ( | const ISmbiosTable * | table | ) | [virtual] |
Create a new SmbiosWorkaroundTable object that the caller must delete.
The makeNew() method returns a pointer to a newly allocated SmbiosWorkaroundTable 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<SmbiosWorkaroundTable>.
Definition at line 56 of file SmbiosWorkaround.cpp.
References _X, smbios::BIOS_Information, smbios::Dell_Revisions_and_IDs, smbios::getString_FromItem(), smbios::getU16_FromItem(), smbios::getU8_FromItem(), smbios::numSystemWorkarounds, smbios::workaroundMasterList, and SystemWorkaround::workarounds.
static TFactory<factory::IFactory >* getFactory | ( | R * | foo = 0 |
) | [inline, static, inherited] |
Definition at line 53 of file FactoryImpl2.h.
References TFactory::_instance, and UNREFERENCED_PARAMETER.
virtual void reset | ( | ) | [inline, virtual, inherited] |
virtual void setParameter | ( | const std::string | name, | |
const std::string | value | |||
) | [inline, virtual, inherited] |
Implements IFactory.
Definition at line 75 of file FactoryImpl2.h.
References TFactory::strParamMap.
virtual void setParameter | ( | const std::string | name, | |
const u32 | value | |||
) | [inline, virtual, inherited] |
Implements IFactory.
Definition at line 76 of file FactoryImpl2.h.
References TFactory::numParamMap.
virtual void setMode | ( | const int | newMode | ) | [inline, virtual, inherited] |
virtual std::string getParameterString | ( | const std::string | name | ) | const [inline, virtual, inherited] |
Implements IFactory.
Definition at line 80 of file FactoryImpl2.h.
References TFactory::strParamMap.
virtual u32 getParameterNum | ( | const std::string | name | ) | const [inline, virtual, inherited] |
Implements IFactory.
Definition at line 81 of file FactoryImpl2.h.
References TFactory::numParamMap.
virtual int getMode | ( | ) | const [inline, virtual, inherited] |
SmbiosWorkaroundTable * _tableInstance = 0 [static, protected] |
Definition at line 79 of file SmbiosWorkaroundImpl.h.
Referenced by SmbiosWorkaroundFactory::~SmbiosWorkaroundFactory().
int mode [protected, inherited] |
Definition at line 89 of file FactoryImpl2.h.
std::map< std::string, std::string > strParamMap [mutable, protected, inherited] |
Definition at line 90 of file FactoryImpl2.h.
std::map< std::string, u32 > numParamMap [mutable, protected, inherited] |
Definition at line 91 of file FactoryImpl2.h.
TFactory<factory::IFactory >* _instance [static, protected, inherited] |
Definition at line 92 of file FactoryImpl2.h.