From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Plugins/General/gen_ml/config.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Src/Plugins/General/gen_ml/config.h (limited to 'Src/Plugins/General/gen_ml/config.h') diff --git a/Src/Plugins/General/gen_ml/config.h b/Src/Plugins/General/gen_ml/config.h new file mode 100644 index 00000000..7cc00ebd --- /dev/null +++ b/Src/Plugins/General/gen_ml/config.h @@ -0,0 +1,31 @@ +#ifndef _C_CONFIG_H_ +#define _C_CONFIG_H_ + +class C_Config +{ +public: + C_Config( wchar_t *ini ); + ~C_Config(); + + void WriteInt( wchar_t *name, int value ); + wchar_t *WriteString( wchar_t *name, wchar_t *string ); + char *WriteString( char *name, char *string ); + + int ReadInt( wchar_t *name, int defvalue ); + wchar_t *ReadString( wchar_t *name, wchar_t *defvalue ); + char *ReadString( const char *name, char *defvalue ); + char *ReadString( const char *section_name, const char *key_name, char *defvalue ); + bool ReadString( const char *name, const char *defvalue, char *storage, size_t len ); // returns true + bool ReadString( const wchar_t *name, const wchar_t *defvalue, wchar_t *storage, size_t len ); // returns true + + wchar_t *GetIniFile() { return m_inifile; } + +private: + wchar_t m_strbuf[ 8192 ]; + char m_strbufA[ 8192 ]; + wchar_t *m_inifile; + char *m_inifileA; + wchar_t *m_section; +}; + +#endif//_C_CONFIG_H_ \ No newline at end of file -- cgit