FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEnlmData.h
Go to the documentation of this file.
1 #ifndef _OME_NLM_DATA_H
2 #define _OME_NLM_DATA_H "$Id: OMEnlmData.h 312 2020-03-21 21:25:35Z geoff $"
4 
14 # include <OMEtype.h>
15 
19 {
20 private:
23 
24  OMEstring *findCatalogFile() const;
25 
26  int readFile(const OMEstring &fName);
27 
28 public:
29  static OMEnlmCatalog *getCatalog(const OMEstring &catName, const OMEstring &lang);
30 
35  uint32_t fileModTime;
36 
37  OMEnlmCatalog(const OMEstring &catName, const OMEstring &lang);
38 
39  ~OMEnlmCatalog();
40 
41  const OMEstring *findMessage(const OMEstring &messId);
42 }; // end class OMEnlmCatalog
43 
47 {
48  friend class OMEnlmStorage; // not currently needed
49 public:
50  static void initialize(const char *appName, const char *lang = nullptr);
51 
53  OMEtype messageID; // nil => Uniforum style
54  OMEstring catalogName; // application name?
55 
56  OMEnlmData(const char *dMess, const uint32_t messID = 0,
57  const char *catName = nullptr);
58 
59  OMEnlmData(const OMEstring &dMess, const OMEtype *messID = nullptr,
60  const OMEstring *catName = nullptr);
61 
63 
64  bool operator==(const OMEnlmData &arg) const;
65 
66  bool operator!=(const OMEnlmData &arg) const;
67 
68  const OMEstring &getMessage(const OMEstring *lang = nullptr) const;
69 
70  void getMessageInfo(OMEarray &list) const
71  {
72  list[0] = defaultMessage;
73  list[1] = messageID;
74  list[2] = catalogName;
75  }
76 }; // end class OMEnlmData
77 
81 #endif
82 /* vim: set expandtab shiftwidth=4 tabstop=4: */
OMEnlmCatalog::nextEntry
OMEnlmCatalog * nextEntry
Definition: OMEnlmData.h:22
operator!=
bool operator!=(const OMEtype &lArg, const OMEtype &rArg)
Definition: OMEtype_operators.cpp:5508
OMEnlmData::~OMEnlmData
~OMEnlmData()
Definition: OMEnlmData.h:62
OMEnlmCatalog::~OMEnlmCatalog
~OMEnlmCatalog()
Definition: OMEnlmData.cpp:46
OME_DELETE_OBJECT
#define OME_DELETE_OBJECT(ptr)
Definition: OMEmanifests.h:159
OMEnlmData
Identifier for an OME Native Language Message.
Definition: OMEnlmData.h:46
OMEnlmCatalog::fileModTime
uint32_t fileModTime
Definition: OMEnlmData.h:35
OMEnlmCatalog::readFile
int readFile(const OMEstring &fName)
Definition: OMEnlmData.cpp:52
OMEnlmData::catalogName
OMEstring catalogName
Definition: OMEnlmData.h:54
OMEfunctions.h
OME utility functions.
OMEnlmCatalog::getCatalog
static OMEnlmCatalog * getCatalog(const OMEstring &catName, const OMEstring &lang)
Definition: OMEnlmData.cpp:16
OMEnlmCatalog::langID
OMEstring langID
Definition: OMEnlmData.h:32
OMEassoc
Implements associative array of OMEtype elements.
Definition: OMEassoc.h:112
OMEstring
Implements text and binary string storage.
Definition: OMEstring.h:305
OMEarray::indexExists
bool indexExists(const uint32_t i) const
Definition: OMEarray.h:202
OMEtype::value
union OMEtype::@26 value
OMEtype
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
OMEassoc::indexExists
bool indexExists(const ASSOC_HASH_KEY_t i) const
Definition: OMEassoc.h:226
OMEstring::determineCharacterSet
void determineCharacterSet()
Definition: OMEstring.h:391
OMEtype::s
class OMEstring * s
Definition: OMEbaseType.h:299
OMEnlmStorage
Referenced-counted storage for an OME Native Language Message.
Definition: OMEnlm.h:22
OMEnlmData::getMessage
const OMEstring & getMessage(const OMEstring *lang=nullptr) const
Definition: OMEnlmData.cpp:570
OMEnlmData::operator!=
bool operator!=(const OMEnlmData &arg) const
Definition: OMEnlmData.cpp:556
OMEnlmData::OMEnlmData
OMEnlmData(const char *dMess, const uint32_t messID=0, const char *catName=nullptr)
Definition: OMEnlmData.cpp:493
EOF
#define EOF
Definition: tmp.o.cpp:135
OMEnlmData::defaultMessage
OMEstring defaultMessage
Definition: OMEnlmData.h:52
srcID
const char srcID[]
Definition: catSym.c:17
OME_STRING
@ OME_STRING
Definition: OMEmanifests.h:85
OMEnlmCatalog::catalogFileName
OMEstring * catalogFileName
Definition: OMEnlmData.h:33
OMEnlmData::messageID
OMEtype messageID
Definition: OMEnlmData.h:53
OMEnlmCatalog::catalogList
static OMEnlmCatalog * catalogList
Definition: OMEnlmData.h:21
OMEnlmCatalog
Interface to OME Native Language Message catalog.
Definition: OMEnlmData.h:18
OMEtype.h
OME fundamental type implementation.
OMEnlmData::initialize
static void initialize(const char *appName, const char *lang=nullptr)
Definition: OMEnlmData.cpp:455
OMEstring::length
size_t length() const
Definition: OMEstring.h:401
OMEnlmCatalog::messageTable
OMEassoc * messageTable
Definition: OMEnlmData.h:34
OME_USED
const char srcID[] OME_USED
Definition: tick_time.cpp:24
OMEfindFileInDirectory
OMEstring * OMEfindFileInDirectory(const OMEstring &fileName, const OMEarray &dirNames)
Search for a file located within a list of directories specified as elements of an OMEarray.
Definition: OMEfindFile.cpp:292
LC_ALL
#define LC_ALL
Definition: tmp.o.cpp:271
OMEnlmData.h
OME native language message catalog implementation.
OME_DLL_EXPORT
#define OME_DLL_EXPORT
Definition: compiler_hints.h:464
OMEarray
Implements sparse array of OMEtype elements.
Definition: OMEarray.h:75
OMEnlmCatalog::findCatalogFile
OMEstring * findCatalogFile() const
Definition: OMEnlmData.cpp:281
OMEnlmCatalog::catalogName
OMEstring catalogName
Definition: OMEnlmData.h:31
OMEnlmData::getMessageInfo
void getMessageInfo(OMEarray &list) const
Definition: OMEnlmData.h:70
OMEnlmCatalog::findMessage
const OMEstring * findMessage(const OMEstring &messId)
Definition: OMEnlmData.cpp:253
OMEtype::type
uint32_t type
Definition: OMEbaseType.h:304
OMEnlmCatalog::OMEnlmCatalog
OMEnlmCatalog(const OMEstring &catName, const OMEstring &lang)
Definition: OMEnlmData.cpp:35
OMEarray::ARRAY_SUBSCRIPT_t
OMEarrayStorage::ARRAY_SUBSCRIPT_t ARRAY_SUBSCRIPT_t
Definition: OMEarray.h:90
operator==
bool operator==(const OMEtype &lArg, const OMEtype &rArg)
Definition: OMEtype_operators.cpp:33
OMEparsePathSpecification
OMEarray * OMEparsePathSpecification(const OMEstring &spec)
Parse a list of directories specified by a string path into an sequence of OMEarray elements.
Definition: OMEfindFile.cpp:236
OMEnlmData::operator==
bool operator==(const OMEnlmData &arg) const
Definition: OMEnlmData.cpp:542
Generated: Fri Jul 31 2020 18:19:15
Support Information