BazisLib::Win32::RegistryKey::accessor Class Reference

Represents an internal object used to read or write registry values. More...

#include <registry.h>

Collaboration diagram for BazisLib::Win32::RegistryKey::accessor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool ReadValue (int *pValue)
bool ReadValue (String *pValue)
bool ReadValue (unsigned *pValue)
bool ReadValue (bool *bValue)
bool ReadValue (LONGLONG *pValue)
bool ReadValue (ULONGLONG *pValue)
 operator int ()
 operator String ()
bool operator= (const int &value)
bool operator= (const TCHAR *ptszStr)
bool operator= (const String &str)
template<class _Ty >
bool WriteValue (_Ty *pValue)
template<>
bool WriteValue (LONGLONG *pValue)
template<>
bool WriteValue (ULONGLONG *pValue)
bool QueryValueEx (void *pBuffer, DWORD BufferSize, DWORD *dwRealSize=NULL, DWORD *pType=NULL)
 Queries a registry value independant from its type.
bool SetValueEx (const void *pBuffer, DWORD BufferSize, DWORD dwType)
bool ReadToCharArray (TCHAR *ptszArray, DWORD SizeInBytes)
DWORD QueryType ()

Private Member Functions

 accessor (RegistryKey *pKey, const TCHAR *pName)
 accessor (const accessor &acc)
void operator= (const accessor &acc)
bool _assign (const TCHAR *ptszStr, unsigned count=0)

Private Attributes

const TCHAR * m_pName
RegistryKeym_pKey

Friends

class RegistryKey


Detailed Description

Represents an internal object used to read or write registry values.

The RegistryKey::accessor class SHOULD NOT be used explicitly. The only correct usage is when such temporary object is returned from RegistryKey::operator[]().

In that case optimizer prevents the object from being physically stored in stack. Instead, the key and value name pointers are directly passed to corresponding functions.

To see how it works, you should compile the SAMPLES\WINDOWS\REGISTRY sample program in Release configuration, and disassemble it.

All methods/operators are divided into the following groups:


Constructor & Destructor Documentation

BazisLib::Win32::RegistryKey::accessor::accessor ( RegistryKey pKey,
const TCHAR *  pName 
) [inline, private]

BazisLib::Win32::RegistryKey::accessor::accessor ( const accessor acc  )  [inline, private]


Member Function Documentation

bool BazisLib::Win32::RegistryKey::accessor::_assign ( const TCHAR *  ptszStr,
unsigned  count = 0 
) [inline, private]

BazisLib::Win32::RegistryKey::accessor::operator int (  )  [inline]

Here is the call graph for this function:

BazisLib::Win32::RegistryKey::accessor::operator String (  )  [inline]

Here is the call graph for this function:

bool BazisLib::Win32::RegistryKey::accessor::operator= ( const String str  )  [inline]

Here is the call graph for this function:

bool BazisLib::Win32::RegistryKey::accessor::operator= ( const TCHAR *  ptszStr  )  [inline]

Here is the call graph for this function:

bool BazisLib::Win32::RegistryKey::accessor::operator= ( const int &  value  )  [inline]

void BazisLib::Win32::RegistryKey::accessor::operator= ( const accessor acc  )  [inline, private]

DWORD BazisLib::Win32::RegistryKey::accessor::QueryType (  )  [inline]

bool BazisLib::Win32::RegistryKey::accessor::QueryValueEx ( void *  pBuffer,
DWORD  BufferSize,
DWORD *  dwRealSize = NULL,
DWORD *  pType = NULL 
) [inline]

Queries a registry value independant from its type.

bool BazisLib::Win32::RegistryKey::accessor::ReadToCharArray ( TCHAR *  ptszArray,
DWORD  SizeInBytes 
) [inline]

bool BazisLib::Win32::RegistryKey::accessor::ReadValue ( ULONGLONG pValue  )  [inline]

Here is the call graph for this function:

bool BazisLib::Win32::RegistryKey::accessor::ReadValue ( LONGLONG pValue  )  [inline]

bool BazisLib::Win32::RegistryKey::accessor::ReadValue ( bool *  bValue  )  [inline]

Here is the call graph for this function:

bool BazisLib::Win32::RegistryKey::accessor::ReadValue ( unsigned *  pValue  )  [inline]

Here is the call graph for this function:

bool BazisLib::Win32::RegistryKey::accessor::ReadValue ( String pValue  )  [inline]

bool BazisLib::Win32::RegistryKey::accessor::ReadValue ( int *  pValue  )  [inline]

bool BazisLib::Win32::RegistryKey::accessor::SetValueEx ( const void *  pBuffer,
DWORD  BufferSize,
DWORD  dwType 
) [inline]

template<>
bool BazisLib::Win32::RegistryKey::accessor::WriteValue ( ULONGLONG pValue  )  [inline]

template<>
bool BazisLib::Win32::RegistryKey::accessor::WriteValue ( LONGLONG pValue  )  [inline]

template<class _Ty >
bool BazisLib::Win32::RegistryKey::accessor::WriteValue ( _Ty *  pValue  )  [inline]


Friends And Related Function Documentation

friend class RegistryKey [friend]


Member Data Documentation


The documentation for this class was generated from the following file:
SourceForge.net Logo