Interface definition for Smbios Item operations. More...
#include <ISmbios.h>
Public Types | |
enum | { FIELD_LEN_BYTE = 1, FIELD_LEN_WORD = 2, FIELD_LEN_DWORD = 4, FIELD_LEN_QWORD = 8 } |
Public Member Functions | |
virtual | ~ISmbiosItem () |
ISmbiosItem () | |
virtual std::auto_ptr< const ISmbiosItem > | clone () const =0 |
virtual std::auto_ptr < ISmbiosItem > | clone ()=0 |
virtual u8 | getType () const =0 |
virtual u8 | getLength () const =0 |
virtual u16 | getHandle () const =0 |
virtual void | getData (unsigned int offset, u8 *out, size_t size) const =0 |
virtual const u8 * | getBufferCopy (size_t &length) const =0 |
virtual size_t | getBufferSize () const =0 |
Returns the buffer size of the item. | |
virtual const char * | getStringByStringNumber (u8) const =0 |
Protected Member Functions | |
virtual std::ostream & | streamify (std::ostream &cout) const =0 |
Friends | |
std::ostream & | operator<< (std::ostream &cout, const ISmbiosItem &item) |
Interface definition for Smbios Item operations.
virtual smbios::ISmbiosItem::~ISmbiosItem | ( | ) | [virtual] |
Destructor
smbios::ISmbiosItem::ISmbiosItem | ( | ) |
virtual std::auto_ptr<ISmbiosItem> smbios::ISmbiosItem::clone | ( | ) | [pure virtual] |
virtual std::auto_ptr<const ISmbiosItem> smbios::ISmbiosItem::clone | ( | ) | const [pure virtual] |
virtual const u8* smbios::ISmbiosItem::getBufferCopy | ( | size_t & | length | ) | const [pure virtual] |
virtual size_t smbios::ISmbiosItem::getBufferSize | ( | ) | const [pure virtual] |
Returns the buffer size of the item.
virtual void smbios::ISmbiosItem::getData | ( | unsigned int | offset, | |
u8 * | out, | |||
size_t | size | |||
) | const [pure virtual] |
Set of accessor functions: getU8(), getU16(), getU32(), and getU64() Returns a (byte|word|dword|qword) field from the Item.
The offset specified is an int representing the a valid offset within the table. Method will return a u8/u16/u32/u64 (depending on function called).
These methods all check the offset parameter for out of bounds conditions. They will throw exceptions on attempts to access data outside the length of the present item.
offset | The offset to the field within the Item. | |
out | void pointer to where to store output data | |
size | size of data to return |
virtual u16 smbios::ISmbiosItem::getHandle | ( | ) | const [pure virtual] |
Returns the Handle field of the SMBIOS Item. This field is standard for all SMBIOS tables and is defined in the SMBIOS standard.
virtual u8 smbios::ISmbiosItem::getLength | ( | ) | const [pure virtual] |
Returns the Length field of the SMBIOS Item. This field is standard for all SMBIOS tables and is defined in the SMBIOS standard.
virtual const char* smbios::ISmbiosItem::getStringByStringNumber | ( | u8 | ) | const [pure virtual] |
Not likely to be useful to regular client code. It is public mainly to help in writing Unit Tests. Clients should normally use getString().
virtual u8 smbios::ISmbiosItem::getType | ( | ) | const [pure virtual] |
Returns the Type field of the SMBIOS Item. This field is standard for all SMBIOS tables and is defined in the SMBIOS standard.
virtual std::ostream& smbios::ISmbiosItem::streamify | ( | std::ostream & | cout | ) | const [protected, pure virtual] |
Used by 'stdostream &smbios::operator <<( std::ostream &, ISmbiosItem&)' to print out the item info.
Not particularly useful for clients. Use operator<< instead.
std::ostream& operator<< | ( | std::ostream & | cout, | |
const ISmbiosItem & | item | |||
) | [friend] |