revert between 56095 -> 55830 in arch
[AROS.git] / tools / flexcat / src / sd / C++_CatalogF.h
blob768e7fadd380cc4c33096452b0abac4e9046d893
1 ##rem $Id$
3 #ifndef CATALOGF_H
4 #define CATALOGF_H
5 // Interface file
6 // MUST be included in your code.
7 // If you are using FlexCat, you only need to include the header
8 // file generated by it.
9 // The locale.library is opened whenever is needed ...
11 #include <exec/types.h>
13 extern struct LocaleBase* LocaleBase;
14 // data-type that will be used to define the strings from the .cd file ...
15 // so, you need (if you want hard code) a file with a set of structures
16 // of this type, containing an identificator ID, and the string itself.
17 // this way, you could use this class without FlexCat and Locale.library,
18 // although i do not think WHY should you do that :)
19 struct CatMessage {
20 LONG ID;
21 STRPTR textstring;
24 class CatalogF
26 public:
27 CatalogF( const STRPTR catalogFileName,
28 const STRPTR builtInLanguage ="english", // default
29 const LONG versionNumber =0 , // match any
30 const STRPTR languageName =0, // use user defined
31 struct Locale* loc =0 ); // user defined
32 const STRPTR GetStr(const CatMessage& mess) const;
33 ~CatalogF();
34 private:
35 struct Catalog* thecatalog;
36 static unsigned counter; // counter of opened objects
37 // static struct LocaleBase* LocaleBase; // we do not bother if other
38 // opened the library before
40 #endif // CATALOGF_H