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 namespace P6R {
17 
18 #ifdef __cplusplus
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 
74 {
89  P6COMMETHOD next( P6UINT32 cElements, const P6WCHAR** parElements, P6UINT32* pcReturned ) = 0;
90 
99  P6COMMETHOD reset() = 0;
100 };
101 // {E7A653B3-FA8A-4D56-A7EA-6743FDC99931}
102 #define IF_p6IEnumStringTableSections {0xE7A653B3,0xFA8A,0x4D56,{0xA7,0xEA,0x67,0x43,0xFD,0xC9,0x99,0x31}}
103 
110 {
125  P6COMMETHOD next( P6UINT32 cElements, P6STRINGWVALUE* parElements, P6UINT32* pcReturned ) = 0;
126 
135  P6COMMETHOD reset() = 0;
136 };
137 
138 // {78E80AD2-A635-4fa5-9762-2CBA0B3ABFB8}
139 #define IF_p6IEnumWStrings {0x78e80ad2,0xa635,0x4fa5,{0x97,0x62,0x2c,0xba,0xb,0x3a,0xbf,0xb8}}
140 
141 
143 {
159  P6COMMETHOD next( P6UINT32 cElements, P6STRINGWVALUE* parElements, P6UINT32* pcReturned ) = 0;
160 
169  P6COMMETHOD reset() = 0;
170 };
171 
172 // {91308656-77FE-46E4-9739-2FE8F4924961}
173 #define IF_p6IEnumStrtblValues {0x91308656,0x77FE,0x46E4,{0x97,0x39,0x2F,0xE8,0xF4,0x92,0x49,0x61}}
174 
175 
183 interface p6IWStrTable : public p6ICom
184 {
203  P6COMMETHOD initialize( P6TABFLAGS fFlags, const P6CHAR* pLocale, const P6WCHAR* pStrTable ) = 0;
204 
218 
238  P6COMMETHOD loadString( const P6WCHAR* pSectionName, const P6WCHAR* pKey, P6WCHAR* pBuffer, P6UINT32 cBuffer, P6UINT32* pWritten ) = 0;
239 
253  P6COMMETHOD enumStrings( const P6WCHAR* pSectionName, p6IEnumWStrings** ppEnum ) = 0;
254 
272  P6COMMETHOD storeString( const P6WCHAR* pSectionName, const P6WCHAR* pKey, const P6WCHAR* pString ) = 0;
273 
291  P6COMMETHOD deleteString( const P6WCHAR* pSectionName, const P6WCHAR* pKey ) = 0;
292 
307  P6COMMETHOD mergeStrings( P6MERGEFLAGS fFlags, const P6WCHAR* pStrTable ) = 0;
308 
335  P6COMMETHOD enumValueList( const P6WCHAR* pSectionName, const P6WCHAR* pKey, p6IEnumStrtblValues** ppEnum ) = 0;
336 
351 };
352 
353 // {76798F6B-D5EB-4adb-B4C6-498A5240BF04}
354 #define IF_p6IWStrTable {0x76798f6b,0xd5eb,0x4adb,{0xb4,0xc6,0x49,0x8a,0x52,0x40,0xbf,0x4}}
355 
356 // {1C7A0775-CB77-4fd9-B869-C8D1B272583A}
357 #define COMP_p6WStrTable {0x1c7a0775,0xcb77,0x4fd9,{0xb8,0x69,0xc8,0xd1,0xb2,0x72,0x58,0x3a}}
358 
359 #define GLOBAL_STRTABLE_INTERFACE "P6R.p6IWStrTable.Global"
360 
361 
362 #ifdef __cplusplus
363 }
364 #endif
365 
366 } // namespace
367 
368 
369 #endif
370 
371 
372 
373 
const P6MERGEFLAGS P6MERGE_USENEW
Definition: p6strtable.h:54
const P6MERGEFLAGS P6MERGE_NOFLAGS
Definition: p6strtable.h:53
virtual P6R::P6ERR reset()=0
This method is used to re-start the enumerator at the beginning.
const P6WCHAR * pString
Definition: p6strtable.h:69
unsigned int P6UINT32
Definition: p6types.h:40
const P6TABFLAGS P6TAB_CREATEONNEW
Definition: p6strtable.h:38
virtual P6R::P6ERR next(P6UINT32 cElements, P6STRINGWVALUE *parElements, P6UINT32 *pcReturned)=0
This method is used to iterate through multiple value for the specfied key.
virtual P6R::P6ERR reset()=0
This method is used to re-start the enumerator at the beginning.
virtual P6R::P6ERR reloadStrings()=0
Discard all existing strings and re-read string table file specified in the initialize call...
virtual P6R::P6ERR enumSections(p6IEnumStringTableSections **ppEnum)=0
Creates and returns an enumertor for the string tables sections.
This interface supports p6I18n functionality by allowing the mapping of unique keys to strings in a s...
Definition: p6strtable.h:183
const P6TABFLAGS P6TAB_READONLY
Definition: p6strtable.h:37
const P6TABFLAGS P6TAB_TRACEON
Definition: p6strtable.h:39
const P6TABFLAGS P6TAB_NOFLAGS
Definition: p6strtable.h:36
virtual P6R::P6ERR mergeStrings(P6MERGEFLAGS fFlags, const P6WCHAR *pStrTable)=0
Read all the strings defined in the pStrTable file and add them to the existing in RAM string table...
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
P6R::P6UINT32 P6MERGEFLAGS
P6MERGEFLAGS.
Definition: p6strtable.h:52
virtual P6R::P6ERR reset()=0
This method is used to re-start the enumerator at the beginning.
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR enumValueList(const P6WCHAR *pSectionName, const P6WCHAR *pKey, p6IEnumStrtblValues **ppEnum)=0
This method returns an enumerator for the specified string table section and key. ...
P6R::P6UINT32 P6TABFLAGS
P6TABFLAGS.
Definition: p6strtable.h:35
const P6WCHAR * pKey
Definition: p6strtable.h:68
A string table file is composed of one or more key - string pair.
Definition: p6strtable.h:109
virtual P6R::P6ERR next(P6UINT32 cElements, P6STRINGWVALUE *parElements, P6UINT32 *pcReturned)=0
This method is used to iterate the currently defined pKey - string pair.
Interface definition for all p6I18n and L10n features.
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR storeString(const P6WCHAR *pSectionName, const P6WCHAR *pKey, const P6WCHAR *pString)=0
Define a new string or replace the string associated with an existing "pKey" parameter.
virtual P6R::P6ERR loadString(const P6WCHAR *pSectionName, const P6WCHAR *pKey, P6WCHAR *pBuffer, P6UINT32 cBuffer, P6UINT32 *pWritten)=0
Load the internationalized string that is associated with the strings name represented by the "pKey" ...
virtual P6R::P6ERR deleteString(const P6WCHAR *pSectionName, const P6WCHAR *pKey)=0
Remove the string associated with the "pKey" parameter in the loaded string table.
const P6MERGEFLAGS P6MERGE_USEOLD
Definition: p6strtable.h:55
virtual P6R::P6ERR initialize(P6TABFLAGS fFlags, const P6CHAR *pLocale, const P6WCHAR *pStrTable)=0
Sets up the object to run properly.
virtual P6R::P6ERR next(P6UINT32 cElements, const P6WCHAR **parElements, P6UINT32 *pcReturned)=0
This method is used to iterate the currently defined sections in a string table.
virtual P6R::P6ERR enumStrings(const P6WCHAR *pSectionName, p6IEnumWStrings **ppEnum)=0
Creates and returns an enumerator for all the strings in the initialized string table.
char P6CHAR
Narrow character type.
Definition: p6types.h:71
The string table file is composed of one or more lines where each line is of the form: pKey=pString...
Definition: p6strtable.h:66