1 // RegistryValueImpl.h: Schnittstelle für die Klasse RegistryValueImpl.
3 //////////////////////////////////////////////////////////////////////
5 #ifndef _REGISTRYVALUEIMPL_HXX_
6 #define _REGISTRYVALUEIMPL_HXX_
11 class RegistryValueImpl
15 //#################################
16 // Creation/Destruction
17 //#################################
19 RegistryValueImpl(const std::wstring
& Name
, int Value
);
21 RegistryValueImpl(const std::wstring
& Name
, const std::wstring
& Value
);
23 RegistryValueImpl(const std::wstring
& Name
, const std::string
& Value
);
25 #if (_MSC_VER >= 1300)
26 RegistryValueImpl::RegistryValueImpl(const RegistryValueImpl
& s
);
29 virtual ~RegistryValueImpl();
32 //#################################
34 //#################################
37 /** Returns the name of the value
39 std::wstring
GetName() const;
41 /** Return the size of data held
43 size_t GetDataSize() const;
45 /** Get a pointer to the data buffer
46 in order to copy the data
48 const void* GetDataBuffer() const;
50 /** Returns the data as unicode string
52 @precond GetType = STRING
54 std::wstring
GetDataAsUniString() const;
56 /** Returns the data as ansi string
58 @precond GetType = STRING
60 std::string
GetDataAsAnsiString() const;
62 /** Returns the data as number
64 @precond GetType = NUMBER
66 int GetDataAsInt() const;
68 /** Returns the type of the data
72 //#################################
74 //#################################
79 void SetName(const std::wstring
& NewName
);
83 void SetValue(const std::wstring
& NewValue
);
87 void SetValue(const std::string
& NewValue
);
91 void SetValue(int NewValue
);
93 //#################################
95 //#################################
100 std::wstring m_StringData
;
105 typedef std::auto_ptr
<RegistryValueImpl
> RegistryValue
;