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

Interface to inspect or manipulate individual tokens. More...

#include <IToken.h>

Inheritance diagram for IToken:
Inheritance graph
Collaboration diagram for IToken:
Collaboration graph

Public Member Functions

virtual ~IToken ()
virtual std::string getTokenClass () const =0
virtual u32 getType () const =0
 Returns the Token Type, per Dell SMBIOS Spec.
virtual bool isActive () const =0
 Returns true if bitfield-type token is set.
virtual void activate () const =0
 Sets the bitmask for bitfield-type tokens.
virtual bool isString () const =0
 Returns true for string-type tokens.
virtual bool isBool () const =0
 Returns true for bool-type tokens.
virtual unsigned int getStringLength () const =0
 Returns length for string-type tokens.
virtual const std::string getString (u8 *byteArray=0, unsigned int size=0) const =0
 returns std:string and raw value in first parameter.
virtual void setString (const u8 *byteArray, size_t size) const =0
virtual const ISmbiosItemgetItemRef () const =0
virtual std::ostream & streamify (std::ostream &cout) const =0

Protected Member Functions

 IToken ()

Private Member Functions

 IToken (const IToken &)
ITokenoperator= (const IToken &source)

Detailed Description

Interface to inspect or manipulate individual tokens.

Definition at line 95 of file IToken.h.

Constructor & Destructor Documentation

~IToken ( )
virtual

Definition at line 44 of file Token.cpp.

IToken ( )
protected

Definition at line 31 of file Token.cpp.

IToken ( const IToken )
private

Member Function Documentation

virtual void activate ( ) const
pure virtual

Sets the bitmask for bitfield-type tokens.

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

Referenced by testPlatform::testCmosWriting().

virtual const ISmbiosItem& getItemRef ( ) const
pure virtual

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

virtual const std::string getString ( u8 byteArray = 0,
unsigned int  size = 0 
) const
pure 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.

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

Referenced by testPlatform::testCmosWriting().

virtual unsigned int getStringLength ( ) const
pure virtual

Returns length for string-type tokens.

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

Referenced by testPlatform::testCmosWriting().

virtual std::string getTokenClass ( ) const
pure virtual
virtual u32 getType ( ) const
pure virtual

Returns the Token Type, per Dell SMBIOS Spec.

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

virtual bool isActive ( ) const
pure virtual

Returns true if bitfield-type token is set.

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

Referenced by testPlatform::testCmosWriting().

virtual bool isBool ( ) const
pure virtual

Returns true for bool-type tokens.

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

virtual bool isString ( ) const
pure virtual

Returns true for string-type tokens.

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

Referenced by testPlatform::testCmosWriting().

IToken& operator= ( const IToken source)
private
virtual void setString ( const u8 byteArray,
size_t  size 
) const
pure virtual

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

Referenced by testPlatform::testCmosWriting().

virtual std::ostream& streamify ( std::ostream &  cout) const
pure virtual

Implemented in SmiTokenDA, CmosTokenD5, and CmosTokenD4.

Referenced by smbios::operator<<().


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