Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6strtable.h
Go to the documentation of this file.
1 
11 #ifndef P6STRTABLE_H__
12 #define P6STRTABLE_H__ 1
13 
14 #include "p6i18n.h"
15 
16 
17 #ifdef __cplusplus
18 namespace P6R {
19 extern "C" {
20 #endif
21 
36  const P6TABFLAGS P6TAB_NOFLAGS = 0x00000000;
37  const P6TABFLAGS P6TAB_READONLY = 0x00000001;
38  const P6TABFLAGS P6TAB_CREATEONNEW = 0x00000002;
39  const P6TABFLAGS P6TAB_TRACEON = 0x00000004;
40 
53  const P6MERGEFLAGS P6MERGE_NOFLAGS = 0x00000000;
54  const P6MERGEFLAGS P6MERGE_USENEW = 0x00000001;
55  const P6MERGEFLAGS P6MERGE_USEOLD = 0x00000002;
56 
57 
66  typedef struct
67  {
68  const P6WCHAR* pKey;
69  const P6WCHAR* pString;
71 
72 
73  #undef INTERFACE
74  #define INTERFACE p6IEnumStringTableSections
76  {
92  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements, const P6WCHAR** parElements, P6UINT32* pcReturned ) P6PURE;
93 
102  P6DECLCOMMETHOD(reset)(P6THIS) P6PURE;
103  };
104  // {E7A653B3-FA8A-4D56-A7EA-6743FDC99931}
105  #define IF_p6IEnumStringTableSections {0xE7A653B3,0xFA8A,0x4D56,{0xA7,0xEA,0x67,0x43,0xFD,0xC9,0x99,0x31}}
106 
112  #undef INTERFACE
113  #define INTERFACE p6IEnumWStrings
115  {
131  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements, P6STRINGWVALUE* parElements, P6UINT32* pcReturned ) P6PURE;
132 
141  P6DECLCOMMETHOD(reset)(P6THIS) P6PURE;
142  };
143 
144  // {78E80AD2-A635-4fa5-9762-2CBA0B3ABFB8}
145  #define IF_p6IEnumWStrings {0x78e80ad2,0xa635,0x4fa5,{0x97,0x62,0x2c,0xba,0xb,0x3a,0xbf,0xb8}}
146 
147 
148  #undef INTERFACE
149  #define INTERFACE p6IEnumStrtblValues
151  {
168  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements, P6STRINGWVALUE* parElements, P6UINT32* pcReturned ) P6PURE;
169 
178  P6DECLCOMMETHOD(reset)(P6THIS) P6PURE;
179  };
180 
181  // {91308656-77FE-46E4-9739-2FE8F4924961}
182  #define IF_p6IEnumStrtblValues {0x91308656,0x77FE,0x46E4,{0x97,0x39,0x2F,0xE8,0xF4,0x92,0x49,0x61}}
183 
184 
192  #undef INTERFACE
193  #define INTERFACE p6IWStrTable
195  {
215  P6DECLCOMMETHOD(initialize)(P6THIS_ P6TABFLAGS fFlags, const P6CHAR* pLocale, const P6WCHAR* pStrTable ) P6PURE;
216 
229  P6DECLCOMMETHOD(reloadStrings)(P6THIS) P6PURE;
230 
250  P6DECLCOMMETHOD(loadString)(P6THIS_ const P6WCHAR* pSectionName, const P6WCHAR* pKey, P6WCHAR* pBuffer, P6UINT32 cBuffer, P6UINT32* pWritten ) P6PURE;
251 
265  P6DECLCOMMETHOD(enumStrings)(P6THIS_ const P6WCHAR* pSectionName, p6IEnumWStrings** ppEnum ) P6PURE;
266 
284  P6DECLCOMMETHOD(storeString)(P6THIS_ const P6WCHAR* pSectionName, const P6WCHAR* pKey, const P6WCHAR* pString ) P6PURE;
285 
303  P6DECLCOMMETHOD(deleteString)(P6THIS_ const P6WCHAR* pSectionName, const P6WCHAR* pKey ) P6PURE;
304 
319  P6DECLCOMMETHOD(mergeStrings)(P6THIS_ P6MERGEFLAGS fFlags, const P6WCHAR* pStrTable ) P6PURE;
320 
347  P6DECLCOMMETHOD(enumValueList)(P6THIS_ const P6WCHAR* pSectionName, const P6WCHAR* pKey, p6IEnumStrtblValues** ppEnum ) P6PURE;
348 
362  P6DECLCOMMETHOD(enumSections)(P6THIS_ p6IEnumStringTableSections** ppEnum ) P6PURE;
363  };
364 
365  // {76798F6B-D5EB-4adb-B4C6-498A5240BF04}
366  #define IF_p6IWStrTable {0x76798f6b,0xd5eb,0x4adb,{0xb4,0xc6,0x49,0x8a,0x52,0x40,0xbf,0x4}}
367 
368  // {1C7A0775-CB77-4fd9-B869-C8D1B272583A}
369  #define COMP_p6WStrTable {0x1c7a0775,0xcb77,0x4fd9,{0xb8,0x69,0xc8,0xd1,0xb2,0x72,0x58,0x3a}}
370 
371  #define GLOBAL_STRTABLE_INTERFACE "P6R.p6IWStrTable.Global"
372 
373 #ifdef __cplusplus
374 }
375 } // namespace
376 #endif
377 
378 #endif
379 
380 
381 
382 
const P6MERGEFLAGS P6MERGE_USENEW
Definition: p6strtable.h:54
const P6MERGEFLAGS P6MERGE_NOFLAGS
Definition: p6strtable.h:53
const P6WCHAR * pString
Definition: p6strtable.h:69
uint32_t P6UINT32
Definition: p6types.h:77
#define P6DECLAREICOM
Definition: p6defs.h:191
const P6TABFLAGS P6TAB_CREATEONNEW
Definition: p6strtable.h:38
#define P6PURE
Definition: p6defs.h:192
This interface supports p6I18n functionality by allowing the mapping of unique keys to strings in a s...
Definition: p6strtable.h:194
const P6TABFLAGS P6TAB_READONLY
Definition: p6strtable.h:37
const P6TABFLAGS P6TAB_TRACEON
Definition: p6strtable.h:39
const P6TABFLAGS P6TAB_NOFLAGS
Definition: p6strtable.h:36
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
const P6WCHAR * pKey
Definition: p6strtable.h:68
A string table file is composed of one or more key - string pair.
Definition: p6strtable.h:114
P6UINT32 P6MERGEFLAGS
P6MERGEFLAGS.
Definition: p6strtable.h:52
Interface definition for all p6I18n and L10n features.
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
#define P6THIS_
Definition: p6defs.h:193
const P6MERGEFLAGS P6MERGE_USEOLD
Definition: p6strtable.h:55
P6UINT32 P6TABFLAGS
P6TABFLAGS.
Definition: p6strtable.h:35
#define P6THIS
Definition: p6defs.h:194
char P6CHAR
Narrow character type.
Definition: p6types.h:105
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188
The string table file is composed of one or more lines where each line is of the form: pKey=pString...
Definition: p6strtable.h:66