Interface definition for Smbios Table operations. More...
#include <ISmbios.h>
Public Types | |
typedef SmbiosTableIterator | iterator |
typedef ConstSmbiosTableIterator | const_iterator |
Public Member Functions | |
ISmbiosTable () | |
virtual | ~ISmbiosTable () |
virtual iterator | begin ()=0 |
Standard iterator interface. Points to first table item. | |
virtual const_iterator | begin () const =0 |
Standard iterator interface. Points to first table item. | |
virtual iterator | end ()=0 |
Standard iterator interface. Points to one-past-the-last table item. | |
virtual const_iterator | end () const =0 |
Standard iterator interface. Points to one-past-the-last table item. | |
virtual iterator | operator[] (const int)=0 |
Standard indexed access by integer item type. | |
virtual const_iterator | operator[] (const int) const =0 |
Standard indexed access by integer item type. | |
virtual void | rawMode (bool m=true) const =0 |
Disables all workarounds for _new_ items created by the table. | |
virtual void | clearItemCache () const =0 |
Clears out any cached SmbiosItem entries in the cache. | |
virtual int | getNumberOfEntries () const =0 |
Returns the number of table items, per SMBIOS table header. | |
virtual smbiosLowlevel::smbios_table_entry_point | getTableEPS () const =0 |
Returns the table entry point structure. | |
Protected Member Functions | |
virtual const ISmbiosItem & | getSmbiosItem (const u8 *current) const =0 |
virtual ISmbiosItem & | getSmbiosItem (const u8 *current)=0 |
virtual const u8 * | nextSmbiosStruct (const u8 *current=0) const =0 |
virtual std::ostream & | streamify (std::ostream &cout) const =0 |
Used by operator << (std::ostream & cout, const ISmbiosTable & ) to. | |
Friends | |
class | SmbiosTableIteratorBase |
std::ostream & | operator<< (std::ostream &cout, const ISmbiosTable &item) |
Interface definition for Smbios Table operations.
smbios::ISmbiosTable::ISmbiosTable | ( | ) |
virtual smbios::ISmbiosTable::~ISmbiosTable | ( | ) | [virtual] |
virtual const_iterator smbios::ISmbiosTable::begin | ( | ) | const [pure virtual] |
Standard iterator interface. Points to first table item.
Standard iterator interface. Points to first table item.
smbios::ISmbiosTable *table = smbios::SmbiosFactory::getFactory()->getSingleton(); smbios::ISmbiosTable::iterator item = table->begin(); while( item != table->end() ) { cout << "Type of Item: " << item->getType(); ++item; }
virtual iterator smbios::ISmbiosTable::begin | ( | ) | [pure virtual] |
Standard iterator interface. Points to first table item.
smbios::ISmbiosTable *table = smbios::SmbiosFactory::getFactory()->getSingleton(); smbios::ISmbiosTable::iterator item = table->begin(); while( item != table->end() ) { cout << "Type of Item: " << item->getType(); ++item; }
virtual void smbios::ISmbiosTable::clearItemCache | ( | ) | const [pure virtual] |
Clears out any cached SmbiosItem entries in the cache.
This API is useful for two instances. First, you can use this to reduce memory usage if you know that you do not need any ISmbiosItem(s) out of the table for a while. The cached ISmbiosItem(s) will be deleted and then re-populated on demand when queries are made for them.
Next, this API is used internally when reReadTable() is called to clear out all old ISmbiosItems.
virtual const_iterator smbios::ISmbiosTable::end | ( | ) | const [pure virtual] |
Standard iterator interface. Points to one-past-the-last table item.
Used by const_iterator. Standard iterator interface. Points to first table item.
smbios::ISmbiosTable *table = smbios::SmbiosFactory::getFactory()->getSingleton(); smbios::ISmbiosTable::iterator item = table->begin(); while( item != table->end() ) { cout << "Type of Item: " << item->getType(); ++item; }
virtual iterator smbios::ISmbiosTable::end | ( | ) | [pure virtual] |
Standard iterator interface. Points to one-past-the-last table item.
Standard iterator interface. Points to first table item.
smbios::ISmbiosTable *table = smbios::SmbiosFactory::getFactory()->getSingleton(); smbios::ISmbiosTable::iterator item = table->begin(); while( item != table->end() ) { cout << "Type of Item: " << item->getType(); ++item; }
virtual int smbios::ISmbiosTable::getNumberOfEntries | ( | ) | const [pure virtual] |
Returns the number of table items, per SMBIOS table header.
virtual ISmbiosItem& smbios::ISmbiosTable::getSmbiosItem | ( | const u8 * | current | ) | [protected, pure virtual] |
virtual const ISmbiosItem& smbios::ISmbiosTable::getSmbiosItem | ( | const u8 * | current | ) | const [protected, pure virtual] |
virtual smbiosLowlevel::smbios_table_entry_point smbios::ISmbiosTable::getTableEPS | ( | ) | const [pure virtual] |
Returns the table entry point structure.
virtual const u8* smbios::ISmbiosTable::nextSmbiosStruct | ( | const u8 * | current = 0 |
) | const [protected, pure virtual] |
virtual const_iterator smbios::ISmbiosTable::operator[] | ( | const | int | ) | const [pure virtual] |
Standard indexed access by integer item type.
Standard indexed access by integer item type. The operator[] method returns an iterator that can be used to iterator over all items in the table of the supplied type. So, for example, if you want to perform an operation on all SMBIOS type 0x01 (System Information Block) structures, just index the table object using the [] operator.
// Integer indexing example smbios::ISmbiosTable *table = smbios::SmbiosFactory::getFactory()->getSingleton(); smbios::ISmbiosTable::iterator item1 = (*table)[0]; cout << "The BIOS Version is: " << item1->getString(0x05) << endl;
virtual iterator smbios::ISmbiosTable::operator[] | ( | const | int | ) | [pure virtual] |
Standard indexed access by integer item type.
The operator[] method returns an iterator that can be used to iterator over all items in the table of the supplied type. So, for example, if you want to perform an operation on all SMBIOS type 0x01 (System Information Block) structures, just index the table object using the [] operator.
// Integer indexing example smbios::ISmbiosTable *table = smbios::SmbiosFactory::getFactory()->getSingleton(); smbios::ISmbiosTable::iterator item1 = (*table)[0]; cout << "The BIOS Version is: " << item1->getString(0x05) << endl;
virtual void smbios::ISmbiosTable::rawMode | ( | bool | m = true |
) | const [pure virtual] |
Disables all workarounds for _new_ items created by the table.
Any new item generated by the table will not have workarounds applied to them. However, any previously-existing items that have had workarounds applied still exist. If this is not what you want, recommend calling clearItemCache() prior to calling rawMode().
m | pass in a bool value to turn raw mode on or off. |
virtual std::ostream& smbios::ISmbiosTable::streamify | ( | std::ostream & | cout | ) | const [protected, pure virtual] |
Used by operator << (std::ostream & cout, const ISmbiosTable & ) to.
Users normally would not need or want to call this API. The normal operator<<() has been overloaded to call this function internally.
std::ostream& operator<< | ( | std::ostream & | cout, | |
const ISmbiosTable & | item | |||
) | [friend] |
friend class SmbiosTableIteratorBase [friend] |