#include <IMemory.h>
Inheritance diagram for MemoryFactory:
Public Types | |
enum | { AutoDetectMode, UnitTestMode } |
enum | { defaultMode = AutoDetectMode } |
Public Member Functions | |
virtual | ~MemoryFactory () throw () |
virtual IMemory * | getSingleton ()=0 |
Recommended way to get an IMemory object. | |
virtual IMemory * | makeNew ()=0 |
Create a new IMemory 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 MemoryFactory * | getFactory () |
Create a factory object that you can use to create IMemory objects. | |
Protected Member Functions | |
MemoryFactory () | |
Use getFactory() to get a factory. |
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 62 of file IMemory.h.
anonymous enum [inherited] |
anonymous enum [inherited] |
~MemoryFactory | ( | ) | throw () [virtual] |
Definition at line 35 of file Memory.cpp.
MemoryFactory | ( | ) | [protected] |
MemoryFactory * getFactory | ( | ) | [static] |
Create a factory object that you can use to create IMemory objects.
Factory entry point: This is the method to call to get a handle to the MemoryFactory. The MemoryFactory is the recommended method to create IMemory 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.
Definition at line 40 of file Memory.cpp.
Referenced by getBiosVersionFromOneByteStructForDiamond(), getIdByteFromMem(), getIdByteFromMem_Diamond(), SmbiosMemoryStrategy::getSmbiosTableBuf(), SmbiosMemoryStrategy::getSmbiosTableHeader(), getUpOffsetAndFlag(), isStdDellBiosSystem(), testStandalone::setUp(), testRbu::setUp(), testPlatform::setUp(), testStandalone::tearDown(), testRbu::tearDown(), testPlatform::tearDown(), testStandalone::testMemoryBadFiles(), and testStandalone::testMemoryFuncs().
virtual IMemory* getSingleton | ( | ) | [pure virtual] |
Recommended way to get an IMemory object.
getSingleton() returns a pointer to a Singleton IMemory 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 testStandalone::testMemoryFuncs().
virtual IMemory* makeNew | ( | ) | [pure virtual] |
Create a new IMemory object that the caller must delete. (NOT RECOMMENDED).
The make() method returns a pointer to a newly allocated IMemory 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<IMemory>.
The getSingleton() method is preferred over this method.
Referenced by testStandalone::testMemoryBadFiles().
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] |
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 >.