CmosTokenD4 Class Reference

#include <TokenImpl.h>

Inheritance diagram for CmosTokenD4:

IToken ICmosToken List of all members.

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::ISmbiosItemitem
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 31 of file TokenD4.cpp.

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

~CmosTokenD4 (  )  throw () [virtual]

Definition at line 43 of file TokenD4.cpp.

CmosTokenD4 (  )  [protected]

CmosTokenD4 ( const CmosTokenD4  )  [protected]


Member Function Documentation

u32 getType (  )  const [virtual]

Returns the Token Type, per Dell SMBIOS Spec.

Implements IToken.

Definition at line 56 of file TokenD4.cpp.

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

Referenced by CmosTokenD4::streamify().

bool isActive (  )  const [virtual]

Returns true if bitfield-type token is set.

Implements IToken.

Definition at line 61 of file TokenD4.cpp.

References indexed_io_token::andMask, CmosTokenD4::cmos, indexed_io_access_structure::dataPort, indexed_io_access_structure::indexPort, CmosTokenD4::isString(), indexed_io_token::location, indexed_io_token::orValue, ICmosRW::readByte(), CmosTokenD4::structure, and CmosTokenD4::token.

Referenced by CmosTokenD4::streamify().

void activate (  )  const [virtual]

Sets the bitmask for bitfield-type tokens.

Implements IToken.

Definition at line 80 of file TokenD4.cpp.

References indexed_io_token::andMask, CmosTokenD4::cmos, indexed_io_access_structure::dataPort, indexed_io_access_structure::indexPort, CmosTokenD4::isString(), indexed_io_token::location, indexed_io_token::orValue, ICmosRW::readByte(), CmosTokenD4::structure, CmosTokenD4::token, and ICmosRW::writeByte().

bool isString (  )  const [virtual]

Returns true for string-type tokens.

Implements IToken.

Definition at line 102 of file TokenD4.cpp.

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

Referenced by CmosTokenD4::activate(), CmosTokenD4::getString(), CmosTokenD4::getStringLength(), CmosTokenD4::isActive(), CmosTokenD4::isBool(), CmosTokenD4::setString(), and CmosTokenD4::streamify().

bool isBool (  )  const [virtual]

Returns true for bool-type tokens.

Implements IToken.

Definition at line 110 of file TokenD4.cpp.

References CmosTokenD4::isString().

unsigned int getStringLength (  )  const [virtual]

Returns length for string-type tokens.

Implements IToken.

Definition at line 189 of file TokenD4.cpp.

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

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

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

returns std:string and raw value in first parameter.

Parameters:
byteArray If Non-NULL, getString() will store the raw string here.
size This 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 115 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().

void setString ( const u8 byteArray,
size_t  size 
) const [virtual]

Implements IToken.

Definition at line 166 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, CmosTokenD4::structure, CmosTokenD4::token, and cmos::writeByteArray().

const ISmbiosItem & getItemRef (  )  const [virtual]

Implements IToken.

Definition at line 51 of file TokenD4.cpp.

References CmosTokenD4::item.

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 199 of file TokenD4.cpp.

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

string getTokenClass (  )  const [virtual]

Implements IToken.

Definition at line 46 of file TokenD4.cpp.

std::ostream & streamify ( std::ostream &  cout  )  const [virtual]

Implements IToken.

Definition at line 207 of file TokenD4.cpp.

References indexed_io_token::andMask, indexed_io_access_structure::dataPort, CmosTokenD4::getString(), CmosTokenD4::getStringLength(), CmosTokenD4::getType(), indexed_io_access_structure::handle, indexed_io_access_structure::indexPort, CmosTokenD4::isActive(), CmosTokenD4::isString(), indexed_io_token::location, indexed_io_token::orValue, CmosTokenD4::structure, CmosTokenD4::token, and indexed_io_access_structure::type.

void operator= ( const CmosTokenD4  )  [protected]


Member Data Documentation

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]

Definition at line 126 of file TokenImpl.h.

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

indexed_io_token token [private]

Definition at line 127 of file TokenImpl.h.

Referenced by CmosTokenD4::activate(), CmosTokenD4::CmosTokenD4(), CmosTokenD4::getCMOSDetails(), CmosTokenD4::getString(), CmosTokenD4::getStringLength(), CmosTokenD4::getType(), CmosTokenD4::isActive(), CmosTokenD4::isString(), CmosTokenD4::setString(), and CmosTokenD4::streamify().

cmos::ICmosRW* cmos [private]

Definition at line 128 of file TokenImpl.h.

Referenced by CmosTokenD4::activate(), CmosTokenD4::getString(), CmosTokenD4::isActive(), and CmosTokenD4::setString().


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