]> SALOME platform Git repositories - modules/gui.git/blob - src/DDS/DDS_KeyWords.cxx
Salome HOME
2f53d2a9258bf5ae3b32d98e317509b7910bd48b
[modules/gui.git] / src / DDS / DDS_KeyWords.cxx
1 #include "DDS_KeyWords.h"
2
3 IMPLEMENT_STANDARD_HANDLE(DDS_KeyWords, MMgt_TShared)
4 IMPLEMENT_STANDARD_RTTIEXT(DDS_KeyWords, MMgt_TShared)
5
6 DDS_KeyWords::DDS_KeyWords()
7 : MMgt_TShared()
8 {
9   SetKeyWord( "D_URI",                "dictionary" );
10
11   SetKeyWord( "COMPONENT",            "component" );
12   SetKeyWord( "COMPONENT_NAME",       "name" );
13
14   SetKeyWord( "UNIT_SYSTEMS",         "unitSystems" );
15   SetKeyWord( "UNIT_SYSTEM",          "system" );
16   SetKeyWord( "UNIT_SYSTEM_NAME",     "name" );
17   SetKeyWord( "UNIT_SYSTEM_LABEL",    "label" );
18
19   SetKeyWord( "DATUM",                "datum" );
20   SetKeyWord( "DATUM_ID",             "id" );
21   SetKeyWord( "DATUM_LABEL",          "label" );
22   SetKeyWord( "DATUM_UNITS",          "units" );
23   SetKeyWord( "DATUM_FORMAT",         "format" );
24   SetKeyWord( "DATUM_FILTER",         "filter" );
25   SetKeyWord( "DATUM_REQUIRED",       "required" );
26
27   SetKeyWord( "VALUE_LIST",           "valueList" );
28   SetKeyWord( "VALUE_LIST_ID",        "listid" );
29   SetKeyWord( "VALUE_LIST_NAME",      "name" );
30   SetKeyWord( "VALUE_LIST_TYPE",      "type" );
31   SetKeyWord( "VALUE_LIST_VALUE",     "value" );
32   SetKeyWord( "VALUE_LIST_VALUEID",   "id" );
33   SetKeyWord( "VALUE_LIST_VALUEICON", "icon" );
34
35   SetKeyWord( "DY_DOMAIN",            "domain" );
36   SetKeyWord( "WARNING_LEVEL",        "warningLevel" );
37   SetKeyWord( "WRONG_VALUE",          "wrongValue" );
38   SetKeyWord( "VALUE_DESCR",          "valueDescr" );
39   SetKeyWord( "VALUE_LIST_REF",       "listRef" );
40
41   SetKeyWord( "DESCR",                "description" );
42   SetKeyWord( "LONG_D",               "longDescr" );
43   SetKeyWord( "SHORT_D",              "shortDescr" );
44
45   SetKeyWord( "VD_TYPE",              "type" );
46   SetKeyWord( "VD_DEFV",              "default" );
47   SetKeyWord( "VD_MAXV",              "max" );
48   SetKeyWord( "VD_MINV",              "min" );
49   SetKeyWord( "VD_SPEC",              "specVal" );
50   SetKeyWord( "VLR_LIST",             "list" );
51   SetKeyWord( "PRS",                  "presentation" );
52   SetKeyWord( "LATERAL_ZOOM",         "lateralZoom" );
53   SetKeyWord( "LZ_MINV",              "min" );
54   SetKeyWord( "LZ_MAXV",              "max" );
55   SetKeyWord( "LZ_ORDER",             "order" );
56 }
57
58 Handle(DDS_KeyWords) DDS_KeyWords::Get()
59 {
60   static Handle(DDS_KeyWords) keyWords;
61
62   if ( keyWords.IsNull() )
63     keyWords = new DDS_KeyWords();
64
65   return keyWords;
66 }
67
68 TCollection_AsciiString DDS_KeyWords::GetKeyWord( const TCollection_AsciiString& key ) const
69 {
70   TCollection_AsciiString keyWord;
71   if ( myKeyWord.IsBound( key ) )
72     keyWord = myKeyWord.Find( key );
73   return keyWord;
74 }
75
76 void DDS_KeyWords::SetKeyWord( const TCollection_AsciiString& key,
77                                const TCollection_AsciiString& keyWord )
78 {
79   if ( myKeyWord.IsBound( key ) )
80     myKeyWord.UnBind( key );
81
82   myKeyWord.Bind( key, keyWord );
83 }