This class provides an information about datum (phisical characteristic parameter).
#include <DDS_DicItem.h>

Data Structures | |
| struct | UnitData |
Public Types | |
| enum | Type { String, Float, Integer, List, Unknown } |
| enum | Data { MinValue = 0x01, MaxValue = 0x02, DefaultValue = 0x04 } |
| typedef TCollection_AsciiString | UnitSystem |
Public Member Functions | |
| DDS_DicItem () | |
| Constructor. | |
| Standard_EXPORT TCollection_AsciiString | GetId () const |
| Get the identifier of parameter. | |
| Standard_EXPORT DDS_DicItem::Type | GetType () const |
| Get the type of parameter. | |
| Standard_EXPORT TCollection_ExtendedString | GetLabel () const |
| Get the label of the parameter. | |
| Standard_EXPORT TCollection_ExtendedString | GetFilter () const |
| Get the filter (regular expression) for the parameter values. | |
| Standard_EXPORT TCollection_ExtendedString | GetRequired () const |
| Get the Required attribute of the parameter. | |
| Standard_EXPORT DDS_MsgType | GetWarningLevel () const |
| Get the wrong value warning level of the parameter. | |
| Standard_EXPORT TCollection_ExtendedString | GetLongDescription () const |
| Get the long description of the parameter. | |
| Standard_EXPORT TCollection_ExtendedString | GetShortDescription () const |
| Get the short description of the parameter. | |
| Standard_EXPORT TCollection_AsciiString | GetComponent () const |
| Get the name of the component (parameter owner). | |
| Standard_EXPORT TCollection_AsciiString | GetUnits () const |
| Get the parameter measure units for active units system. | |
| Standard_EXPORT TCollection_AsciiString | GetUnits (const UnitSystem &) const |
| Get the parameter measure units for specified units system theSystem. | |
| Standard_EXPORT TCollection_ExtendedString | GetDefaultValue () const |
| Get the default value of the parameter for active units system. | |
| Standard_EXPORT TCollection_ExtendedString | GetDefaultValue (const UnitSystem &) const |
| Get the default value of the parameter for specified units system theSystem. | |
| Standard_EXPORT Standard_Real | GetMinValue () const |
| Get the minimum value of the parameter for active units system. | |
| Standard_EXPORT Standard_Real | GetMinValue (const UnitSystem &) const |
| Get the minimum value of the parameter for the specified units system theSystem. | |
| Standard_EXPORT Standard_Real | GetMaxValue () const |
| Get the maximum value of the parameter for active units system. | |
| Standard_EXPORT Standard_Real | GetMaxValue (const UnitSystem &) const |
| Get the maximum value of the parameter for specified units system theSystem. | |
| Standard_EXPORT Standard_Integer | GetPrecision () const |
| Get the precision (number of digits after decimal point) of the parameter for active units system. | |
| Standard_EXPORT Standard_Integer | GetPrecision (const UnitSystem &) const |
| Get the precision (number of digits after decimal point) of the parameter for specified units system theSystem. | |
| Standard_EXPORT TCollection_AsciiString | GetFormat (const Standard_Boolean=Standard_True) const |
| Get the format string of the parameter for active units system. | |
| Standard_EXPORT TCollection_AsciiString | GetFormat (const UnitSystem &, const Standard_Boolean=Standard_True) const |
| Get the format string of the parameter for specified units system theSystem. | |
| Standard_EXPORT TCollection_ExtendedString | GetNameOfValues () const |
| Get the name of a list referenced by the parameter. | |
| Standard_EXPORT Standard_Boolean | GetListOfValues (Handle(TColStd_HArray1OfExtendedString)&, Handle(TColStd_HArray1OfInteger)&) const |
| Get item names and item identifiers of a list referenced by the parameter. | |
| Standard_EXPORT Standard_Boolean | GetListOfValues (Handle(TColStd_HArray1OfExtendedString)&, Handle(TColStd_HArray1OfInteger)&, Handle(TColStd_HArray1OfExtendedString)&) const |
| Get item names, item identifiers and item icons of a list referenced by the parameter. | |
| Standard_EXPORT Standard_Boolean | GetSpecialValues (TColStd_MapOfReal &) const |
| Get special values of the parameter. | |
| Standard_EXPORT Standard_Real | GetMinZoom () const |
| Get minimum value of lateral zooming. | |
| Standard_EXPORT Standard_Real | GetMaxZoom () const |
| Get maximum value of lateral zooming. | |
| Standard_EXPORT Standard_Real | GetZoomOrder () const |
| Get order of lateral zooming. | |
| Standard_EXPORT Standard_Real | ToSI (const Standard_Real) const |
| Convert value theVal to the default SI units according to the active units system. | |
| Standard_EXPORT Standard_Real | FromSI (const Standard_Real) const |
| Convert value theVal from the default SI units according to the active units system. | |
| Standard_EXPORT Standard_Real | ToSI (const Standard_Real, const UnitSystem &) const |
| Convert value to the default SI units according to the units system theUnitsSystem. | |
| Standard_EXPORT Standard_Real | FromSI (const Standard_Real, const UnitSystem &) const |
| Convert value from the default SI units according to the units system theUnitsSystem. | |
| Standard_EXPORT Standard_Boolean | HasData (const Standard_Integer) const |
| Check data existence. | |
| Standard_EXPORT TCollection_ExtendedString | GetOption (const TCollection_AsciiString &) const |
| Get option for specified name name. | |
| Standard_EXPORT Standard_Boolean | GetOptionNames (TColStd_SequenceOfAsciiString &) const |
| Get names of all existing options. | |
Private Types | |
| typedef NCollection_DataMap < TCollection_AsciiString, TCollection_ExtendedString > | OptionsMap |
Private Member Functions | |
| DDS_DicItem (const DDS_DicItem &) | |
| Copy constructor (put in private section to prevent object copying). | |
| void | operator= (const DDS_DicItem &) |
| Assignment operator (put in private section to prevent object copying). | |
| void | FillDataMap (TCollection_AsciiString, const LDOM_Element &, const LDOM_Element &, const LDOM_Element &, const TColStd_SequenceOfAsciiString &) |
| Parse record from XML file and retrieve information relevant for the dictionary item. | |
| void | PrepareFormats (const TCollection_AsciiString &) |
| Prepare formats for all units systems. | |
| void | GetDefaultFormat () |
| Restore default formats for all the units systems. | |
| UnitSystem | GetActiveUnitSystem () const |
| Get the active units system. | |
| void | GetStringFormat (const TCollection_AsciiString &, const TCollection_AsciiString &, const TCollection_AsciiString &, const TCollection_AsciiString &, TCollection_AsciiString &) |
| Get format for the string. | |
| void | GetIntegerFormat (const TCollection_AsciiString &, const TCollection_AsciiString &, const TCollection_AsciiString &, const TCollection_AsciiString &, const Standard_Character, TCollection_AsciiString &) |
| Get format for the integer. | |
| void | GetFloatFormat (const TCollection_AsciiString &, const TCollection_AsciiString &, const TCollection_AsciiString &, const TCollection_AsciiString &, const Standard_Character, TCollection_AsciiString &) |
| Returns format for the float. | |
| void | Split (const TCollection_AsciiString &, Handle(TColStd_HArray1OfExtendedString)&) |
| Split the string theStr separated by spaces. | |
| UnitData * | GetUnitData (const UnitSystem &) const |
| Get units structure for specified units system sys. | |
| Handle (TColStd_HArray1OfExtendedString) myListRef | |
| Handle (TColStd_HArray1OfInteger) myListRefID | |
| Handle (TColStd_HArray1OfExtendedString) myListRefIcons | |
| Handle (Standard_Transient) myComponent | |
Private Attributes | |
| TCollection_AsciiString | myId |
| TCollection_ExtendedString | myLabel |
| TCollection_ExtendedString | myFilter |
| TCollection_ExtendedString | myRequired |
| Standard_Integer | myType |
| Standard_Integer | myWarnLevel |
| TCollection_ExtendedString | myLongDescr |
| TCollection_ExtendedString | myShortDescr |
| Standard_Real | myMax |
| Standard_Real | myMin |
| Standard_Real | myDefValue |
| TCollection_ExtendedString | myDefString |
| Standard_Integer | myData |
| TCollection_ExtendedString | myListName |
| Standard_Real | myMinZoom |
| Standard_Real | myMaxZoom |
| Standard_Real | myZoomOrder |
| OptionsMap | myOptions |
| NCollection_DataMap < UnitSystem, UnitData > | myUnitData |
Friends | |
| class | DDS_DicGroup |
typedef NCollection_DataMap<TCollection_AsciiString, TCollection_ExtendedString> DDS_DicItem.OptionsMap [private] |
| enum DDS_DicItem::Type |
| enum DDS_DicItem::Data |
| DDS_DicItem::DDS_DicItem | ( | ) |
Creates the instance of empty dictionary item.
| DDS_DicItem::DDS_DicItem | ( | const DDS_DicItem & | ) | [private] |
| TCollection_AsciiString DDS_DicItem::GetId | ( | ) | const |
References myId.
| DDS_DicItem::Type DDS_DicItem::GetType | ( | ) | const |
References myType.
| TCollection_ExtendedString DDS_DicItem::GetLabel | ( | ) | const |
References myLabel.
| TCollection_ExtendedString DDS_DicItem::GetFilter | ( | ) | const |
References myFilter.
| TCollection_ExtendedString DDS_DicItem::GetRequired | ( | ) | const |
References myRequired.
| DDS_MsgType DDS_DicItem::GetWarningLevel | ( | ) | const |
References myWarnLevel.
| TCollection_ExtendedString DDS_DicItem::GetLongDescription | ( | ) | const |
References myLongDescr.
| TCollection_ExtendedString DDS_DicItem::GetShortDescription | ( | ) | const |
References myShortDescr.
| TCollection_AsciiString DDS_DicItem::GetComponent | ( | ) | const |
References Handle(), test_big_table.myComponent, and TCollection_AsciiString.
| TCollection_AsciiString DDS_DicItem::GetUnits | ( | ) | const |
References GetActiveUnitSystem().
| TCollection_AsciiString DDS_DicItem::GetUnits | ( | const UnitSystem & | theSystem | ) | const |
If specified units system doesn't exist, empty string is returned.
| theSystem | units system |
References GetUnitData(), DDS_DicItem.UnitData.myUnits, and TCollection_AsciiString.
| TCollection_ExtendedString DDS_DicItem::GetDefaultValue | ( | ) | const |
Default value is returned as string. If type of the value is numerical (Float or Integer) and default value is defined, then the returning value is converted to SI.
References GetActiveUnitSystem().
| TCollection_ExtendedString DDS_DicItem::GetDefaultValue | ( | const UnitSystem & | theSystem | ) | const |
Default value is returned as string. If type of the value is numerical (Float or Integer) and default value is defined, then the returning value is converted to SI.
| theSystem | units system |
References Float, FromSI(), Integer, List, myDefString, myDefValue, myType, and String.
| Standard_Real DDS_DicItem::GetMinValue | ( | ) | const |
| Standard_Real DDS_DicItem::GetMinValue | ( | const UnitSystem & | theUnitsSystem | ) | const |
| Standard_Real DDS_DicItem::GetMaxValue | ( | ) | const |
| Standard_Real DDS_DicItem::GetMaxValue | ( | const UnitSystem & | theUnitsSystem | ) | const |
| Standard_Integer DDS_DicItem::GetPrecision | ( | ) | const |
References GetActiveUnitSystem().
| Standard_Integer DDS_DicItem::GetPrecision | ( | const UnitSystem & | theSystem | ) | const |
If specified units system doesn't exist, zero is returned.
| theSystem | units system |
References GetUnitData(), and DDS_DicItem.UnitData.myPrecision.
| TCollection_AsciiString DDS_DicItem::GetFormat | ( | const Standard_Boolean | theCanonical = Standard_True | ) | const |
If argument theCanonical is true, format string is reduced according to the sprintf() specification (without extra non standard qualifiers).
| theCanonical | 'canonical form' flag |
References GetActiveUnitSystem().
| TCollection_AsciiString DDS_DicItem::GetFormat | ( | const UnitSystem & | theSystem, |
| const Standard_Boolean | theCanonical = Standard_True |
||
| ) | const |
If argument theCanonical is true, format string is reduced according to the sprintf() specification (without extra non standard qualifiers).
| theSystem | units system |
| theCanonical | 'canonical form' flag |
References GetUnitData(), DDS_DicItem.UnitData.myFormat, and TCollection_AsciiString.
| TCollection_ExtendedString DDS_DicItem::GetNameOfValues | ( | ) | const |
This string is empty if the list reference is not defined. In this case, other properties (Type, DefaultValue, MaxValue, MinValue) should be used.
References myListName.
| Standard_Boolean DDS_DicItem::GetListOfValues | ( | Handle(TColStd_HArray1OfExtendedString)& | theStrings, |
| Handle(TColStd_HArray1OfInteger)& | theIntegers | ||
| ) | const |
These sequences are empty if the list reference is not defined. In this case, other properties (Type, DefaultValue, MaxValue, MinValue) should be used.
| theStrings | returning items names |
| theIntegers | returning items identifiers |
true if returning lists are not empty | Standard_Boolean DDS_DicItem::GetListOfValues | ( | Handle(TColStd_HArray1OfExtendedString)& | theStrings, |
| Handle(TColStd_HArray1OfInteger)& | theIntegers, | ||
| Handle(TColStd_HArray1OfExtendedString)& | theIcons | ||
| ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. These sequences are empty if the list reference is not defined. In this case, other properties (Type, DefaultValue, MaxValue, MinValue) should be used.
| theStrings | returning items names |
| theIntegers | returning items identifiers |
| theIcons | returning items icons |
true if returning lists are not empty | Standard_Boolean DDS_DicItem::GetSpecialValues | ( | TColStd_MapOfReal & | theMap | ) | const |
| theMap | returning map of the special values |
true if returning map is not empty References TCollection_AsciiString.
| Standard_Real DDS_DicItem::GetMinZoom | ( | ) | const |
References myMinZoom.
| Standard_Real DDS_DicItem::GetMaxZoom | ( | ) | const |
References myMaxZoom.
| Standard_Real DDS_DicItem::GetZoomOrder | ( | ) | const |
References myZoomOrder.
| Standard_Real DDS_DicItem::ToSI | ( | const Standard_Real | theVal | ) | const |
| theVal | value being converted |
References GetActiveUnitSystem().
| Standard_Real DDS_DicItem::FromSI | ( | const Standard_Real | theVal | ) | const |
| theVal | value being converted |
References GetActiveUnitSystem().
| Standard_Real DDS_DicItem::ToSI | ( | const Standard_Real | theVal, |
| const UnitSystem & | theUnitsSystem | ||
| ) | const |
| theVal | value being converted |
| theUnitsSystem | units system |
References GetUnitData(), DDS_DicItem.UnitData.myScale, and DDS_DicItem.UnitData.myZero.
| Standard_Real DDS_DicItem::FromSI | ( | const Standard_Real | theVal, |
| const UnitSystem & | theUnitsSystem | ||
| ) | const |
| theVal | value being converted |
| theUnitsSystem | units system |
References GetUnitData(), DDS_DicItem.UnitData.myScale, and DDS_DicItem.UnitData.myZero.
| Standard_Boolean DDS_DicItem::HasData | ( | const Standard_Integer | flag | ) | const |
| TCollection_ExtendedString DDS_DicItem::GetOption | ( | const TCollection_AsciiString & | name | ) | const |
If option is not found, empty string is returned.
| name | option name |
References myOptions.
| Standard_Boolean DDS_DicItem::GetOptionNames | ( | TColStd_SequenceOfAsciiString & | names | ) | const |
| void DDS_DicItem::operator= | ( | const DDS_DicItem & | ) | [private] |
| void DDS_DicItem::FillDataMap | ( | TCollection_AsciiString | theID, |
| const LDOM_Element & | theDatum, | ||
| const LDOM_Element & | theCompElement, | ||
| const LDOM_Element & | theDocElement, | ||
| const TColStd_SequenceOfAsciiString & | theSystems | ||
| ) | [private] |
| theID | item identifier |
| theDatum | datum XML node |
| theCompElement | component XML node |
| theDocElement | document XML node |
| theSystems | units system names |
References DDS_MT_ALARM, DDS_MT_ERROR, DDS_MT_INFO, DDS_MT_NONE, DDS_MT_WARNING, DefaultValue, Float, Handle(), Integer, List, MaxValue, MinValue, myData, myDefString, myDefValue, myFilter, myId, myLabel, myListName, myLongDescr, myMax, myMaxZoom, myMin, myMinZoom, myOptions, myRequired, DDS_DicItem.UnitData.myScale, myShortDescr, myType, myUnitData, DDS_DicItem.UnitData.myUnits, myWarnLevel, DDS_DicItem.UnitData.myZero, myZoomOrder, PrepareFormats(), Split(), String, TCollection_AsciiString, and Unknown.
| void DDS_DicItem::PrepareFormats | ( | const TCollection_AsciiString & | theFormat | ) | [private] |
| theFormat | format string |
References Float, GetDefaultFormat(), GetFloatFormat(), GetIntegerFormat(), GetStringFormat(), Integer, List, DDS_DicItem.UnitData.myFormat, DDS_DicItem.UnitData.myPrecision, myType, myUnitData, DDS_DicItem.UnitData.myUnits, String, and TCollection_AsciiString.
| void DDS_DicItem::GetDefaultFormat | ( | ) | [private] |
References Float, Integer, DDS_DicItem.UnitData.myFormat, myType, myUnitData, and String.
| DDS_DicItem::UnitSystem DDS_DicItem::GetActiveUnitSystem | ( | ) | const [private] |
References Handle(), and test_big_table.myComponent.
| void DDS_DicItem::GetStringFormat | ( | const TCollection_AsciiString & | theFlags, |
| const TCollection_AsciiString & | theWidth, | ||
| const TCollection_AsciiString & | thePrecision, | ||
| const TCollection_AsciiString & | theTypePrefix, | ||
| TCollection_AsciiString & | theFormat | ||
| ) | [private] |
| theFlags | format flags |
| theWidth | field width |
| thePrecision | precision |
| theTypePrefix | type prefix |
| theFormat | returning format string |
| void DDS_DicItem::GetIntegerFormat | ( | const TCollection_AsciiString & | theFlags, |
| const TCollection_AsciiString & | theWidth, | ||
| const TCollection_AsciiString & | thePrecision, | ||
| const TCollection_AsciiString & | theTypePrefix, | ||
| const Standard_Character | theType, | ||
| TCollection_AsciiString & | theFormat | ||
| ) | [private] |
| theFlags | format flags |
| theWidth | field width |
| thePrecision | precision |
| theTypePrefix | type prefix |
| theType | integer value type |
| theFormat | returning format string |
| void DDS_DicItem::GetFloatFormat | ( | const TCollection_AsciiString & | theFlags, |
| const TCollection_AsciiString & | theWidth, | ||
| const TCollection_AsciiString & | thePrecision, | ||
| const TCollection_AsciiString & | theTypePrefix, | ||
| const Standard_Character | theType, | ||
| TCollection_AsciiString & | theFormat | ||
| ) | [private] |
| theFlags | format flags |
| theWidth | field width |
| thePrecision | precision |
| theTypePrefix | type prefix |
| theType | floating point value type |
| theFormat | returning format string |
| void DDS_DicItem::Split | ( | const TCollection_AsciiString & | theStr, |
| Handle(TColStd_HArray1OfExtendedString)& | aRes | ||
| ) | [private] |
| theStr | source string |
| aRes | returning substrings array |
References TCollection_AsciiString.
| DDS_DicItem::UnitData * DDS_DicItem::GetUnitData | ( | const UnitSystem & | sys | ) | const [private] |
| DDS_DicItem.Handle | ( | TColStd_HArray1OfExtendedString | ) | [private] |
| DDS_DicItem.Handle | ( | TColStd_HArray1OfInteger | ) | [private] |
| DDS_DicItem.Handle | ( | TColStd_HArray1OfExtendedString | ) | [private] |
| DDS_DicItem.Handle | ( | Standard_Transient | ) | [private] |
friend class DDS_DicGroup [friend] |
TCollection_AsciiString DDS_DicItem.myId [private] |
TCollection_ExtendedString DDS_DicItem.myLabel [private] |
TCollection_ExtendedString DDS_DicItem.myFilter [private] |
TCollection_ExtendedString DDS_DicItem.myRequired [private] |
Standard_Integer DDS_DicItem.myType [private] |
Standard_Integer DDS_DicItem.myWarnLevel [private] |
TCollection_ExtendedString DDS_DicItem.myLongDescr [private] |
TCollection_ExtendedString DDS_DicItem.myShortDescr [private] |
Standard_Real DDS_DicItem.myMax [private] |
Standard_Real DDS_DicItem.myMin [private] |
Standard_Real DDS_DicItem.myDefValue [private] |
TCollection_ExtendedString DDS_DicItem.myDefString [private] |
Standard_Integer DDS_DicItem.myData [private] |
TCollection_ExtendedString DDS_DicItem.myListName [private] |
Standard_Real DDS_DicItem.myMinZoom [private] |
Standard_Real DDS_DicItem.myMaxZoom [private] |
Standard_Real DDS_DicItem.myZoomOrder [private] |
OptionsMap DDS_DicItem.myOptions [private] |
NCollection_DataMap<UnitSystem, UnitData> DDS_DicItem.myUnitData [private] |