diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2007-08-27 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:54 +0300 |
commit | 051769bbc577aeede90558b6ab5c9be187940ca0 (patch) | |
tree | e6330cb80f2d4a526d8aa27812528e053b0cda90 /CPP/7zip/UI/FileManager/TextPairs.h | |
parent | 33ccab7e728a996800e166d849fe1e92a17e1afe (diff) |
4.53 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/TextPairs.h')
-rwxr-xr-x | CPP/7zip/UI/FileManager/TextPairs.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/CPP/7zip/UI/FileManager/TextPairs.h b/CPP/7zip/UI/FileManager/TextPairs.h new file mode 100755 index 00000000..b75d9c72 --- /dev/null +++ b/CPP/7zip/UI/FileManager/TextPairs.h @@ -0,0 +1,31 @@ +// Common/TextPairs.h + +#ifndef __COMMON_TEXTPAIRS_H +#define __COMMON_TEXTPAIRS_H + +#include "Common/MyString.h" + +struct CTextPair +{ + UString ID; + UString Value; +}; + +class CPairsStorage +{ + CObjectVector<CTextPair> Pairs; + int FindID(const UString &id, int &insertPos); + int FindID(const UString &id); + void Sort(); +public: + void Clear() { Pairs.Clear(); }; + bool ReadFromString(const UString &text); + void SaveToString(UString &text); + + bool GetValue(const UString &id, UString &value); + UString GetValue(const UString &id); + void AddPair(const CTextPair &pair); + void DeletePair(const UString &id); +}; + +#endif |