Home Libraries Author Links

stm::hexfmt< ElemT *, DefaultFlags > Class Template Reference
[DivAids: Diverse Aids]

Inheritance diagram for stm::hexfmt< ElemT *, DefaultFlags >:

Inheritance graph
[legend]
Collaboration diagram for stm::hexfmt< ElemT *, DefaultFlags >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename ElemT, dword DefaultFlags>
class stm::hexfmt< ElemT *, DefaultFlags >

Class template partial specialization allowing to format the pointer held as hexadecimal string.

Definition at line 1252 of file divaids.hpp.


Public Types

typedef ElemT value_type
 Type of the value held by this object.

Public Member Functions

 hexfmt (value_type *ptr=NULL, dword flags=defaultFlags)
 Construct an object holding the pointer ptr to be formatted with a prefix "0x" unless flag NoPrefix is set (default is defaultFlags & NoPrefix) with upper case hexadecimal digits unless flag LowerCase is set (default is defaultFlags & LowerCase).
 hexfmt (value_type *ptr, bool noprefix)
 Construct an object holding the pointer ptr to be formatted with a prefix "0x" unless noprefix is true.
 operator ElemT * () const
 Convert to the pointer held by this object.
dword flags () const
 Return the flags in effect.
dword flags (dword newFlags)
 Specify a new flags and return the previous ones.
bool noprefix () const
 Return the noprefix flag in effect.
bool noprefix (bool nopr)
 Specify a new noprefix flag and return the previous one.
template<class StringT>
 operator StringT () const
 Convert the pointer held by this object to the hexadecimal StringT representation according to the flags in effect.

Static Public Attributes

static const dword defaultFlags = DefaultFlags
 Default flags.

Member Typedef Documentation

template<typename ElemT, dword DefaultFlags>
typedef ElemT stm::hexfmt< ElemT *, DefaultFlags >::value_type

Type of the value held by this object.

Definition at line 1264 of file divaids.hpp.


Constructor & Destructor Documentation

template<typename ElemT, dword DefaultFlags>
stm::hexfmt< ElemT *, DefaultFlags >::hexfmt ( value_type ptr = NULL,
dword  flags = defaultFlags 
)

Construct an object holding the pointer ptr to be formatted with a prefix "0x" unless flag NoPrefix is set (default is defaultFlags & NoPrefix) with upper case hexadecimal digits unless flag LowerCase is set (default is defaultFlags & LowerCase).

template<typename ElemT, dword DefaultFlags>
stm::hexfmt< ElemT *, DefaultFlags >::hexfmt ( value_type ptr,
bool  noprefix 
)

Construct an object holding the pointer ptr to be formatted with a prefix "0x" unless noprefix is true.


Member Function Documentation

template<typename ElemT, dword DefaultFlags>
stm::hexfmt< ElemT *, DefaultFlags >::operator ElemT * (  )  const

Convert to the pointer held by this object.

template<typename ElemT, dword DefaultFlags>
dword stm::hexfmt< ElemT *, DefaultFlags >::flags (  )  const

Return the flags in effect.

template<typename ElemT, dword DefaultFlags>
dword stm::hexfmt< ElemT *, DefaultFlags >::flags ( dword  newFlags  ) 

Specify a new flags and return the previous ones.

template<typename ElemT, dword DefaultFlags>
bool stm::hexfmt< ElemT *, DefaultFlags >::noprefix (  )  const

Return the noprefix flag in effect.

template<typename ElemT, dword DefaultFlags>
bool stm::hexfmt< ElemT *, DefaultFlags >::noprefix ( bool  nopr  ) 

Specify a new noprefix flag and return the previous one.

template<typename ElemT, dword DefaultFlags>
template<class StringT>
stm::hexfmt< ElemT *, DefaultFlags >::operator StringT (  )  const

Convert the pointer held by this object to the hexadecimal StringT representation according to the flags in effect.


Member Data Documentation

template<typename ElemT, dword DefaultFlags>
const dword stm::hexfmt< ElemT *, DefaultFlags >::defaultFlags = DefaultFlags [static]

Default flags.

Definition at line 1261 of file divaids.hpp.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).