SmbiosWorkaroundFactory Class Reference

#include <SmbiosWorkaroundImpl.h>

Inheritance diagram for SmbiosWorkaroundFactory:

TFactory< factory::IFactory > IFactory List of all members.

Public Types

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

Public Member Functions

 SmbiosWorkaroundFactory ()
 Use getFactory() to get a factory.
virtual ~SmbiosWorkaroundFactory () throw ()
virtual SmbiosWorkaroundTablemakeNew (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, u32numParamMap

Static Protected Attributes

static SmbiosWorkaroundTable_tableInstance = 0
static TFactory< factory::IFactory > * _instance

Detailed Description

This class is a private class used by the SmbiosTable class to handle workarounds for BIOS bugs.

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.


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

SmbiosWorkaroundFactory (  )  [inline]

Use getFactory() to get a factory.

Definition at line 56 of file SmbiosWorkaroundImpl.h.

~SmbiosWorkaroundFactory (  )  throw () [virtual]

Definition at line 46 of file SmbiosWorkaround.cpp.

References SmbiosWorkaroundFactory::_tableInstance.


Member Function Documentation

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.

Returns:
Singleton SmbiosWorkaroundFactory object pointer.

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>.

Returns:
(SmbiosWorkaroundTable *) -- caller must delete

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]

Implements IFactory.

Definition at line 63 of file FactoryImpl2.h.

References TFactory::_instance.

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]

Implements IFactory.

Definition at line 77 of file FactoryImpl2.h.

References TFactory::mode.

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]

Implements IFactory.

Definition at line 82 of file FactoryImpl2.h.

References TFactory::mode.


Member Data Documentation

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.


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