class LDOM_Element;
class TColStd_SequenceOfAsciiString;
-class Standard_EXPORT DDS_DicGroup : public MMgt_TShared
+DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
+
+class DDS_DicGroup : public MMgt_TShared
{
public:
DDS_DicGroup( const TCollection_AsciiString& );
- TCollection_AsciiString GetName() const;
+ TCollection_AsciiString GetName() const;
- Handle_DDS_DicItem GetDicItem( const TCollection_AsciiString& ) const;
+ Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString& ) const;
- void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
- TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
+ Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
+ Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
- TCollection_AsciiString GetActiveUnitSystem() const;
- void SetActiveUnitSystem( const TCollection_AsciiString& );
+ Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem() const;
+ Standard_EXPORT 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 TColStd_SequenceOfAsciiString;
class TColStd_SequenceOfExtendedString;
-class Standard_EXPORT DDS_DicItem : public MMgt_TShared
+// 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
{
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();
- 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 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 GetUnits() const;
- TCollection_AsciiString GetUnits( const UnitSystem& ) const;
+ Standard_EXPORT TCollection_AsciiString GetUnits() const;
+ Standard_EXPORT TCollection_AsciiString GetUnits( const UnitSystem& ) const;
- TCollection_ExtendedString GetDefaultValue() const;
- TCollection_ExtendedString GetDefaultValue( const UnitSystem& ) const;
+ Standard_EXPORT TCollection_ExtendedString GetDefaultValue() const;
+ Standard_EXPORT TCollection_ExtendedString GetDefaultValue( const UnitSystem& ) const;
- Standard_Real GetMinValue() const;
- Standard_Real GetMinValue( const UnitSystem& ) const;
+ Standard_EXPORT Standard_Real GetMinValue() const;
+ Standard_EXPORT Standard_Real GetMinValue( const UnitSystem& ) const;
- Standard_Real GetMaxValue() const;
- Standard_Real GetMaxValue( const UnitSystem& ) const;
+ Standard_EXPORT Standard_Real GetMaxValue() const;
+ Standard_EXPORT Standard_Real GetMaxValue( const UnitSystem& ) const;
- Standard_Integer GetPrecision() const;
- Standard_Integer GetPrecision( const UnitSystem& ) const;
+ Standard_EXPORT Standard_Integer GetPrecision() const;
+ Standard_EXPORT Standard_Integer GetPrecision( const UnitSystem& ) 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 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;
- Standard_Real GetMinZoom() const;
- Standard_Real GetMaxZoom() const;
- Standard_Real GetZoomOrder() const;
+ Standard_EXPORT Standard_Real GetMinZoom() const;
+ Standard_EXPORT Standard_Real GetMaxZoom() const;
+ Standard_EXPORT Standard_Real GetZoomOrder() const;
- Standard_Real ToSI( const Standard_Real ) const;
- Standard_Real FromSI( const Standard_Real ) 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 UnitSystem& ) const;
- Standard_Real FromSI( const Standard_Real, const UnitSystem& ) const;
+ Standard_EXPORT Standard_Real ToSI( const Standard_Real, const UnitSystem& ) const;
+ Standard_EXPORT Standard_Real FromSI( const Standard_Real, const UnitSystem& ) const;
- Standard_Boolean HasData( const Standard_Integer ) const;
+ Standard_EXPORT Standard_Boolean HasData( const Standard_Integer ) const;
- TCollection_ExtendedString GetOption( const TCollection_AsciiString& ) const;
- Standard_Boolean GetOptionNames( TColStd_SequenceOfAsciiString& ) const;
+ Standard_EXPORT TCollection_ExtendedString GetOption( const TCollection_AsciiString& ) const;
+ Standard_EXPORT 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;
#include <MMgt_TShared.hxx>
-DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
-
class LDOM_Element;
class TCollection_AsciiString;
-class Standard_EXPORT DDS_Dictionary : public MMgt_TShared
+DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
+
+class DDS_Dictionary : public MMgt_TShared
{
public:
- static Handle_DDS_Dictionary Get();
+ 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;
- Handle_DDS_DicItem GetDicItem( const TCollection_AsciiString& ) const;
- Handle_DDS_DicItem GetDicItem( const TCollection_AsciiString&,
- const TCollection_AsciiString& ) const;
+ 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& );
- 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_Boolean Load( const TCollection_AsciiString );
+ static Standard_EXPORT Standard_Boolean Load( const TCollection_AsciiString );
- static Standard_Real ToSI( const Standard_Real, const Standard_CString );
- static Standard_Real FromSI( const Standard_Real, const Standard_CString );
+ 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 LDOMString KeyWord( const TCollection_AsciiString& );
+ static Standard_EXPORT 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)