Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDS_DicGroup.h File Reference
#include "DDS.h"
#include "DDS_DicItem.h"
#include <MMgt_TShared.hxx>
#include <TColStd_SequenceOfAsciiString.hxx>
#include <NCollection_List.hxx>

Go to the source code of this file.

Typedefs

typedef NCollection_DataMap
< TCollection_AsciiString,
TCollection_ExtendedString > 
UnitSystemMap
 
typedef
NCollection_IndexedDataMap
< TCollection_AsciiString,
Handle(DDS_DicGroup)> 
DDS_IndexedDataMapOfDicGroups
 

Functions

DEFINE_STANDARD_HANDLE(DDS_DicGroup,
MMgt_TShared) class
DDS_DicGroup Standard_EXPORT
TCollection_AsciiString 
GetName () const
 
Standard_EXPORT void GetKeys (TColStd_SequenceOfAsciiString &) const
 Return all keys of the group. More...
 
Standard_EXPORT Handle (DDS_DicItem) GetDicItem(const TCollection_AsciiString &) const
 
Standard_EXPORT void GetUnitSystems (TColStd_SequenceOfAsciiString &) const
 Get the names of all defined units systems. More...
 
Standard_EXPORT
TCollection_ExtendedString 
GetUnitSystemLabel (const TCollection_AsciiString &) const
 Get the label of units system name. More...
 
Standard_EXPORT
TCollection_AsciiString 
GetActiveUnitSystem () const
 
Standard_EXPORT void SetActiveUnitSystem (const TCollection_AsciiString &)
 Set the active unit system. More...
 
Standard_EXPORT DDS_DicGroup (const DDS_DicGroup &)
 
Standard_EXPORT void operator= (const DDS_DicGroup &)
 
virtual Standard_EXPORT void FillDataMap (const LDOM_Element &, const LDOM_Element &)
 
Standard_EXPORT Standard_Boolean AddDicItem (const TCollection_AsciiString &, const Handle(DDS_DicItem)&)
 
Standard_EXPORT Standard_Boolean HasDicItem (const TCollection_AsciiString &) const
 Check if there is item bounded by id. More...
 
Standard_EXPORT void RemoveAllDicItems ()
 Clear dictionary items map. More...
 
Standard_EXPORT const
DDS_IndexedDataMapOfDicItems & 
GetItemMap () const
 Returns a reference to a map. Can be used to iterate through dictionary items. More...
 
Standard_EXPORT Standard_Boolean AddUnitSystem (const TCollection_AsciiString &, const TCollection_ExtendedString &)
 Add new unit system and bind its label name. More...
 
 OCCT_DEFINE_STANDARD_RTTIEXT (DDS_DicGroup, MMgt_TShared)}
 

Variables

TCollection_AsciiString myName
 
DDS_IndexedDataMapOfDicItems myDataMap
 
UnitSystemMap myUnitSystem
 
TCollection_AsciiString myActiveSystem
 
TColStd_SequenceOfAsciiString myKeys
 

Typedef Documentation

typedef NCollection_IndexedDataMap<TCollection_AsciiString, Handle(DDS_DicGroup)> DDS_IndexedDataMapOfDicGroups
typedef NCollection_DataMap<TCollection_AsciiString, TCollection_ExtendedString> UnitSystemMap

Function Documentation

Standard_EXPORT Standard_Boolean AddDicItem ( const TCollection_AsciiString &  ,
const Handle(DDS_DicItem)&   
)
protected
Standard_Boolean DDS_DicGroup::AddUnitSystem ( const TCollection_AsciiString &  theSystemKey,
const TCollection_ExtendedString &  theSystemLabel 
)
protected
Returns
Standard_False if there is other system bound by this key.

References myUnitSystem.

Standard_EXPORT DDS_DicGroup ( const DDS_DicGroup )
protected
virtual Standard_EXPORT void FillDataMap ( const LDOM_Element &  ,
const LDOM_Element &   
)
protectedvirtual
Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem ( ) const
const DDS_IndexedDataMapOfDicItems & DDS_DicGroup::GetItemMap ( ) const
protected

References myDataMap.

void DDS_DicGroup::GetKeys ( TColStd_SequenceOfAsciiString &  seq) const
Parameters
seq- string container to be filled with keys

References myKeys.

DEFINE_STANDARD_HANDLE (DDS_DicGroup, MMgt_TShared) class DDS_DicGroup Standard_EXPORT TCollection_AsciiString GetName ( ) const
TCollection_ExtendedString DDS_Dictionary::GetUnitSystemLabel ( const TCollection_AsciiString &  theSystem) const

Get the label of the units system theSystem.

If units system is not found, empty string is returned.

Parameters
makeunits system name
Returns
units system label

Searches the given units system in all components. If units system is not found in any component, empty string is returned.

Parameters
theSystemunits system
Returns
units system label

References myUnitSystem.

void DDS_Dictionary::GetUnitSystems ( TColStd_SequenceOfAsciiString &  theSystems) const

Get the names of defined units systems from all components.

Parameters
theSystemsSeqreturning sequence of names
theSystemsreturning sequence of units systems names.

References myUnitSystem, and UNIT_SYSTEM_SI.

Standard_EXPORT Handle ( DDS_DicItem  ) const
Standard_Boolean DDS_DicGroup::HasDicItem ( const TCollection_AsciiString &  theID) const
protected
Returns
Standard_True if there is an item bound in map with given id.

References myDataMap.

OCCT_DEFINE_STANDARD_RTTIEXT ( DDS_DicGroup  ,
MMgt_TShared   
)
Standard_EXPORT void operator= ( const DDS_DicGroup )
protected
void DDS_DicGroup::RemoveAllDicItems ( )
protected

References myDataMap, and myKeys.

void DDS_Dictionary::SetActiveUnitSystem ( const TCollection_AsciiString &  theSystem)

Set the active units system.

Parameters
theSystemname of the units system to be made active

This units system will be activated in each existing component, if it component has this units system.

Parameters
theSystemunits system to be made active

References myActiveSystem, and myUnitSystem.

Variable Documentation

TCollection_AsciiString myActiveSystem
DDS_IndexedDataMapOfDicItems myDataMap
TColStd_SequenceOfAsciiString myKeys
TCollection_AsciiString myName
UnitSystemMap myUnitSystem