CONFIG += qt thread debug dll shared
win32:DEFINES += WIN32
-DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
+DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=2 OCC_VERSION_MAINTENANCE=0 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
-HEADERS = DDS.h
+HEADERS = DDS.h
HEADERS += DDS_DicGroup.h
HEADERS += DDS_DicItem.h
HEADERS += DDS_Dictionary.h
/*!
\class DDS_DicGroup
-
- This class to provide set of DDS_DicItem objects from one component.
+ \brief This class provides a set of DDS_DicItem objects from one component.
*/
/*!
- Constructor. Create the group with name \aname.
+ \brief Constructor.
+
+ Create the group with name \a name.
+
+ \param name group name
*/
DDS_DicGroup::DDS_DicGroup( const TCollection_AsciiString& name )
: MMgt_TShared(),
-myName( name ),
-myActiveSystem( UNIT_SYSTEM_SI )
+ myName( name ),
+ myActiveSystem( UNIT_SYSTEM_SI )
{
}
/*!
- Copy constructor.
+ \brief Copy constructor (put in private section to prevent object copying).
*/
DDS_DicGroup::DDS_DicGroup( const DDS_DicGroup& )
{
}
/*!
- Get the name of group (component).
+ \brief Get the name of group (component).
+ \return group name
*/
TCollection_AsciiString DDS_DicGroup::GetName() const
{
}
/*!
- Returns the names list of defined unit systems.
- Parameter \atheSystems will contains the sequence of string names.
+ \brief Get the names of all defined units systems.
+ \param theSystemsSeq returning sequence of names
*/
void DDS_DicGroup::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystemSeq ) const
{
}
/*!
- Returns the label of unit system \aname. If unit system not found then empty string returned.
+ \brief Get the label of units system \a name.
+
+ If units system is not found, empty string is returned.
+
+ \param make units system name
+ \return units system label
*/
TCollection_ExtendedString DDS_DicGroup::GetUnitSystemLabel( const TCollection_AsciiString& name ) const
{
}
/*!
- Gets the name of active unit system.
+ \brief Get the name of active units system.
+ \return active units system name
*/
TCollection_AsciiString DDS_DicGroup::GetActiveUnitSystem() const
{
}
/*!
- Sets the name of active unit system.
+ \brief Set the active unit system.
+ \param theSystem name of the units system to be made active
*/
void DDS_DicGroup::SetActiveUnitSystem( const TCollection_AsciiString& theSystem )
{
}
/*!
- Assignment operator.
+ \brief Assignment operator (put in private section to prevent object copying).
*/
void DDS_DicGroup::operator=( const DDS_DicGroup& )
{
}
/*!
- Fill the internal data structures from XML parsed structures. Internal.
+ \brief Fill the internal data structures from XML parsed structures.
+ \param theComponentData component data DOM node
+ \param theDocElement document element DOM node
*/
void DDS_DicGroup::FillDataMap( const LDOM_Element& theComponentData, const LDOM_Element& theDocElement )
{
}
/*!
- Gets dictionary item with specified identifier \atheID.
- If dictionary item not found then null handle returned.
+ \brief Get the dictionary item with specified identifier \a theID.
+
+ If dictionary item is not found, null handle is returned.
+
+ \param theID item identifier
+ \return dictionary item
*/
-Handle(DDS_DicItem) DDS_DicGroup::GetDicItem( const TCollection_AsciiString& theID ) const
+Handle_DDS_DicItem DDS_DicGroup::GetDicItem( const TCollection_AsciiString& theID ) const
{
Handle(DDS_DicItem) aDicItem;
// get dictionary item by id
class LDOM_Element;
class TColStd_SequenceOfAsciiString;
-DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
-
-class DDS_DicGroup : public MMgt_TShared
+class Standard_EXPORT DDS_DicGroup : public MMgt_TShared
{
public:
DDS_DicGroup( const TCollection_AsciiString& );
- TCollection_AsciiString GetName() const;
+ TCollection_AsciiString GetName() const;
- Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString& ) const;
+ Handle_DDS_DicItem GetDicItem( const TCollection_AsciiString& ) const;
- Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
- Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
+ void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
+ TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
- Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem() const;
- Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString& );
+ TCollection_AsciiString GetActiveUnitSystem() const;
+ void SetActiveUnitSystem( const TCollection_AsciiString& );
private:
DDS_DicGroup( const DDS_DicGroup& );
- void operator=( const DDS_DicGroup& );
+ void operator=( const DDS_DicGroup& );
- void FillDataMap( const LDOM_Element&, const LDOM_Element& );
+ void FillDataMap( const LDOM_Element&, const LDOM_Element& );
private:
typedef NCollection_DataMap<TCollection_AsciiString,
TCollection_ExtendedString> UnitSystemMap;
private:
- TCollection_AsciiString myName;
- DDS_IndexedDataMapOfDicItems myDataMap;
- UnitSystemMap myUnitSystem;
- TCollection_AsciiString myActiveSystem;
+ TCollection_AsciiString myName;
+ DDS_IndexedDataMapOfDicItems myDataMap;
+ UnitSystemMap myUnitSystem;
+ TCollection_AsciiString myActiveSystem;
friend class DDS_Dictionary;
DEFINE_STANDARD_RTTI(DDS_DicGroup)
};
+DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
+
DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup))
DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups,
TCollection_AsciiString, Handle(DDS_DicGroup))
/*!
\class DDS_DicItem
-
- This class to provide information about datum (phisical characteristic parameter).
+ \brief This class provides an information about datum (phisical characteristic parameter).
*/
/*!
- Constructor. Creates the instance of empty dictionary item.
+ \brief Constructor.
+
+ Creates the instance of empty dictionary item.
*/
DDS_DicItem::DDS_DicItem()
: myType( 0 ),
-myDefValue( 0 ),
-myMax( 0 ),
-myMin( 0 ),
-myMinZoom( 0.1 ),
-myMaxZoom( 10 ),
-myZoomOrder( 2 )
+ myMax( 0 ),
+ myMin( 0 ),
+ myDefValue( 0 ),
+ myMinZoom( 0.1 ),
+ myMaxZoom( 10 ),
+ myZoomOrder( 2 )
{
}
/*!
- Copy constructor. Internal.
+ \brief Copy constructor (put in private section to prevent object copying).
*/
DDS_DicItem::DDS_DicItem( const DDS_DicItem& )
{
}
/*!
- Assignment operator. Internal.
+ \brief Assignment operator (put in private section to prevent object copying).
*/
void DDS_DicItem::operator=( const DDS_DicItem& )
{
}
/*!
- Gets the identifier of parameter.
+ \brief Get the identifier of parameter.
+ \return parameter ID
*/
TCollection_AsciiString DDS_DicItem::GetId() const
{
}
/*!
- Gets the type of parameter.
+ \brief Get the type of parameter.
+ \return parameter type
*/
DDS_DicItem::Type DDS_DicItem::GetType() const
{
}
/*!
- Gets the label of the parameter.
+ \brief Get the label of the parameter.
+ \return parameter label
*/
TCollection_ExtendedString DDS_DicItem::GetLabel() const
{
}
/*!
- Gets the filter (regular expression) for the parameter values.
+ \brief Get the filter (regular expression) for the parameter values.
+ \return parameter filter
*/
TCollection_ExtendedString DDS_DicItem::GetFilter() const
{
}
/*!
- Gets the Required attribute of the parameter.
+ \brief Get the Required attribute of the parameter.
+ \return Required attribute
*/
TCollection_ExtendedString DDS_DicItem::GetRequired() const
{
}
/*!
- Gets the wrong value warning level of the parameter.
+ \brief Get the wrong value warning level of the parameter.
+ \return warning level
*/
DDS_MsgType DDS_DicItem::GetWarningLevel() const
{
}
/*!
- Gets the long description of the parameter.
+ \brief Get the long description of the parameter.
+ \return long description
*/
TCollection_ExtendedString DDS_DicItem::GetLongDescription() const
{
}
/*!
- Gets the short description of the parameter.
+ \brief Get the short description of the parameter.
+ \return short description
*/
TCollection_ExtendedString DDS_DicItem::GetShortDescription() const
{
}
/*!
- Gets the name of component - owner of parameter.
+ \brief Get the name of the component (parameter owner).
+ \return component name
*/
TCollection_AsciiString DDS_DicItem::GetComponent() const
{
}
/*!
- Gets the parameter unit of measure for active unit system.
+ \brief Get the parameter measure units for active units system.
+ \return parameter units
*/
TCollection_AsciiString DDS_DicItem::GetUnits() const
{
}
/*!
- Gets the parameter unit of measure for specified unit system \atheSystem.
- If specified unit system doesn't exist then empty string returned.
+ \brief Get the parameter measure units for specified units system \a theSystem.
+
+ If specified units system doesn't exist, empty string is returned.
+
+ \param theSystem units system
+ \return parameter units
*/
TCollection_AsciiString DDS_DicItem::GetUnits( const UnitSystem& theSystem ) const
{
}
/*!
- Gets the minimum value of parameter for active unit system.
- Returned value converted to SI.
+ \brief Get the minimum value of the parameter for active units system.
+
+ Returned value is converted to SI.
+
+ \return minimum value
*/
Standard_Real DDS_DicItem::GetMinValue() const
{
}
/*!
- Gets the minimum value of parameter for specified unit system \atheSystem.
- Returned value converted to SI.
+ \brief Get the minimum value of the parameter for the specified
+ units system \a theSystem.
+
+ Returned value is converted to SI.
+
+ \param theUnitsSystem units system
+ \return minimum value
*/
Standard_Real DDS_DicItem::GetMinValue( const UnitSystem& theUnitsSystem ) const
{
}
/*!
- Gets the maximum value of parameter for active unit system.
+ \brief Get the maximum value of the parameter for active units system.
+
Returned value converted to SI.
+
+ \return maximum value
*/
Standard_Real DDS_DicItem::GetMaxValue() const
{
}
/*!
- Gets the maximum value of parameter for specified unit system \atheSystem.
+ \brief Get the maximum value of the parameter for specified
+ units system \a theSystem.
+
Returned value converted to SI.
+
+ \param theUnitsSystem units system
+ \return maximum value
*/
Standard_Real DDS_DicItem::GetMaxValue( const UnitSystem& theUnitsSystem ) const
{
}
/*!
- Gets the precision (number of digit after decimal point) of parameter for active unit system.
+ \brief Get the precision (number of digits after decimal point)
+ of the parameter for active units system.
+ \return parameter precision
*/
Standard_Integer DDS_DicItem::GetPrecision() const
{
}
/*!
- Gets the precision (number of digit after decimal point) of parameter for specified
- unit system \atheSystem. If specified unit system doesn't exist then zero returned.
+ \brief Get the precision (number of digits after decimal point) of the parameter
+ for specified units system \a theSystem.
+
+ If specified units system doesn't exist, zero is returned.
+
+ \param theSystem units system
+ \return parameter precision
*/
Standard_Integer DDS_DicItem::GetPrecision( const UnitSystem& theSystem ) const
{
}
/*!
- Gets the default value of parameter for active unit system. Default value returned as string.
- If type of value is numeric (Float or Integer) and default value defined then returned number
- converted to SI.
+ \brief Get the default value of the parameter for active units system.
+
+ 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.
+
+ \return default value
*/
TCollection_ExtendedString DDS_DicItem::GetDefaultValue() const
{
}
/*!
- Gets the default value of parameter for specified unit system \atheSystem. Default value returned
- as string. If type of value is numeric (Float or Integer) and default value defined then returned
- number converted to SI.
+ \brief Get the default value of the parameter for specified
+ units system \a theSystem.
+
+ 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.
+
+ \param theSystem units system
+ \return default value
*/
TCollection_ExtendedString DDS_DicItem::GetDefaultValue( const UnitSystem& theSystem ) const
{
}
/*!
- Gets the format string of parameter for active unit system. If argument \atheCanonical
- is true then format string will be reduced to sprintf() specification (without extra
- non standard qualifiers).
+ \brief Get the format string of the parameter for active units system.
+
+ If argument \a theCanonical is \c true, format string is reduced according
+ to the sprintf() specification (without extra non standard qualifiers).
+
+ \param theCanonical 'canonical form' flag
+ \return format string
*/
TCollection_AsciiString DDS_DicItem::GetFormat( const Standard_Boolean theCanonical ) const
{
}
/*!
- Gets the format string of parameter for specified unit system \atheSystem. If argument
- \atheCanonical is true then format string will be reduced to sprintf() specification
- (without extra non standard qualifiers).
+ \brief Get the format string of the parameter for specified
+ units system \a theSystem.
+
+ If argument \a theCanonical is \c true, format string is reduced according
+ to the sprintf() specification (without extra non standard qualifiers).
+
+ \param theSystem units system
+ \param theCanonical 'canonical form' flag
+ \return format string
*/
TCollection_AsciiString DDS_DicItem::GetFormat( const UnitSystem& theSystem,
const Standard_Boolean theCanonical ) const
}
/*!
- Gets name of a list referenced by the parameter. This string is empty if the list
- refernce is not defined - then use other properties: Type, DefaultValue, MaxValue, MinValue
+ \brief Get the name of a list referenced by the parameter.
+
+ This string is empty if the list reference is not defined.
+ In this case, other properties (Type, DefaultValue, MaxValue, MinValue)
+ should be used.
+
+ \return referenced list name
+ \sa GetListOfValues()
*/
TCollection_ExtendedString DDS_DicItem::GetNameOfValues() const
{
}
/*!
- Gets item names and item ids of a list referenced by the parameter. This sequences is empty if
- the list reference is not defined - then use other properties: Type, DefaultValue, MaxValue, MinValue
+ \brief Get item names and item identifiers of a list referenced
+ by the parameter.
+
+ These sequences are empty if the list reference is not defined.
+ In this case, other properties (Type, DefaultValue, MaxValue, MinValue)
+ should be used.
+
+ \param theStrings returning items names
+ \param theIntegers returning items identifiers
+ \return \c true if returning lists are not empty
+ \sa GetNameOfValues()
*/
Standard_Boolean DDS_DicItem::GetListOfValues( Handle(TColStd_HArray1OfExtendedString)& theStrings,
Handle(TColStd_HArray1OfInteger)& theIntegers ) const
}
/*!
- Gets item names, item ids and item icons of a list referenced by the parameter. This sequences is empty
- if the list reference is not defined - then use other properties: Type, DefaultValue, MaxValue, MinValue
+ \brief Get item names, item identifiers and item icons of a list
+ referenced by the parameter.
+
+ \overload
+
+ These sequences are empty if the list reference is not defined.
+ In this case, other properties (Type, DefaultValue, MaxValue, MinValue)
+ should be used.
+
+ \param theStrings returning items names
+ \param theIntegers returning items identifiers
+ \param theIcons returning items icons
+ \return \c true if returning lists are not empty
+ \sa GetNameOfValues()
*/
Standard_Boolean DDS_DicItem::GetListOfValues( Handle(TColStd_HArray1OfExtendedString)& theStrings,
Handle(TColStd_HArray1OfInteger)& theIntegers,
/*!
- Gets special values of the parameter.
+ \brief Get special values of the parameter.
+ \param theMap returning map of the special values
+ \return \c true if returning map is not empty
*/
Standard_Boolean DDS_DicItem::GetSpecialValues( TColStd_MapOfReal& theMap ) const
{
}
/*!
- Gets minimum value of lateral zooming
+ \brief Get minimum value of lateral zooming.
+ \return lateral zooming minimum value
*/
Standard_Real DDS_DicItem::GetMinZoom() const
{
}
/*!
- Gets maximum value of lateral zooming
+ \brief Get maximum value of lateral zooming.
+ \return lateral zooming maximum value
*/
Standard_Real DDS_DicItem::GetMaxZoom() const
{
}
/*!
- Gets order of lateral zooming
+ \brief Get order of lateral zooming.
+ \return lateral zooming order
*/
Standard_Real DDS_DicItem::GetZoomOrder() const
{
}
/*!
- Convert value \atheVal to default SI units according to active unit system.
+ \brief Convert value \a theVal to the default SI units
+ according to the active units system.
+ \param theVal value being converted
+ \return value converted to SI
*/
Standard_Real DDS_DicItem::ToSI( const Standard_Real theVal ) const
{
}
/*!
- Convert value \atheVal from default SI units according to active unit system.
+ \brief Convert value \a theVal from the default SI units
+ according to the active units system.
+ \param theVal value being converted
+ \return value converted from SI
*/
Standard_Real DDS_DicItem::FromSI( const Standard_Real theVal ) const
{
}
/*!
- Convert value to default SI units according to unit system \atheUnitsSystem.
+ \brief Convert value to the default SI units according to the
+ units system \a theUnitsSystem.
+ \param theVal value being converted
+ \param theUnitsSystem units system
+ \return value converted to the specified units system
*/
Standard_Real DDS_DicItem::ToSI( const Standard_Real theVal, const UnitSystem& theUnitsSystem ) const
{
}
/*!
- Convert value from default SI units according to unit system \atheUnitsSystem.
+ \brief Convert value from the default SI units according to the
+ units system \a theUnitsSystem.
+ \param theVal value being converted
+ \param theUnitsSystem units system
+ \return value converted from the specified units system
*/
Standard_Real DDS_DicItem::FromSI( const Standard_Real theVal, const UnitSystem& theUnitsSystem ) const
{
}
/*!
- Returns 'true' if data specified by \aflag exist.
+ \brief Check data existence.
+ \param flag data flag
+ \return \c true if data specified by \a flag exists
*/
Standard_Boolean DDS_DicItem::HasData( const Standard_Integer flag ) const
{
}
/*!
- Returns options for specified name \aname. If option not found then empty string returned.
+ \brief Get option for specified name \a name.
+
+ If option is not found, empty string is returned.
+
+ \param name option name
+ \return option value
*/
TCollection_ExtendedString DDS_DicItem::GetOption( const TCollection_AsciiString& name ) const
{
}
/*!
- Returns names list of existing options in the specified sequence \anames.
- If list not empty retunrs 'true' otherwise 'false'.
+ \brief Get names of all existing options.
+ \param names returning list of options
+ \return \c true if list is not empty
*/
Standard_Boolean DDS_DicItem::GetOptionNames( TColStd_SequenceOfAsciiString& names ) const
{
/*!
- Parse record in XML file and retrieve information relevant for this dictionary item
+ \brief Parse record from XML file and retrieve information relevant for
+ the dictionary item.
+ \param theID item identifier
+ \param theDatum datum XML node
+ \param theCompElement component XML node
+ \param theDocElement document XML node
+ \param theSystems units system names
*/
void DDS_DicItem::FillDataMap( TCollection_AsciiString theID, const LDOM_Element& theDatum,
const LDOM_Element& theCompElement, const LDOM_Element& theDocElement,
}
/*!
- Returns default formats for each unit systems
+ \brief Restore default formats for all the units systems.
*/
void DDS_DicItem::GetDefaultFormat()
{
}
/*!
- Returns format for the string
+ \brief Get format for the string.
+ \param theFlags format flags
+ \param theWidth field width
+ \param thePrecision precision
+ \param theTypePrefix type prefix
+ \param theFormat returning format string
*/
void DDS_DicItem::GetStringFormat( const TCollection_AsciiString& theFlags,
const TCollection_AsciiString& theWidth,
}
/*!
- Returns format for the integer
+ \brief Get format for the integer.
+ \param theFlags format flags
+ \param theWidth field width
+ \param thePrecision precision
+ \param theTypePrefix type prefix
+ \param theType integer value type
+ \param theFormat returning format string
*/
void DDS_DicItem::GetIntegerFormat( const TCollection_AsciiString& theFlags,
const TCollection_AsciiString& theWidth,
}
/*!
- Returns format for the float
+ \brief Returns format for the float.
+ \param theFlags format flags
+ \param theWidth field width
+ \param thePrecision precision
+ \param theTypePrefix type prefix
+ \param theType floating point value type
+ \param theFormat returning format string
*/
void DDS_DicItem::GetFloatFormat( const TCollection_AsciiString& theFlags,
const TCollection_AsciiString& theWidth,
}
/*!
- Prepares formats for each unit systems
+ \brief Prepare formats for all units systems.
+ \param theFormat format string
*/
-void DDS_DicItem::PrepareFormats( const TCollection_AsciiString& theFormat )
+void DDS_DicItem::PrepareFormats( const TCollection_AsciiString& theFormat )
{
for ( NCollection_DataMap<UnitSystem, UnitData>::Iterator it( myUnitData ); it.More(); it.Next() )
{
}
/*!
- Split the string \atheStr by spaces and returns substrings in array \aaRes.
+ \brief Split the string \a theStr separated by spaces.
+ \param theStr source string
+ \param aRes returning substrings array
*/
void DDS_DicItem::Split( const TCollection_AsciiString& theStr, Handle(TColStd_HArray1OfExtendedString)& aRes )
{
}
/*!
- Returns unit structure for given unit system \asys.
+ \brief Get units structure for specified units system \a sys.
+ \param sys units system
+ \return units system information structure
*/
DDS_DicItem::UnitData* DDS_DicItem::GetUnitData( const UnitSystem& sys ) const
{
}
/*!
- Gets the active unit system.
+ \brief Get the active units system.
+ \return active units system
*/
DDS_DicItem::UnitSystem DDS_DicItem::GetActiveUnitSystem() const
{
class TColStd_SequenceOfAsciiString;
class TColStd_SequenceOfExtendedString;
-// Class, containing all information about one parameter:
-// unique : id
-// obligative: label, type, short description, required
-// optional : format, units,
-// min value, max value, default value.
-
-class DDS_DicItem : public MMgt_TShared
+class Standard_EXPORT DDS_DicItem : public MMgt_TShared
{
public:
- /*! Enum describes type of datum value */
+ //! Enum describes type of datum value
enum Type
{
String, //!< String type of value
Unknown //!< Unknown or undefined type of value
};
- /*! Enum describes the flags for existance of domain data */
+ //! Enum describes the flags for existance of domain data
enum Data
{
MinValue = 0x01, //!< Flag of minimum value definition existence
DefaultValue = 0x04 //!< Flag of default value definition existence
};
- // This struct is intended for map of Format, Units, Precision and Scale
+ //! This struct is intended for map of Format, Units, Precision and Scale
struct UnitData
{
Standard_Real myZero;
public:
DDS_DicItem();
- Standard_EXPORT TCollection_AsciiString GetId() const;
- Standard_EXPORT DDS_DicItem::Type GetType() const;
- Standard_EXPORT TCollection_ExtendedString GetLabel() const;
- Standard_EXPORT TCollection_ExtendedString GetFilter() const;
- Standard_EXPORT TCollection_ExtendedString GetRequired() const;
- Standard_EXPORT DDS_MsgType GetWarningLevel() const;
- Standard_EXPORT TCollection_ExtendedString GetLongDescription() const;
- Standard_EXPORT TCollection_ExtendedString GetShortDescription() const;
- Standard_EXPORT TCollection_AsciiString GetComponent() const;
+ TCollection_AsciiString GetId() const;
+ DDS_DicItem::Type GetType() const;
+ TCollection_ExtendedString GetLabel() const;
+ TCollection_ExtendedString GetFilter() const;
+ TCollection_ExtendedString GetRequired() const;
+ DDS_MsgType GetWarningLevel() const;
+ TCollection_ExtendedString GetLongDescription() const;
+ TCollection_ExtendedString GetShortDescription() const;
+ TCollection_AsciiString GetComponent() const;
- Standard_EXPORT TCollection_AsciiString GetUnits() const;
- Standard_EXPORT TCollection_AsciiString GetUnits( const UnitSystem& ) const;
+ TCollection_AsciiString GetUnits() const;
+ TCollection_AsciiString GetUnits( const UnitSystem& ) const;
- Standard_EXPORT TCollection_ExtendedString GetDefaultValue() const;
- Standard_EXPORT TCollection_ExtendedString GetDefaultValue( const UnitSystem& ) const;
+ TCollection_ExtendedString GetDefaultValue() const;
+ TCollection_ExtendedString GetDefaultValue( const UnitSystem& ) const;
- Standard_EXPORT Standard_Real GetMinValue() const;
- Standard_EXPORT Standard_Real GetMinValue( const UnitSystem& ) const;
+ Standard_Real GetMinValue() const;
+ Standard_Real GetMinValue( const UnitSystem& ) const;
- Standard_EXPORT Standard_Real GetMaxValue() const;
- Standard_EXPORT Standard_Real GetMaxValue( const UnitSystem& ) const;
+ Standard_Real GetMaxValue() const;
+ Standard_Real GetMaxValue( const UnitSystem& ) const;
- Standard_EXPORT Standard_Integer GetPrecision() const;
- Standard_EXPORT Standard_Integer GetPrecision( const UnitSystem& ) const;
+ Standard_Integer GetPrecision() const;
+ Standard_Integer GetPrecision( const UnitSystem& ) const;
- Standard_EXPORT TCollection_AsciiString GetFormat( const Standard_Boolean = Standard_True ) const;
- Standard_EXPORT TCollection_AsciiString GetFormat( const UnitSystem&,
- const Standard_Boolean = Standard_True ) const;
- Standard_EXPORT TCollection_ExtendedString GetNameOfValues() const;
- Standard_EXPORT Standard_Boolean GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
- Handle(TColStd_HArray1OfInteger)& ) const;
- Standard_EXPORT Standard_Boolean GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
- Handle(TColStd_HArray1OfInteger)&,
- Handle(TColStd_HArray1OfExtendedString)& ) const;
- Standard_EXPORT Standard_Boolean GetSpecialValues( TColStd_MapOfReal& ) const;
+ TCollection_AsciiString GetFormat( const Standard_Boolean = Standard_True ) const;
+ TCollection_AsciiString GetFormat( const UnitSystem&,
+ const Standard_Boolean = Standard_True ) const;
+ TCollection_ExtendedString GetNameOfValues() const;
+ Standard_Boolean GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
+ Handle(TColStd_HArray1OfInteger)& ) const;
+ Standard_Boolean GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
+ Handle(TColStd_HArray1OfInteger)&,
+ Handle(TColStd_HArray1OfExtendedString)& ) const;
+ Standard_Boolean GetSpecialValues( TColStd_MapOfReal& ) const;
- Standard_EXPORT Standard_Real GetMinZoom() const;
- Standard_EXPORT Standard_Real GetMaxZoom() const;
- Standard_EXPORT Standard_Real GetZoomOrder() const;
+ Standard_Real GetMinZoom() const;
+ Standard_Real GetMaxZoom() const;
+ Standard_Real GetZoomOrder() const;
- Standard_EXPORT Standard_Real ToSI( const Standard_Real ) const;
- Standard_EXPORT Standard_Real FromSI( const Standard_Real ) const;
+ Standard_Real ToSI( const Standard_Real ) const;
+ Standard_Real FromSI( const Standard_Real ) const;
- Standard_EXPORT Standard_Real ToSI( const Standard_Real, const UnitSystem& ) const;
- Standard_EXPORT Standard_Real FromSI( const Standard_Real, const UnitSystem& ) const;
+ Standard_Real ToSI( const Standard_Real, const UnitSystem& ) const;
+ Standard_Real FromSI( const Standard_Real, const UnitSystem& ) const;
- Standard_EXPORT Standard_Boolean HasData( const Standard_Integer ) const;
+ Standard_Boolean HasData( const Standard_Integer ) const;
- Standard_EXPORT TCollection_ExtendedString GetOption( const TCollection_AsciiString& ) const;
- Standard_EXPORT Standard_Boolean GetOptionNames( TColStd_SequenceOfAsciiString& ) const;
+ TCollection_ExtendedString GetOption( const TCollection_AsciiString& ) const;
+ Standard_Boolean GetOptionNames( TColStd_SequenceOfAsciiString& ) const;
private:
DDS_DicItem( const DDS_DicItem& );
- void operator=( const DDS_DicItem& );
- void FillDataMap( TCollection_AsciiString, const LDOM_Element&,
- const LDOM_Element&, const LDOM_Element&,
- const TColStd_SequenceOfAsciiString& );
- void PrepareFormats( const TCollection_AsciiString& );
- void GetDefaultFormat();
- UnitSystem GetActiveUnitSystem() const;
-
- void GetStringFormat( const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- TCollection_AsciiString& );
- void GetIntegerFormat( const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const Standard_Character,
- TCollection_AsciiString& );
- void GetFloatFormat( const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&,
- const Standard_Character,
- TCollection_AsciiString& );
- void Split( const TCollection_AsciiString&,
- Handle(TColStd_HArray1OfExtendedString)& );
-
- UnitData* GetUnitData( const UnitSystem& ) const;
+ void operator=( const DDS_DicItem& );
+ void FillDataMap( TCollection_AsciiString, const LDOM_Element&,
+ const LDOM_Element&, const LDOM_Element&,
+ const TColStd_SequenceOfAsciiString& );
+ void PrepareFormats( const TCollection_AsciiString& );
+ void GetDefaultFormat();
+ UnitSystem GetActiveUnitSystem() const;
+
+ void GetStringFormat( const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ TCollection_AsciiString& );
+ void GetIntegerFormat( const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const Standard_Character,
+ TCollection_AsciiString& );
+ void GetFloatFormat( const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const TCollection_AsciiString&,
+ const Standard_Character,
+ TCollection_AsciiString& );
+ void Split( const TCollection_AsciiString&,
+ Handle(TColStd_HArray1OfExtendedString)& );
+
+ UnitData* GetUnitData( const UnitSystem& ) const;
private:
typedef NCollection_DataMap<TCollection_AsciiString, TCollection_ExtendedString> OptionsMap;
Standard_Integer myData;
- // valueList
TCollection_ExtendedString myListName;
Handle(TColStd_HArray1OfExtendedString) myListRef;
Handle(TColStd_HArray1OfInteger) myListRefID;
Handle(TColStd_HArray1OfExtendedString) myListRefIcons;
- // presentation
Standard_Real myMinZoom;
Standard_Real myMaxZoom;
Standard_Real myZoomOrder;
Handle(Standard_Transient) myComponent;
OptionsMap myOptions;
- // unitData
NCollection_DataMap<UnitSystem, UnitData> myUnitData;
friend class DDS_DicGroup;
/*!
\class DDS_Dictionary
-
- This class to provide information about used datums, reading them from 'xml' file
+ \brief This class provides an information about used datums,
+ reading them from XML file.
- Datum is the set of parameters described a phisical characteristic. These parameters loaded from
- special XML which has following format:
+ There is the only instance of the class DDS_Dictionary in the application
+ which can be retrieved by method Get().
- \hr
+ Datum is a set of parameters describing a phisical characteristic.
+ These parameters are loaded from the XML file which has the following format:
+ \verbatim
<D_URI>
<COMPONENT COMPONENT_NAME="component_name">
<UNIT_SYSTEMS>
</COMPONENT>
</D_URI>
- \hr
-
- In description of datum file format used internal keys as XML tag and attributes names.
- Concrete XML keywords defined by DDS_KeyWords class.
-
- Describe datum file format more detailed. XML file should have one main tag named as "dictionary" (key "D_URI").
- This tag should contains one or several components. Component is a independent set of datums and unit systems.
- Components defined as XML tag named "component" (key "COMPONENT") with attribute "name" (key COMPONENT_NAME).
- Component name used as component identifier and should be unique. Component tag can contains:
-
- \li Tag "unit_systems" (key UNIT_SYSTEMS) defines set of used unit systems. Should exist at least one unit
- system named SI ("System International"). If this system not exist then it will be defined automatically.
- Each unit system defined by XML tag "unit system" (key UNIT_SYSTEM) under tag "unit_systems" with attributes
- "name" (key UNIT_SYSTEM_NAME) and "label" (key UNIT_SYSTEM_LABEL). Name is identifier of unit system. Label is
- human readable description.
-
- \li One or several tag "datum" (key DATUM). For this tag can be defined following attributes:
-
- \lo Identifier (key DATUM_ID) specify the unique id string for the datum.
- \lo Label (key DATUM_LABEL) specify human readable name of the datum.
- \lo Units of measure (key DATUM_UNITS) for given unit system. Attribute name consist of a name
- of unit system and a keyword got from DDS_KeyWords by key DATUM_UNITS. For example for unit system
- named SI and default keyword attribute name will be "SIunits". This attribute should be specified
- for each deaclared unit system. Value of this attribute should be string describs units of measure.
- Possible designations for units of measure and their multiple prefixes see in package UnitsAPI of
- library OpenCascade (files Units.dat and Lexi_Expr.dat). Units of measure will be used for numeric
- value conversion from one unit system to another one.
- \lo Format (key DATUM_FORMAT) specify the format string which will be used during initial formatting
- of value. This string should be specified in sprintf() format.
- \lo Filter (key DATUM_FILTER) specify the regualr expression. Each user entered string will be checked up
- on matching to this expression (if it defined). Non matched strings will be rejected.
- \lo Required value (key DATUM_REQUIRED). If this attributed defined and value is true then user can't
- leave a input filed blank (parameter must be always entered).
-
- Tag "description" (key DESCR) can be defined under the tag "datum". This tag contains two sub tags:
- \lo "short description" (key SHORT_D) specify a brief datum description text
- \lo "long description" (key LONG_D) specify a detailed description text
-
- Tag "options" (key OPTIONS) can be defined under the tag "datum". This tag contains one or more sub
- tags "option" (key OPTION). Each of these XML elements should contain text option value and attribute
- "name" (key OPTION_NAME) which specified option name.
-
- Each tag "datum" define most common parameters of phisical characteristic.
- This parameters placed in two groups:
- \lo Domain parameters under tag "domain" (key DY_DOMAIN). This tag can contains value description tag
- (key VALUE_DESCR) for discrete data or list reference tag (key VALUE_LIST_REF) for enumerable data.
- Discrete data described following parameters:
- default value (key VD_DEFV)
- maximum value (key VD_MAXV)
- minimum value (key VD_MINV)
- type of value (key VD_TYPE) - possible values: String, Integer, Float, List
- Enumerable data described by "list reference" attribute (key VLR_LIST) which reference on
- list (see "list definition" tag) by list id.
-
- \li One or several tag "list definition" (key VALUE_LIST). This tag define the list of items for enumerable
- data. Attribute "list id" (key VALUE_LIST_ID) specify the identifier string for the list and attribute
- "list name" (key VALUE_LIST_NAME) define a list name string. Each list item described by tag "list value"
- (key VALUE_LIST_VALUE) under tag "list definition". Each this tag contains item string text and have
- following attributes:
- \lo "list item id" (key VALUE_LIST_VALUEID) - integer numerical identifier for item
- \lo "list item icon" (key VALUE_LIST_VALUEICON) - icon file name for item
-
- Below the example of a XML file with use default keywords.
+ \endverbatim
+
+ In above description of the datum XML file format internal keys are used as XML tags
+ and attributes names. Real XML keywords are defined by DDS_KeyWords class.
+ XML file should have one main tag named "dictionary" (key "D_URI"). This tag
+ should contain one or several components.
+ Component is an independent set of datums and units systems.
+ Components are defined by XML tag named "component" (key "COMPONENT") with
+ attribute "name" (key COMPONENT_NAME).
+ Component name is used as component identifier and should be unique.
+
+ Component tag can contain:
+
+ - Tag "unit_systems" (key UNIT_SYSTEMS) defines a set of used units systems.
+ At least one unit system named SI ("System International") should exist.
+ If this system does not exist, it will be created automatically.
+ Each units system is defined by XML tag "unit system" (key UNIT_SYSTEM) under
+ the tag "unit_systems" with attributes "name" (key UNIT_SYSTEM_NAME)
+ and "label" (key UNIT_SYSTEM_LABEL). Name is an identifier of the units system and
+ label is its human readable description.
+
+ - One or several tags "datum" (key DATUM). For this tag the following attributes
+ can be defined:
+ -# Identifier (key DATUM_ID) specifies the unique id string for the datum.
+ -# Label (key DATUM_LABEL) specifies human readable name of the datum.
+ -# Measure units (key DATUM_UNITS) for the given units system. Attribute name
+ defines a name of units system and a keyword got from DDS_KeyWords by key DATUM_UNITS.
+ For example, for "SI" units system and default keyword the attribute name is "SIunits".
+ This attribute should be specified for each declared units system.
+ Value of this attribute should be a string describing measure units.
+ For possible designations for measure units and their multiple prefixes
+ please refer to the UnitsAPI package of the OpenCascade library
+ (files Units.dat and Lexi_Expr.dat). Measure units are used for numerical
+ values conversion from one units system to another one.
+ -# Format (key DATUM_FORMAT) specifies the format string which will be used
+ during initial formatting of the value. This string should be specified
+ in sprintf() format.
+ -# Filter (key DATUM_FILTER) specifies the regualr expression. The value (string)
+ entered by the user will be checked up to match to this regular expression
+ (if it defined). Non matched strings will be rejected.
+ -# Required value (key DATUM_REQUIRED). If this attributed si defined and its value
+ is \c true then user can't leave an input non-filled - parameter must be explicitly
+ entered by the user).
+
+ - One or several tags "list definition" (key VALUE_LIST). Each such tag defines
+ the list of items for enumerable data. Attribute "list id" (key VALUE_LIST_ID)
+ specifies the identifier string for the list and attribute "list name"
+ (key VALUE_LIST_NAME) defines a list name string. Each list item is described
+ by tag "list value" (key VALUE_LIST_VALUE) under the tag "list definition".
+ Each this tag contains item string text and have the following attributes:
+ -# "list item id" (key VALUE_LIST_VALUEID) - integer numerical identifier for
+ the item
+ -# "list item icon" (key VALUE_LIST_VALUEICON) - icon file name for the item
+
+ Tag "datum" can have child subtags "description" and "options".
+
+ - Tag "description" (key DESCR) contains two sub tags:
+ -# "short description" (key SHORT_D) specifies a brief datum description text
+ -# "long description" (key LONG_D) specifies a detailed description text
+
+ - Tag "options" (key OPTIONS) contains one or more sub tags "option" (key OPTION).
+ Each of these XML elements should contain text option value and attribute
+ "name" (key OPTION_NAME) which specifies option name.
+
+ Each tag "datum" defines most common parameters of phisical characteristic.
+ These parameters are placed in two groups:
+ -# Domain parameters under the tag "domain" (key DY_DOMAIN). This tag can
+ contain value description tag (key VALUE_DESCR) for descrete data which is
+ described by following parameters:
+ - default value (key VD_DEFV)
+ - maximum value (key VD_MAXV)
+ - minimum value (key VD_MINV)
+ - type of value (key VD_TYPE), possible values are String, Integer, Float, List
+ -# list reference tag (key VALUE_LIST_REF) for enumerable data described by
+ "list reference" attribute (key VLR_LIST) which references to the list
+ (see "list definition" tag) by list id.
+
+ Below is an example of the XML file using default keywords.
+
+ \verbatim
<datadictionary version="1.0">
<component name="My Component">
</component>
</datadictionary>
-
-
+ \endverbatim
*/
/*!
- Constructor. Creates the instance of dictionary. Private method. Use DDS_Dictionary::Get() instead.
+ \brief Constructor.
+
+ Create an instance of the dictionary. Can not be used directly.
+ Use Get() method instead.
*/
DDS_Dictionary::DDS_Dictionary()
: MMgt_TShared()
}
/*!
- Copy constructor. Internal.
+ \brief Copy constructor (put in private section to prevent object copying).
*/
DDS_Dictionary::DDS_Dictionary( const DDS_Dictionary& )
{
}
/*!
- Assigment operator. Internal.
+ \brief Assignment operator (put in private section to prevent object copying).
*/
void DDS_Dictionary::operator=( const DDS_Dictionary& )
{
}
/*!
- Returns the names list of defined unit systems from all components.
- Parameter \atheSystems will contains the sequence of string names.
+ \brief Get the names of defined units systems from all components.
+ \param theSystems returning sequence of units systems names.
*/
void DDS_Dictionary::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystems ) const
{
}
/*!
- Returns the names list of defined unit systems from the specified component \atheComponent.
- Parameter \atheSystems will contains the sequence of string names. If component not found then
- empty list returned.
+ \brief Get the names of defined units systems from the specified component
+ \a theComponent.
+
+ If component is not found, empty list is returned.
+
+ \param theSystems returning sequence of units systems names.
+ \param theComponent component name
*/
void DDS_Dictionary::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystems,
const TCollection_AsciiString& theComponent ) const
}
/*!
- Returns the label of unit system \atheSystem. Function find the given unit system in
- all components. If unit system not found in any component then empty string returned.
+ \brief Get the label of the units system \a theSystem.
+
+ Searches the given units system in all components. If units system is not found
+ in any component, empty string is returned.
+
+ \param theSystem units system
+ \return units system label
*/
TCollection_ExtendedString DDS_Dictionary::GetUnitSystemLabel( const TCollection_AsciiString& theSystem ) const
{
}
/*!
- Returns the label of unit system \atheSystem from component \atheComponent. Function find
- the given unit system in the specified component only. If unit system not found in the
- component then empty string returned.
+ \brief Get the label of the units system \a theSystem from the
+ component \a theComponent.
+
+ Searches the specified units system in the specified component only.
+ If units system is not found, empty string is returned.
+
+ \param theSystem units system
+ \param theComponent component name
+ \return units system label
*/
TCollection_ExtendedString DDS_Dictionary::GetUnitSystemLabel( const TCollection_AsciiString& theSystem,
const TCollection_AsciiString& theComponent ) const
}
/*!
- Gets the name of active unit system from first got component. If any component exist then
- active unit system name returned or empty string otherwise.
+ \brief Get the name of active units system from the first found component.
+
+ If at least one component exists, then its active units system name
+ is returned. Otherwise, empty string is returned.
+
+ \return active units system name
*/
TCollection_AsciiString DDS_Dictionary::GetActiveUnitSystem() const
{
}
/*!
- Gets the name of active unit system from component \atheComponent. If this component exist
- active unit system name returned or empty string otherwise.
+ \brief Get the name of active units system from the component \a theComponent.
+
+ If this component exists, its active units system name is returned.
+ Otherwise, empty string is returned.
+
+ \param theComponent component name
+ \return active units system name
*/
TCollection_AsciiString DDS_Dictionary::GetActiveUnitSystem( const TCollection_AsciiString& theComponent ) const
{
}
/*!
- Sets the active unit system named \atheSystem. This unit system will be activated in all
- existing components if component have it.
+ \brief Set the active units system.
+
+ This units system will be activated in each existing component,
+ if it component has this units system.
+
+ \param theSystem units system to be made active
*/
void DDS_Dictionary::SetActiveUnitSystem( const TCollection_AsciiString& theSystem )
{
}
/*!
- Sets the active unit system named \atheSystem for component \atheComponent. If specified unit
- system doesn't exist in the component then function do nothing.
+ \brief Set the active units system for the component \a theComponent.
+
+ If specified units system doesn't exist in the component, nothing happens.
+
+ \param theSystem units system to be made active
+ \param theComponent component name
*/
void DDS_Dictionary::SetActiveUnitSystem( const TCollection_AsciiString& theSystem,
const TCollection_AsciiString& theComponent )
}
/*!
- Returns the instance of dictionary. Create instance if it is NULL.
+ \brief Get the only instance of the data dictionary.
+ \return the only instance of the data dictionary
*/
-Handle(DDS_Dictionary) DDS_Dictionary::Get()
+Handle_DDS_Dictionary DDS_Dictionary::Get()
{
static Handle(DDS_Dictionary) sDictionary;
}
/*!
- Load datum definitions in the dictionary from XML file \atheFileName. Returns true if load
- successed or false otherwise.
+ \brief Load datum definitions in the dictionary from the XML file
+ \a theFileName.
+ \param theFileName XML file name
+ \return \c true if loading is succeded or \c false otherwise.
*/
Standard_Boolean DDS_Dictionary::Load( const TCollection_AsciiString theFileName )
{
}
/*!
- Gets XML keyword as LDOMString by specified \akey. If key doesn't exist then empty string
- returned. This function provided for convenience.
+ \brief Get XML keyword as LDOMString by specified \a key.
+
+ If key doesn't exist, empty string is returned.
+ This function is provided for convenience.
+
+ \param key keyword name
+ \return keyword value
*/
LDOMString DDS_Dictionary::KeyWord( const TCollection_AsciiString& key )
{
}
/*!
- Gets dictionary item with specified identifier \atheID from specified component \atheComponent.
- If component or item not found then null handle returned.
+ \brief Get the data dictionary item by specified identifier \a theID
+ from the component \a theComponent.
+
+ If the component or item is not found, null handle is returned.
+ \param theID data dictionary item ID
+ \param theComponent component name
+ \return handle to the data dictionary item
*/
-Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID,
+Handle_DDS_DicItem DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID,
const TCollection_AsciiString& theComponent ) const
{
Handle(DDS_DicItem) aDicItem;
}
/*!
- Gets dictionary item with specified identifier \atheID. Function find the item in all components.
- If item not found in any component then null handle returned.
+ \brief Get the data dictionary item by specified identifier \a theID.
+
+ Function searches the item in all components. If item is not found
+ in all components, null handle is returned.
+
+ \param theID data dictionary item ID
+ \return handle to the data dictionary item
*/
-Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID ) const
+Handle_DDS_DicItem DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID ) const
{
Handle(DDS_DicItem) aDicItem;
for ( Standard_Integer i = 1; i <= myGroupMap.Extent() && aDicItem.IsNull(); i++ )
}
/*!
- Fill the internal data structures from XML parsed structures. Internal.
+ \brief Fill the internal data structures from the XML node.
+ \param theComponentData component XML node
+ \param theDocElement document XML node
*/
void DDS_Dictionary::FillDataMap( const LDOM_Element& theComponentData, const LDOM_Element& theDocElement )
{
}
/*!
- Convert numeric value \atheValue from specified unit of measure \atheUnits to SI unit of measure
- (mm for Length, radians for Angles, etc). Converted value returned.
+ \brief Convert numeric value \a theValue from specified measure units
+ \a theUnits to "SI" measure units (mm for Length, radians for Angles, etc).
+ \param theValue value being converted
+ \param theUnits measure units
+ \return converted value
*/
Standard_Real DDS_Dictionary::ToSI( const Standard_Real theValue, const Standard_CString theUnits )
{
}
/*!
- Convert numeric value \atheValue to specified unit of measure \atheUnits from SI unit of measure
- (mm for Length, radians for Angles, etc). Converted value returned.
+ \brief Convert numeric value \a theValue to specified measure units
+ \a theUnits from "SI" measure units (mm for Length, radians for Angles, etc).
+ \param theValue value being converted
+ \param theUnits measure units
+ \return converted value
*/
Standard_Real DDS_Dictionary::FromSI( const Standard_Real theValue, const Standard_CString theUnits )
{
#include <MMgt_TShared.hxx>
+DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
+
class LDOM_Element;
class TCollection_AsciiString;
-DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
-
-class DDS_Dictionary : public MMgt_TShared
+class Standard_EXPORT DDS_Dictionary : public MMgt_TShared
{
public:
- Standard_EXPORT static Handle(DDS_Dictionary) Get();
-
- // Return instance of data dictionary. Create instance if it is NULL.
-
- Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString& ) const;
- Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString&,
- const TCollection_AsciiString& ) const;
+ static Handle_DDS_Dictionary Get();
- Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
- Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString&,
- const TCollection_AsciiString& ) const;
- Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
- Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString&,
- const TCollection_AsciiString& ) const;
- Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem() const;
- Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem( const TCollection_AsciiString& ) const;
- Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString& );
- Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString&,
- const TCollection_AsciiString& );
+ Handle_DDS_DicItem GetDicItem( const TCollection_AsciiString& ) const;
+ Handle_DDS_DicItem GetDicItem( const TCollection_AsciiString&,
+ const TCollection_AsciiString& ) const;
+ void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
+ void GetUnitSystems( TColStd_SequenceOfAsciiString&,
+ const TCollection_AsciiString& ) const;
+ TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
+ TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString&,
+ const TCollection_AsciiString& ) const;
+ TCollection_AsciiString GetActiveUnitSystem() const;
+ TCollection_AsciiString GetActiveUnitSystem( const TCollection_AsciiString& ) const;
+ void SetActiveUnitSystem( const TCollection_AsciiString& );
+ void SetActiveUnitSystem( const TCollection_AsciiString&,
+ const TCollection_AsciiString& );
+
- static Standard_EXPORT Standard_Boolean Load( const TCollection_AsciiString );
+ static Standard_Boolean Load( const TCollection_AsciiString );
- static Standard_EXPORT Standard_Real ToSI( const Standard_Real, const Standard_CString );
- static Standard_EXPORT Standard_Real FromSI( const Standard_Real, const Standard_CString );
+ static Standard_Real ToSI( const Standard_Real, const Standard_CString );
+ static Standard_Real FromSI( const Standard_Real, const Standard_CString );
- static Standard_EXPORT LDOMString KeyWord( const TCollection_AsciiString& );
+ static LDOMString KeyWord( const TCollection_AsciiString& );
private:
DDS_Dictionary();
DDS_Dictionary( const DDS_Dictionary& );
- void operator=( const DDS_Dictionary& );
+ void operator=( const DDS_Dictionary& );
- void FillDataMap( const LDOM_Element&, const LDOM_Element& );
+ void FillDataMap( const LDOM_Element&, const LDOM_Element& );
private:
- DDS_IndexedDataMapOfDicGroups myGroupMap;
+ DDS_IndexedDataMapOfDicGroups myGroupMap;
public:
DEFINE_STANDARD_RTTI(DDS_Dictionary)
/*!
\class DDS_KeyWords
+ \brief This class defines the pairs of internal keys and XML tags or
+ attributes names.
- This object contains the pairs of internal keys and XML tag or attribute names. This class allow to user
- define set of XML keywords used in datums definition file.
+ This class allows user to define a set of XML keywords used in the datums
+ definition (XML) file.
Default keywords table:
- \li D_URI - dictionary
- \li COMPONENT - component
- \li COMPONENT_NAME - name
- \li UNIT_SYSTEMS - unitSystems
- \li UNIT_SYSTEM - system
- \li UNIT_SYSTEM_NAME - name
- \li UNIT_SYSTEM_LABEL - label
- \li DATUM - datum
- \li DATUM_ID - id
- \li DATUM_LABEL - label
- \li DATUM_UNITS - units
- \li DATUM_FORMAT - format
- \li DATUM_FILTER - filter
- \li DATUM_REQUIRED - required
- \li VALUE_LIST - valueList
- \li VALUE_LIST_ID - listid
- \li VALUE_LIST_NAME - name
- \li VALUE_LIST_TYPE - type
- \li VALUE_LIST_VALUE - value
- \li VALUE_LIST_VALUEID - id
- \li VALUE_LIST_VALUEICON - icon
- \li DY_DOMAIN - domain
- \li WARNING_LEVEL - warningLevel
- \li WRONG_VALUE - wrongValue
- \li VALUE_DESCR - valueDescr
- \li VALUE_LIST_REF - listRef
- \li DESCR - description
- \li LONG_D - longDescr
- \li SHORT_D - shortDescr
- \li VD_TYPE - type
- \li VD_DEFV - default
- \li VD_MAXV - max
- \li VD_MINV - min
- \li VD_SPEC - specVal
- \li VLR_LIST - list
- \li PRS - presentation
- \li LATERAL_ZOOM - lateralZoom
- \li LZ_MINV - min
- \li LZ_MAXV - max
- \li LZ_ORDER - order
- \li OPTIONS - options
- \li OPTION - option
- \li OPTION_NAME - name
+ - \c D_URI - dictionary
+ - \c COMPONENT - component
+ - \c COMPONENT_NAME - name
+ - \c UNIT_SYSTEMS - unitSystems
+ - \c UNIT_SYSTEM - system
+ - \c UNIT_SYSTEM_NAME - name
+ - \c UNIT_SYSTEM_LABEL - label
+ - \c DATUM - datum
+ - \c DATUM_ID - id
+ - \c DATUM_LABEL - label
+ - \c DATUM_UNITS - units
+ - \c DATUM_FORMAT - format
+ - \c DATUM_FILTER - filter
+ - \c DATUM_REQUIRED - required
+ - \c VALUE_LIST - valueList
+ - \c VALUE_LIST_ID - listid
+ - \c VALUE_LIST_NAME - name
+ - \c VALUE_LIST_TYPE - type
+ - \c VALUE_LIST_VALUE - value
+ - \c VALUE_LIST_VALUEID - id
+ - \c VALUE_LIST_VALUEICON - icon
+ - \c DY_DOMAIN - domain
+ - \c WARNING_LEVEL - warningLevel
+ - \c WRONG_VALUE - wrongValue
+ - \c VALUE_DESCR - valueDescr
+ - \c VALUE_LIST_REF - listRef
+ - \c DESCR - description
+ - \c LONG_D - longDescr
+ - \c SHORT_D - shortDescr
+ - \c VD_TYPE - type
+ - \c VD_DEFV - default
+ - \c VD_MAXV - max
+ - \c VD_MINV - min
+ - \c VD_SPEC - specVal
+ - \c VLR_LIST - list
+ - \c PRS - presentation
+ - \c LATERAL_ZOOM - lateralZoom
+ - \c LZ_MINV - min
+ - \c LZ_MAXV - max
+ - \c LZ_ORDER - order
+ - \c OPTIONS - options
+ - \c OPTION - option
+ - \c OPTION_NAME - name
+
+ There is the only instance of the class DDS_KeyWords in the application
+ which can be retrieved by method Get().
*/
/*!
- Constructor
+ \brief Constructor.
+ Create an instance of the object. Can not be used directly.
+ Use Get() method instead.
*/
-
DDS_KeyWords::DDS_KeyWords()
: MMgt_TShared()
{
}
/*!
- Returns the static instance of the class DDS_KeyWords
+ \brief Get the only instance of the class DDS_KeyWords.
+ \return the only instance of the class
*/
-
-Handle(DDS_KeyWords) DDS_KeyWords::Get()
+Handle_DDS_KeyWords DDS_KeyWords::Get()
{
static Handle(DDS_KeyWords) keyWords;
}
/*!
- Returns the XML keyword by specified internal key \a key. If the internal key isn't registered
- then empty string will be returned.
-*/
+ \brief Get the XML keyword by specified internal key \a key.
+ If the internal key is not registered, empty string is returned.
+ \param key internal key
+ \return XML keyword
+*/
TCollection_AsciiString DDS_KeyWords::GetKeyWord( const TCollection_AsciiString& key ) const
{
TCollection_AsciiString keyWord;
}
/*!
- Register the pair of the internal key \a key and XML keyword \a keyWord.
+ \brief Register the pair of the internal key \a key and XML keyword \a keyWord.
+ \param key internal key
+ \param keyWord XML keyword
*/
-
void DDS_KeyWords::SetKeyWord( const TCollection_AsciiString& key,
const TCollection_AsciiString& keyWord )
{
class TCollection_AsciiString;
-class DDS_KeyWords : public MMgt_TShared
+class Standard_EXPORT DDS_KeyWords : public MMgt_TShared
{
public:
- Standard_EXPORT static Handle(DDS_KeyWords) Get();
+ static Handle_DDS_KeyWords Get();
- Standard_EXPORT TCollection_AsciiString GetKeyWord( const TCollection_AsciiString& ) const;
- Standard_EXPORT void SetKeyWord( const TCollection_AsciiString&,
- const TCollection_AsciiString& );
+ TCollection_AsciiString GetKeyWord( const TCollection_AsciiString& ) const;
+ void SetKeyWord( const TCollection_AsciiString&,
+ const TCollection_AsciiString& );
private:
DDS_KeyWords();
TCollection_AsciiString> KeyWordMap;
private:
- KeyWordMap myKeyWord;
+ KeyWordMap myKeyWord;
public:
DEFINE_STANDARD_RTTI(DDS_KeyWords)
lib_LTLIBRARIES = libDDS.la
-salomeinclude_HEADERS = DDS.h \
- DDS_DicGroup.h \
- DDS_DicItem.h \
- DDS_Dictionary.h \
+salomeinclude_HEADERS = \
+ DDS.h \
+ DDS_DicGroup.h \
+ DDS_DicItem.h \
+ DDS_Dictionary.h \
DDS_KeyWords.h
-dist_libDDS_la_SOURCES = DDS_DicGroup.cxx \
- DDS_DicItem.cxx \
- DDS_Dictionary.cxx \
+dist_libDDS_la_SOURCES = \
+ DDS_DicGroup.cxx \
+ DDS_DicItem.cxx \
+ DDS_Dictionary.cxx \
DDS_KeyWords.cxx
libDDS_la_CPPFLAGS=$(CAS_CPPFLAGS)