20 #ifndef INC_STDREGISTRY
21 #define INC_STDREGISTRY
27 StdCopyStrBuf GetRegistryString(
const char *szSubKey,
const char *szValueName);
28 bool SetRegistryString(
const char *szSubKey,
const char *szValueName,
const char *szValue);
30 bool SetRegShell(
const wchar_t *szClassName,
31 const wchar_t *szShellName,
32 const wchar_t *szShellCaption,
33 const wchar_t *szCommand,
34 bool fMakeDefault =
false);
36 bool RemoveRegShell(
const char *szClassName,
37 const char *szShellName);
39 bool StoreWindowPosition(HWND hwnd,
40 const char *szWindowName,
42 bool fStoreSize =
true);
44 bool RestoreWindowPosition(HWND hwnd,
45 const char *szWindowName,
47 bool fHidden =
false);
55 StdCompilerConfigWrite(HKEY hRoot,
const char *szPath);
56 ~StdCompilerConfigWrite()
override;
59 bool hasNaming()
override {
return true; }
63 bool Name(
const char *szName)
override;
64 void NameEnd(
bool fBreak =
false)
override;
66 bool Default(
const char *szName)
override;
72 void DWord(int32_t &rInt)
override;
73 void DWord(uint32_t &rInt)
override;
74 void Word(int16_t &rShort)
override;
75 void Word(uint16_t &rShort)
override;
76 void Byte(int8_t &rByte)
override;
77 void Byte(uint8_t &rByte)
override;
78 void Boolean(
bool &rBool)
override;
80 void String(
char *szString,
size_t iMaxLength, RawCompileType eType = RCT_Escaped)
override;
81 void String(
char **pszString, RawCompileType eType = RCT_Escaped)
override;
82 void String(std::string &str, RawCompileType
type = RCT_Escaped)
override;
83 void Raw(
void *pData,
size_t iSize, RawCompileType eType = RCT_Escaped)
override;
86 void Begin()
override;
103 std::string last_written_string;
106 void CreateKey(HKEY hParent =
nullptr);
107 void WriteDWord(uint32_t iVal);
108 void WriteString(
const char *szStr);
118 StdCompilerConfigRead(HKEY hRoot,
const char *szPath);
119 ~StdCompilerConfigRead()
override;
123 bool hasNaming()
override {
return true; }
127 bool Name(
const char *szName)
override;
128 void NameEnd(
bool fBreak =
false)
override;
136 void DWord(int32_t &rInt)
override;
137 void DWord(uint32_t &rInt)
override;
138 void Word(int16_t &rShort)
override;
139 void Word(uint16_t &rShort)
override;
140 void Byte(int8_t &rByte)
override;
141 void Byte(uint8_t &rByte)
override;
142 void Boolean(
bool &rBool)
override;
144 void String(
char *szString,
size_t iMaxLength, RawCompileType eType = RCT_Escaped)
override;
145 void String(
char **pszString, RawCompileType eType = RCT_Escaped)
override;
146 void String(std::string &str, RawCompileType
type = RCT_Escaped)
override;
147 void Raw(
void *pData,
size_t iSize, RawCompileType eType = RCT_Escaped)
override;
150 void Begin()
override;
169 std::string last_read_string;
170 bool has_read_string =
false;
171 bool has_separator_mismatch =
false;
174 uint32_t ReadDWord();
176 void ResetLastString();
virtual void Raw(void *pData, size_t iSize, RawCompileType eType=RCT_Escaped)=0
virtual bool Separator(Sep eSep=SEP_SEP)
virtual void Character(char &rChar)=0
virtual bool Default(const char *szName)
virtual void Word(int16_t &rShort)=0
virtual void NoSeparator()
virtual void NameEnd(bool fBreak=false)
virtual void Byte(int8_t &rByte)=0
virtual bool FollowName(const char *szName)
virtual void String(char *szString, size_t iMaxLength, RawCompileType eType=RCT_Escaped)=0
virtual void DWord(int32_t &rInt)=0
virtual bool isDeserializer()
virtual bool isRegistry()
virtual void Boolean(bool &rBool)=0
virtual bool Name(const char *szName)