Back to index

salome-gui  6.5.0
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
DDS_KeyWords Class Reference

This class defines the pairs of internal keys and XML tags or attributes names. More...

#include <DDS_KeyWords.h>

List of all members.

Public Member Functions

Standard_EXPORT
TCollection_AsciiString 
GetKeyWord (const TCollection_AsciiString &) const
 Get the XML keyword by specified internal key key.
Standard_EXPORT void SetKeyWord (const TCollection_AsciiString &, const TCollection_AsciiString &)
 Register the pair of the internal key key and XML keyword keyWord.

Static Public Member Functions

static Standard_EXPORT Handle (DDS_KeyWords) Get()

Private Types

typedef NCollection_DataMap
< TCollection_AsciiString,
TCollection_AsciiString > 
KeyWordMap

Private Member Functions

 DDS_KeyWords ()
 Constructor.

Private Attributes

KeyWordMap myKeyWord

Detailed Description

This class defines the pairs of internal keys and XML tags or attributes names.

This class allows user to define a set of XML keywords used in the datums definition (XML) file.

Default keywords table:

There is the only instance of the class DDS_KeyWords in the application which can be retrieved by method Get().

Definition at line 36 of file DDS_KeyWords.h.


Member Typedef Documentation

typedef NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString> DDS_KeyWords::KeyWordMap [private]

Definition at line 50 of file DDS_KeyWords.h.


Constructor & Destructor Documentation

Constructor.

Create an instance of the object. Can not be used directly. Use Get() method instead.

Definition at line 90 of file DDS_KeyWords.cxx.

: MMgt_TShared()
{
  SetKeyWord( "D_URI",                "dictionary" );

  SetKeyWord( "COMPONENT",            "component" );
  SetKeyWord( "COMPONENT_NAME",       "name" );

  SetKeyWord( "UNIT_SYSTEMS",         "unitSystems" );
  SetKeyWord( "UNIT_SYSTEM",          "system" );
  SetKeyWord( "UNIT_SYSTEM_NAME",     "name" );
  SetKeyWord( "UNIT_SYSTEM_LABEL",    "label" );

  SetKeyWord( "DATUM",                "datum" );
  SetKeyWord( "DATUM_ID",             "id" );
  SetKeyWord( "DATUM_LABEL",          "label" );
  SetKeyWord( "DATUM_UNITS",          "units" );
  SetKeyWord( "DATUM_FORMAT",         "format" );
  SetKeyWord( "DATUM_FILTER",         "filter" );
  SetKeyWord( "DATUM_REQUIRED",       "required" );

  SetKeyWord( "VALUE_LIST",           "valueList" );
  SetKeyWord( "VALUE_LIST_ID",        "listid" );
  SetKeyWord( "VALUE_LIST_NAME",      "name" );
  SetKeyWord( "VALUE_LIST_TYPE",      "type" );
  SetKeyWord( "VALUE_LIST_VALUE",     "value" );
  SetKeyWord( "VALUE_LIST_VALUEID",   "id" );
  SetKeyWord( "VALUE_LIST_VALUEICON", "icon" );

  SetKeyWord( "DY_DOMAIN",            "domain" );
  SetKeyWord( "WARNING_LEVEL",        "warningLevel" );
  SetKeyWord( "WRONG_VALUE",          "wrongValue" );
  SetKeyWord( "VALUE_DESCR",          "valueDescr" );
  SetKeyWord( "VALUE_LIST_REF",       "listRef" );

  SetKeyWord( "DESCR",                "description" );
  SetKeyWord( "LONG_D",               "longDescr" );
  SetKeyWord( "SHORT_D",              "shortDescr" );

  SetKeyWord( "VD_TYPE",              "type" );
  SetKeyWord( "VD_DEFV",              "default" );
  SetKeyWord( "VD_MAXV",              "max" );
  SetKeyWord( "VD_MINV",              "min" );
  SetKeyWord( "VD_SPEC",              "specVal" );
  SetKeyWord( "VLR_LIST",             "list" );
  SetKeyWord( "PRS",                  "presentation" );
  SetKeyWord( "LATERAL_ZOOM",         "lateralZoom" );
  SetKeyWord( "LZ_MINV",              "min" );
  SetKeyWord( "LZ_MAXV",              "max" );
  SetKeyWord( "LZ_ORDER",             "order" );

  SetKeyWord( "OPTIONS",              "options" );
  SetKeyWord( "OPTION",               "option" );
  SetKeyWord( "OPTION_NAME",          "name" );
}

Member Function Documentation

TCollection_AsciiString DDS_KeyWords::GetKeyWord ( const TCollection_AsciiString &  key) const

Get the XML keyword by specified internal key key.

If the internal key is not registered, empty string is returned.

Parameters:
keyinternal key
Returns:
XML keyword

Definition at line 167 of file DDS_KeyWords.cxx.

{
  TCollection_AsciiString keyWord;
  if ( myKeyWord.IsBound( key ) )
    keyWord = myKeyWord.Find( key );
  return keyWord;
}
void DDS_KeyWords::SetKeyWord ( const TCollection_AsciiString &  key,
const TCollection_AsciiString &  keyWord 
)

Register the pair of the internal key key and XML keyword keyWord.

Parameters:
keyinternal key
keyWordXML keyword

Definition at line 180 of file DDS_KeyWords.cxx.

{
  if ( myKeyWord.IsBound( key ) )
    myKeyWord.UnBind( key );

  myKeyWord.Bind( key, keyWord );
}

Member Data Documentation

Definition at line 53 of file DDS_KeyWords.h.


The documentation for this class was generated from the following files: