SMBIOS Library
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CmosTokenD4 Class Reference

#include <TokenImpl.h>

Inheritance diagram for CmosTokenD4:
Inheritance graph
Collaboration diagram for CmosTokenD4:
Collaboration graph

Public Member Functions

 CmosTokenD4 (const smbios::ISmbiosItem &item, const indexed_io_token *token)
virtual ~CmosTokenD4 () throw ()
u32 getType () const
 Returns the Token Type, per Dell SMBIOS Spec.
virtual bool isActive () const
 Returns true if bitfield-type token is set.
virtual void activate () const
 Sets the bitmask for bitfield-type tokens.
virtual bool isString () const
 Returns true for string-type tokens.
virtual bool isBool () const
 Returns true for bool-type tokens.
virtual unsigned int getStringLength () const
 Returns length for string-type tokens.
virtual const std::string getString (u8 *byteArray=0, unsigned int size=0) const
 returns std:string and raw value in first parameter.
virtual void setString (const u8 *byteArray, size_t size) const
virtual const ISmbiosItemgetItemRef () const
virtual void getCMOSDetails (u16 *indexPort, u16 *dataPort, u8 *location) const
 returns details about CMOS index/data ports and cmos location.
virtual std::string getTokenClass () const
virtual std::ostream & streamify (std::ostream &cout) const

Protected Member Functions

 CmosTokenD4 ()
 CmosTokenD4 (const CmosTokenD4 &)
void operator= (const CmosTokenD4 &)

Private Attributes

std::auto_ptr< const
smbios::ISmbiosItem
item
indexed_io_access_structure structure
indexed_io_token token
cmos::ICmosRWcmos

Detailed Description

Definition at line 96 of file TokenImpl.h.

Constructor & Destructor Documentation

CmosTokenD4 ( const smbios::ISmbiosItem item,
const indexed_io_token token 
)

Definition at line 32 of file TokenD4.cpp.

References CmosTokenD4::item, CmosTokenD4::structure, and CmosTokenD4::token.

~CmosTokenD4 ( ) throw ()
virtual

Definition at line 44 of file TokenD4.cpp.

CmosTokenD4 ( )
protected
CmosTokenD4 ( const CmosTokenD4 )
protected

Member Function Documentation

void activate ( ) const
virtual
void getCMOSDetails ( u16 indexPort,
u16 dataPort,
u8 location 
) const
virtual

returns details about CMOS index/data ports and cmos location.

Implements ICmosToken.

Definition at line 200 of file TokenD4.cpp.

References indexed_io_access_structure::dataPort, indexed_io_access_structure::indexPort, indexed_io_token::location, CmosTokenD4::structure, and CmosTokenD4::token.

const ISmbiosItem & getItemRef ( ) const
virtual

Implements IToken.

Definition at line 52 of file TokenD4.cpp.

References CmosTokenD4::item.

const string getString ( u8 byteArray = 0,
unsigned int  size = 0 
) const
virtual

returns std:string and raw value in first parameter.

Parameters
byteArrayIf Non-NULL, getString() will store the raw string here.
sizeThis must be the length of the space allocated for byteArray. getString() will not overflow this length.
Returns
Returns a C++-style std::string initialized with the contents of byteArray. Only useful for strings that hold C-style zero-terminated strings.

Implements IToken.

Definition at line 116 of file TokenD4.cpp.

References CmosTokenD4::cmos, indexed_io_access_structure::dataPort, CmosTokenD4::getStringLength(), indexed_io_access_structure::indexPort, CmosTokenD4::isString(), indexed_io_token::location, cmos::readByteArray(), CmosTokenD4::structure, and CmosTokenD4::token.

Referenced by CmosTokenD4::streamify().

Here is the call graph for this function:

unsigned int getStringLength ( ) const
virtual

Returns length for string-type tokens.

Implements IToken.

Definition at line 190 of file TokenD4.cpp.

References CmosTokenD4::isString(), indexed_io_token::stringLength, and CmosTokenD4::token.

Referenced by CmosTokenD4::getString(), CmosTokenD4::setString(), and CmosTokenD4::streamify().

Here is the call graph for this function:

string getTokenClass ( ) const
virtual

Implements IToken.

Definition at line 47 of file TokenD4.cpp.

u32 getType ( ) const
virtual

Returns the Token Type, per Dell SMBIOS Spec.

Implements IToken.

Definition at line 57 of file TokenD4.cpp.

References CmosTokenD4::token, and indexed_io_token::tokenId.

Referenced by CmosTokenD4::streamify().

bool isActive ( ) const
virtual
bool isBool ( ) const
virtual

Returns true for bool-type tokens.

Implements IToken.

Definition at line 111 of file TokenD4.cpp.

References CmosTokenD4::isString().

Here is the call graph for this function:

bool isString ( ) const
virtual
void operator= ( const CmosTokenD4 )
protected
void setString ( const u8 byteArray,
size_t  size 
) const
virtual
std::ostream & streamify ( std::ostream &  cout) const
virtual

Member Data Documentation

cmos::ICmosRW* cmos
private
std::auto_ptr<const smbios::ISmbiosItem> item
private

Definition at line 125 of file TokenImpl.h.

Referenced by CmosTokenD4::CmosTokenD4(), and CmosTokenD4::getItemRef().

indexed_io_access_structure structure
private
indexed_io_token token
private

The documentation for this class was generated from the following files: