Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / setup_native / source / win32 / customactions / reg4msdoc / registryvalueimpl.hxx
blob1f4df3353359eabeb6fa719bebe44233c9360ee3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // RegistryValueImpl.h: Schnittstelle für die Klasse RegistryValueImpl.
3 //
4 //////////////////////////////////////////////////////////////////////
6 #ifndef _REGISTRYVALUEIMPL_HXX_
7 #define _REGISTRYVALUEIMPL_HXX_
9 #include <memory>
10 #include <string>
12 class RegistryValueImpl
14 public:
16 //#################################
17 // Creation/Destruction
18 //#################################
20 RegistryValueImpl(const std::wstring& Name, int Value);
22 RegistryValueImpl(const std::wstring& Name, const std::wstring& Value);
24 RegistryValueImpl(const std::wstring& Name, const std::string& Value);
26 #if (_MSC_VER >= 1300)
27 RegistryValueImpl::RegistryValueImpl(const RegistryValueImpl& s);
28 #endif
30 virtual ~RegistryValueImpl();
33 //#################################
34 // Query
35 //#################################
38 /** Returns the name of the value
40 std::wstring GetName() const;
42 /** Return the size of data held
44 size_t GetDataSize() const;
46 /** Get a pointer to the data buffer
47 in order to copy the data
49 const void* GetDataBuffer() const;
51 /** Returns the data as unicode string
53 @precond GetType = STRING
55 std::wstring GetDataAsUniString() const;
57 /** Returns the data as ansi string
59 @precond GetType = STRING
61 std::string GetDataAsAnsiString() const;
63 /** Returns the data as number
65 @precond GetType = NUMBER
67 int GetDataAsInt() const;
69 /** Returns the type of the data
71 int GetType() const;
73 //#################################
74 // Command
75 //#################################
78 /** Set a new name
80 void SetName(const std::wstring& NewName);
82 /**
84 void SetValue(const std::wstring& NewValue);
86 /**
88 void SetValue(const std::string& NewValue);
90 /**
92 void SetValue(int NewValue);
94 //#################################
95 // Private data
96 //#################################
98 private:
99 std::wstring m_Name;
100 int m_Type;
101 std::wstring m_StringData;
102 int m_IntData;
106 typedef std::auto_ptr<RegistryValueImpl> RegistryValue;
109 #endif
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */