summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/reg4msdoc/registryvalueimpl.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'setup_native/source/win32/customactions/reg4msdoc/registryvalueimpl.hxx')
-rw-r--r--setup_native/source/win32/customactions/reg4msdoc/registryvalueimpl.hxx108
1 files changed, 108 insertions, 0 deletions
diff --git a/setup_native/source/win32/customactions/reg4msdoc/registryvalueimpl.hxx b/setup_native/source/win32/customactions/reg4msdoc/registryvalueimpl.hxx
new file mode 100644
index 000000000000..a64058e29141
--- /dev/null
+++ b/setup_native/source/win32/customactions/reg4msdoc/registryvalueimpl.hxx
@@ -0,0 +1,108 @@
+// RegistryValueImpl.h: Schnittstelle für die Klasse RegistryValueImpl.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef _REGISTRYVALUEIMPL_HXX_
+#define _REGISTRYVALUEIMPL_HXX_
+
+#include <memory>
+#include <string>
+
+class RegistryValueImpl
+{
+public:
+
+ //#################################
+ // Creation/Destruction
+ //#################################
+
+ RegistryValueImpl(const std::wstring& Name, int Value);
+
+ RegistryValueImpl(const std::wstring& Name, const std::wstring& Value);
+
+ RegistryValueImpl(const std::wstring& Name, const std::string& Value);
+
+ #if (_MSC_VER >= 1300)
+ RegistryValueImpl::RegistryValueImpl(const RegistryValueImpl& s);
+ #endif
+
+ virtual ~RegistryValueImpl();
+
+
+ //#################################
+ // Query
+ //#################################
+
+
+ /** Returns the name of the value
+ */
+ std::wstring GetName() const;
+
+ /** Return the size of data held
+ */
+ size_t GetDataSize() const;
+
+ /** Get a pointer to the data buffer
+ in order to copy the data
+ */
+ const void* GetDataBuffer() const;
+
+ /** Returns the data as unicode string
+
+ @precond GetType = STRING
+ */
+ std::wstring GetDataAsUniString() const;
+
+ /** Returns the data as ansi string
+
+ @precond GetType = STRING
+ */
+ std::string GetDataAsAnsiString() const;
+
+ /** Returns the data as number
+
+ @precond GetType = NUMBER
+ */
+ int GetDataAsInt() const;
+
+ /** Returns the type of the data
+ */
+ int GetType() const;
+
+ //#################################
+ // Command
+ //#################################
+
+
+ /** Set a new name
+ */
+ void SetName(const std::wstring& NewName);
+
+ /**
+ */
+ void SetValue(const std::wstring& NewValue);
+
+ /**
+ */
+ void SetValue(const std::string& NewValue);
+
+ /**
+ */
+ void SetValue(int NewValue);
+
+ //#################################
+ // Private data
+ //#################################
+
+private:
+ std::wstring m_Name;
+ int m_Type;
+ std::wstring m_StringData;
+ int m_IntData;
+};
+
+
+typedef std::auto_ptr<RegistryValueImpl> RegistryValue;
+
+
+#endif