home *** CD-ROM | disk | FTP | other *** search
- #ifndef CATALOGF_H
- #define CATALOGF_H
- // This is the header (interface) for the LocaleF class, where it is defined.
- // In order to use this class, include this file in your code.
-
- // You need to initialize LocaleBase in main() yourself, since
- // auto-library-open that some compilers have exit when it can not open
- // the library, and in this case, we do not need to exit, simply use the
- // built-in strings ...
- // Well this is not really truth. I have changed the locale portion of
- // libauto.a (GNUC++ 2.5.8) so that I can use auto-open with locale. This
- // way, I do not have to open LocaleBase myself. I hope this changes will be
- // included in next distributions of GNUC++. Till that there are two ways:
- // open locale.library yourself, or tell me to mail you the new libauto.a...
- extern struct LocaleBase* LocaleBase;
-
- #include <exec/types.h>
-
- // Here we define the data type that will be used defining the strings
- // from the .cd file ...
- typedef const struct {
- LONG ID;
- STRPTR cadena;
- } MensajeCAT;
-
- class CatalogF
- {
- public:
- CatalogF( struct Locale *loc,
- const STRPTR language,
- const STRPTR catalogfile,
- const STRPTR builtInLanguage,
- const LONG version );
- const STRPTR GetString(MensajeCAT& mens) const;
- // get the string of this ID
- // we give a const struct and return
- // a const pointer
- ~CatalogF(); // simply close the catalog
- private:
- struct Catalog* catalogo;
- }; // THIS SEMICOLON IS ESSENTIAL (TWO HOURS to realize for that!!!)
-
- #endif // CATALOGF_H
-