Salome HOME
Merge V8_4_BR branch.
[modules/gui.git] / src / DDS / DDS_Dictionary.cxx
1 // Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #include "DDS_Dictionary.h"
24
25 #include "DDS_KeyWords.h"
26
27 #include <LDOMString.hxx>
28 #include <LDOMParser.hxx>
29
30 #include <UnitsAPI.hxx>
31
32 #include <TColStd_SequenceOfInteger.hxx>
33 #include <TColStd_SequenceOfAsciiString.hxx>
34 #include <TColStd_SequenceOfExtendedString.hxx>
35
36 #include <NCollection_Map.hxx>
37
38 #include <Standard_Failure.hxx>
39 #include <Standard_ErrorHandler.hxx>
40
41 IMPLEMENT_STANDARD_RTTIEXT(DDS_Dictionary, Standard_Transient)
42
43 Handle(DDS_Dictionary) DDS_Dictionary::myDictionary = Handle(DDS_Dictionary)();
44
45 /*!
46   \class DDS_Dictionary
47   \brief This class provides an information about used datums, 
48          reading them from XML file.
49
50   There is the only instance of the class DDS_Dictionary in the application
51   which can be retrieved by method Get().
52
53   Datum is a set of parameters describing a phisical characteristic.
54   These parameters are loaded from the XML file which has the following format:
55
56   \verbatim
57   <D_URI>
58   <COMPONENT COMPONENT_NAME="component_name">
59     <UNIT_SYSTEMS>
60       <UNIT_SYSTEM UNIT_SYSTEM_NAME="[system_internal_name]" UNIT_SYSTEM_LABEL="[system_label]">
61       <UNIT_SYSTEM UNIT_SYSTEM_NAME="[system_internal_name]" UNIT_SYSTEM_LABEL="[system_label]">
62       ...
63       <UNIT_SYSTEM UNIT_SYSTEM_NAME="[system_internal_name]" UNIT_SYSTEM_LABEL="[system_label]">
64     </UNIT_SYSTEMS>
65
66     <DATUM DATUM_UNITS="[base_system_internal_name]" DATUM_FORMAT="[sprintf_format_specification]"
67            DATUM_ID="[datum_id]" DATUM_LABEL="[datum_label]" DATUM_REQUIRED="[requred_value]"
68            DATUM_FILTER="[string_regular_expression]">
69       <DY_DOMAIN>
70         <VALUE_DESCR VD_DEFV="[default_value]" VD_MAXV="[max_value]" VD_MINV="[min_value]" VD_TYPE="[value_type]"/>
71         <VALUE_LIST_REF VLR_LIST="[referenced_list_id]"/>
72       </DY_DOMAIN>
73       <DESCR>
74         <SHORT_D>[brief_desription_text]</SHORT_D>
75         <LONG_D>[full_description_text]</LONG_D>
76       </DESCR>
77       <OPTIONS>
78         <OPTION OPTION_NAME="[option_name_1]">[option_value_1]</OPTION>
79         <OPTION OPTION_NAME="[option_name_2]">[option_value_2]</OPTION>
80         ...
81         <OPTION OPTION_NAME="[option_name_n]">[option_value_n]</OPTION>
82       </OPTIONS>
83     </DATUM>
84
85     ...
86
87     <VALUE_LIST VALUE_LIST_ID="[list_id]" VALUE_LIST_NAME="[list_name]">
88       <VALUE_LIST_VALUE VALUE_LIST_VALUEID="[list_element_id]" VALUE_LIST_VALUEICON="[list_element_icon_file]">[list_element_name]</VALUE_LIST_VALUE>
89       <VALUE_LIST_VALUE VALUE_LIST_VALUEID="[list_element_id]" VALUE_LIST_VALUEICON="[list_element_icon_file]">[list_element_name]</VALUE_LIST_VALUE>
90       ...
91       <VALUE_LIST_VALUE VALUE_LIST_VALUEID="[list_element_id]" VALUE_LIST_VALUEICON="[list_element_icon_file]">[list_element_name]</VALUE_LIST_VALUE>
92     </VALUE_LIST>
93
94     ...
95
96     </COMPONENT>
97   </D_URI>
98
99   \endverbatim
100
101   In above description of the datum XML file format internal keys are used as XML tags
102   and attributes names. Real XML keywords are defined by DDS_KeyWords class.
103
104   XML file should have one main tag named "dictionary" (key "D_URI"). This tag
105   should contain one or several components. 
106   Component is an independent set of datums and units systems.
107   Components are defined by XML tag named "component" (key "COMPONENT") with 
108   attribute "name" (key COMPONENT_NAME).
109   Component name is used as component identifier and should be unique. 
110   
111   Component tag can contain:
112
113   - Tag "unit_systems" (key UNIT_SYSTEMS) defines a set of used units systems.
114   At least one unit system named SI ("System International") should exist.
115   If this system does not exist, it will be created automatically.
116   Each units system is defined by XML tag "unit system" (key UNIT_SYSTEM) under 
117   the tag "unit_systems" with attributes "name" (key UNIT_SYSTEM_NAME) 
118   and "label" (key UNIT_SYSTEM_LABEL). Name is an identifier of the units system and
119   label is its human readable description.
120
121   - One or several tags "datum" (key DATUM). For this tag the following attributes 
122   can be defined:
123     -# Identifier (key DATUM_ID) specifies the unique id string for the datum.
124     -# Label (key DATUM_LABEL) specifies human readable name of the datum.
125     -# Measure units (key DATUM_UNITS) for the given units system. Attribute name 
126     defines a name of units system and a keyword got from DDS_KeyWords by key DATUM_UNITS.
127     For example, for "SI" units system and default keyword the attribute name is "SIunits".
128     This attribute should be specified for each declared units system. 
129     Value of this attribute should be a string describing measure units.
130     For possible designations for measure units and their multiple prefixes
131     please refer to the UnitsAPI package of the OpenCascade library
132     (files Units.dat and Lexi_Expr.dat). Measure units are used for numerical
133     values conversion from one units system to another one.
134     -# Format (key DATUM_FORMAT) specifies the format string which will be used
135     during initial formatting of the value. This string should be specified 
136     in sprintf() format.
137     -# Filter (key DATUM_FILTER) specifies the regualr expression. The value (string)
138     entered by the user will be checked up to match to this regular expression
139     (if it defined). Non matched strings will be rejected.
140     -# Required value (key DATUM_REQUIRED). If this attributed si defined and its value
141     is \c true then user can't leave an input non-filled - parameter must be explicitly
142     entered by the user).
143
144   - One or several tags "list definition" (key VALUE_LIST). Each such tag defines
145   the list of items for enumerable data. Attribute "list id" (key VALUE_LIST_ID) 
146   specifies the identifier string for the list and attribute "list name"
147   (key VALUE_LIST_NAME) defines a list name string. Each list item is described
148   by tag "list value" (key VALUE_LIST_VALUE) under the tag "list definition". 
149   Each this tag contains item string text and have the following attributes:
150     -# "list item id" (key VALUE_LIST_VALUEID) - integer numerical identifier for 
151     the item
152     -# "list item icon" (key VALUE_LIST_VALUEICON) - icon file name for the item
153
154   Tag "datum" can have child subtags "description" and "options".
155
156   - Tag "description" (key DESCR) contains two sub tags:
157     -# "short description" (key SHORT_D) specifies a brief datum description text
158     -# "long description" (key LONG_D) specifies a detailed description text
159
160   - Tag "options" (key OPTIONS) contains one or more sub tags "option" (key OPTION).
161   Each of these XML elements should contain text option value and attribute
162   "name" (key OPTION_NAME) which specifies option name.
163
164   Each tag "datum" defines most common parameters of phisical characteristic.
165   These parameters are placed in two groups:
166   -# Domain parameters under the tag "domain" (key DY_DOMAIN). This tag can 
167   contain value description tag (key VALUE_DESCR) for descrete data which is
168   described by following parameters:
169     - default value (key VD_DEFV)
170     - maximum value (key VD_MAXV)
171     - minimum value (key VD_MINV)
172     - type of value (key VD_TYPE), possible values are String, Integer, Float, List
173   -# list reference tag (key VALUE_LIST_REF) for enumerable data described by
174   "list reference" attribute (key VLR_LIST) which references to the list
175   (see "list definition" tag) by list id.
176
177   Below is an example of the XML file using default keywords.
178
179   \verbatim
180   <datadictionary version="1.0">
181     <component name="My Component">
182
183       <!-- specify two unit systems -->
184
185       <unitSystems>
186         <system name="SI" label="System international">
187         <system name="AS" label="Anglo - sacson system">
188       </unitSystems>
189
190       <!-- specify datum -->
191       <!-- units of measure for SI - meters (m), for AS - inches (in) -->
192       <datum SIunits="m" ASunits="in" format="%.25f" id="X" label="X coordinate" required="">
193         <domain>
194           <!-- default value not specified -->
195           <valueDescr default="" max="999999999.999" min="0.000" type="Float"/>
196         </domain>
197         <description>
198           <shortDescr>X coordinate for object</shortDescr>
199           <longDescr>X multiplier of object coordinates. Describe position of object in direction of X axis</longDescr>
200         </description>
201       </datum>
202
203       <datum SIunits="m" ASunits="in" format="%.25f" id="Y" label="Y coordinate" required="">
204         <domain>
205           <valueDescr default="" max="999999999.999" min="0.000" type="Float"/>
206         </domain>
207         <description>
208           <shortDescr>Y coordinate for object</shortDescr>
209           <longDescr>Y multiplier of object coordinates. Describe position of object in direction of Y axis</longDescr>
210         </description>
211       </datum>
212
213       <!-- datum for object name with filter which not allow to input more that 8 letters,
214            numbers or unerscores with first letter only -->
215       <datum format="%.8us" id="ObjectName" label="Name" required="yes"
216              filter="^([A-Z]+)([A-Z,0-9,_]*)$">
217         <domain>
218           <!-- limits and default not specified, type is string -->
219           <valueDescr default="" max="" min="" type="String" />
220         </domain>
221         <description>
222           <!-- long description not specified -->
223           <shortDescr>Name of object</shortDescr>
224         </description>
225       </datum>
226
227
228       <!-- datum for enumeration of side -->
229       <datum format="" id="Side" label="Side" required="">
230         <domain>
231           <!-- default list item is item with id 0 -->
232           <valueDescr default="0" type="List"/>
233           <!-- list reference on list named "side_list" -->
234           <listRef list="side_list"/>
235         </domain>
236         <description>
237           <shortDescr>Side of object</shortDescr>
238         </description>
239       </datum>
240
241       <!-- list definition for enumeration of side -->
242       <valueList listid="side_list" name="Side">
243         <value id="1">left</value>
244         <value id="2">right</value>
245         <value id="3">top</value>
246         <value id="4">bottom</value>
247         <value id="0">undefined</value>
248       </valueList>
249
250     </component>
251   </datadictionary>
252   \endverbatim
253 */
254
255 /*!
256   \brief Constructor.
257
258   Create an instance of the dictionary. Can not be used directly.
259   Use Get() method instead.
260 */
261 DDS_Dictionary::DDS_Dictionary()
262 : Standard_Transient()
263 {
264 }
265
266 /*!
267   \brief Copy constructor (put in private section to prevent object copying).
268 */
269 DDS_Dictionary::DDS_Dictionary( const DDS_Dictionary& )
270 {
271 }
272
273 /*!
274   \brief Assignment operator (put in private section to prevent object copying).
275 */
276 void DDS_Dictionary::operator=( const DDS_Dictionary& )
277 {
278 }
279
280 /*!
281   \brief Get the names of defined units systems from all components.
282   \param theSystems returning sequence of units systems names.
283 */
284 void DDS_Dictionary::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystems ) const
285 {
286   theSystems.Clear();
287
288   NCollection_Map<TCollection_AsciiString> aMap;
289   for ( Standard_Integer i = 1; i <= myGroupMap.Extent(); i++ )
290   {
291     TColStd_SequenceOfAsciiString theSeq;
292     myGroupMap.FindFromIndex( i )->GetUnitSystems( theSeq );
293     for ( Standard_Integer s = 1; s <= theSeq.Length(); s++ )
294     {
295       if ( aMap.Contains( theSeq.Value( s ) ) )
296         continue;
297
298       theSystems.Append( theSeq.Value( s ) );
299       aMap.Add( theSeq.Value( s ) );
300     }
301   }
302
303 }
304
305 /*!
306   \brief Get the names of defined units systems from the specified component
307          \a theComponent.
308
309   If component is not found, empty list is returned.
310
311   \param theSystems returning sequence of units systems names.
312   \param theComponent component name
313 */
314 void DDS_Dictionary::GetUnitSystems( TColStd_SequenceOfAsciiString& theSystems,
315                                      const TCollection_AsciiString& theComponent ) const
316 {
317   theSystems.Clear();
318   if ( myGroupMap.Contains( theComponent ) )
319     myGroupMap.FindFromKey( theComponent )->GetUnitSystems( theSystems );
320 }
321
322 /*!
323   \brief Get the label of the units system \a theSystem.
324
325   Searches the given units system in all components. If units system is not found
326   in any component, empty string is returned.
327
328   \param theSystem units system
329   \return units system label
330 */
331 TCollection_ExtendedString DDS_Dictionary::GetUnitSystemLabel( const TCollection_AsciiString& theSystem ) const
332 {
333   TCollection_ExtendedString aLabel;
334   for ( Standard_Integer i = 1; i <= myGroupMap.Extent() && !aLabel.Length(); i++ )
335     aLabel = myGroupMap.FindFromIndex( i )->GetUnitSystemLabel( theSystem );
336   return aLabel;
337 }
338
339 /*!
340   \brief Get the label of the units system \a theSystem from the
341          component \a theComponent.
342
343   Searches the specified units system in the specified component only.
344   If units system is not found, empty string is returned.
345
346   \param theSystem units system
347   \param theComponent component name
348   \return units system label
349 */
350 TCollection_ExtendedString DDS_Dictionary::GetUnitSystemLabel( const TCollection_AsciiString& theSystem,
351                                                                const TCollection_AsciiString& theComponent ) const
352 {
353   TCollection_ExtendedString aLabel;
354   if ( myGroupMap.Contains( theComponent ) )
355     aLabel = myGroupMap.FindFromKey( theComponent )->GetUnitSystemLabel( theSystem );
356   return aLabel;
357 }
358
359 /*!
360   \brief Get the name of active units system from the first found component. 
361   
362   If at least one component exists, then its active units system name 
363   is returned. Otherwise, empty string is returned.
364
365   \return active units system name
366 */
367 TCollection_AsciiString DDS_Dictionary::GetActiveUnitSystem() const
368 {
369   TCollection_AsciiString aSystem;
370   if ( myGroupMap.Extent() )
371     aSystem = myGroupMap.FindFromIndex( 1 )->GetActiveUnitSystem();
372   return aSystem;
373 }
374
375 /*!
376   \brief Get the name of active units system from the component \a theComponent.
377
378   If this component exists, its active units system name is returned.
379   Otherwise, empty string is returned.
380
381   \param theComponent component name
382   \return active units system name
383 */
384 TCollection_AsciiString DDS_Dictionary::GetActiveUnitSystem( const TCollection_AsciiString& theComponent ) const
385 {
386   TCollection_AsciiString aSystem;
387   if ( myGroupMap.Contains( theComponent ) )
388     aSystem = myGroupMap.FindFromKey( theComponent )->GetActiveUnitSystem();
389   return aSystem;
390 }
391
392 /*!
393   \brief Set the active units system. 
394
395   This units system will be activated in each existing component, 
396   if it component has this units system.
397
398   \param theSystem units system to be made active
399 */
400 void DDS_Dictionary::SetActiveUnitSystem( const TCollection_AsciiString& theSystem )
401 {
402   for ( Standard_Integer i = 1; i <= myGroupMap.Extent(); i++ )
403     myGroupMap.FindFromIndex( i )->SetActiveUnitSystem( theSystem );
404 }
405
406 /*!
407   \brief Set the active units system for the component \a theComponent. 
408
409   If specified units system doesn't exist in the component, nothing happens.
410
411   \param theSystem units system to be made active
412   \param theComponent component name
413 */
414 void DDS_Dictionary::SetActiveUnitSystem( const TCollection_AsciiString& theSystem,
415                                           const TCollection_AsciiString& theComponent )
416 {
417   if ( myGroupMap.Contains( theComponent ) )
418     myGroupMap.FindFromKey( theComponent )->SetActiveUnitSystem( theSystem );
419 }
420
421 /*!
422   \brief Get the only instance of the data dictionary.
423   \return the only instance of the data dictionary
424 */
425 Handle(DDS_Dictionary) DDS_Dictionary::Get()
426 {
427   if ( myDictionary.IsNull() )
428     myDictionary = new DDS_Dictionary();
429
430   return myDictionary;
431 }
432
433 /*!
434   \brief Load datum definitions in the dictionary from the XML file
435   \a theFileName.
436   \param theFileName XML file name
437   \return \c true if loading is succeded or \c false otherwise.
438 */
439 Standard_Boolean DDS_Dictionary::Load( const TCollection_AsciiString theFileName )
440 {
441   static NCollection_Map<TCollection_AsciiString> _LoadMap;
442
443   if ( _LoadMap.Contains( theFileName ) )
444     return Standard_True;
445
446   Handle(DDS_Dictionary) aDic = Get();
447   if ( aDic.IsNull() )
448     return Standard_False;
449
450   LDOMParser aParser;
451   if ( aParser.parse( theFileName.ToCString() ) )
452     return Standard_False;
453
454   LDOM_Document aDoc = aParser.getDocument();
455   LDOM_Element aDocElement = aDoc.getDocumentElement();
456   if ( !aDocElement.isNull() )
457     aDic->FillDataMap( aDocElement );
458
459   _LoadMap.Add( theFileName );
460
461   return Standard_True;
462 }
463
464 /*!
465   \brief Get XML keyword as LDOMString by specified \a key.
466
467   If key doesn't exist, empty string is returned. 
468   This function is provided for convenience.
469   
470   \param key keyword name
471   \return keyword value
472 */
473 LDOMString DDS_Dictionary::KeyWord( const TCollection_AsciiString& key )
474 {
475   LDOMString keyWord;
476   Handle(DDS_KeyWords) aKeyWords = DDS_KeyWords::Get();
477   if ( !aKeyWords.IsNull() )
478   {
479     TCollection_AsciiString aStr = aKeyWords->GetKeyWord( key );
480     if ( aStr.Length() )
481       keyWord = LDOMString( aStr.ToCString() );
482   }
483   return keyWord;
484 }
485
486 /*!
487   \brief Get the data dictionary item by specified identifier \a theID
488   from the component \a theComponent.
489   
490   If the component or item is not found, null handle is returned.
491   \param theID data dictionary item ID
492   \param theComponent component name
493   \return handle to the data dictionary item
494 */
495 Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID,
496                                                 const TCollection_AsciiString& theComponent ) const
497 {
498   Handle(DDS_DicItem) aDicItem;
499   Handle(DDS_DicGroup) aDicGroup;
500   if ( myGroupMap.Contains( theComponent ) )
501     aDicGroup = myGroupMap.FindFromKey( theComponent );
502   if ( !aDicGroup.IsNull() )
503     aDicItem = aDicGroup->GetDicItem( theID );
504   return aDicItem;
505 }
506
507 /*!
508   \brief Get the data dictionary item by specified identifier \a theID.
509
510   Function searches the item in all components. If item is not found
511   in all components, null handle is returned.
512
513   \param theID data dictionary item ID
514   \return handle to the data dictionary item
515 */
516 Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID ) const
517 {
518   Handle(DDS_DicItem) aDicItem;
519   for ( Standard_Integer i = 1; i <= myGroupMap.Extent() && aDicItem.IsNull(); i++ )
520     aDicItem = myGroupMap.FindFromIndex( i )->GetDicItem( theID );
521   return aDicItem;
522 }
523
524 /*!
525   \brief Fill the internal data structures from the XML node.
526   \param theDocElement document XML node
527 */
528 void DDS_Dictionary::FillDataMap( const LDOM_Element& theDocElement )
529 {
530   for ( LDOM_Element aComponentElem = theDocElement.GetChildByTagName( KeyWord( "COMPONENT" ) );
531         !aComponentElem.isNull(); aComponentElem = aComponentElem.GetSiblingByTagName() )
532   {
533     TCollection_AsciiString aCompName = aComponentElem.getAttribute( KeyWord( "COMPONENT_NAME" ) );
534     if ( !myGroupMap.Contains( aCompName ) )
535       myGroupMap.Add( aCompName, CreateGroup( aCompName ) );
536     Handle(DDS_DicGroup) aDicGroup = myGroupMap.FindFromKey( aCompName );
537     aDicGroup->FillDataMap( aComponentElem, theDocElement );
538     myGroupMap.Add( aCompName, aDicGroup );
539   }
540 }
541
542 /*!
543   \brief Convert numeric value \a theValue from specified measure units
544   \a theUnits to "SI" measure units (mm for Length, radians for Angles, etc).
545   \param theValue value being converted
546   \param theUnits measure units
547   \return converted value
548 */
549 Standard_Real DDS_Dictionary::ToSI( const Standard_Real theValue, const Standard_CString theUnits )
550 {
551   Standard_Real aRetValue = theValue;
552   if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
553   {
554     try {
555       OCC_CATCH_SIGNALS;
556       aRetValue = UnitsAPI::AnyToSI( theValue, theUnits );
557     }
558     catch( Standard_Failure ) {
559     }
560   }
561   else if ( theUnits && *theUnits )
562     aRetValue = theValue / 100.0;
563
564   return aRetValue;
565 }
566
567 /*!
568   \brief Convert numeric value \a theValue to specified measure units
569   \a theUnits from "SI" measure units (mm for Length, radians for Angles, etc).
570   \param theValue value being converted
571   \param theUnits measure units
572   \return converted value
573 */
574 Standard_Real DDS_Dictionary::FromSI( const Standard_Real theValue, const Standard_CString theUnits )
575 {
576   Standard_Real aRetValue = theValue;
577   if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
578   {
579     try {
580       OCC_CATCH_SIGNALS;
581       aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits );
582     }
583     catch( Standard_Failure ) {
584     }
585   }
586   else if ( theUnits && *theUnits )
587     aRetValue = theValue * 100.0;
588
589   return aRetValue;
590 }
591
592 /*!
593   \brief Fill given string container \a seq with keys belonging to group with name \a theComponent
594   \param theComponent name of group whose keys should be stored in the container
595   \param seq returned string container with keys belonging to group; it is not cleared before filling
596 */
597 void DDS_Dictionary::GetKeys( const TCollection_AsciiString& theComponent, TColStd_SequenceOfAsciiString& seq ) const
598 {
599   Handle( DDS_DicGroup ) aDicGroup;
600   if( myGroupMap.Contains( theComponent ) )
601     aDicGroup = myGroupMap.FindFromKey( theComponent );
602
603   if( !aDicGroup.IsNull() )
604     aDicGroup->GetKeys( seq );
605 }
606
607 /*!
608   \brief  Create instance of a dictionary group. This method can
609           be used for customization data dictionary by specific
610           groups design.
611   \return New dictionary group instance.
612 */
613 Handle(DDS_DicGroup) DDS_Dictionary::CreateGroup( const TCollection_AsciiString& theCompName ) const
614 {
615   return new DDS_DicGroup( theCompName );
616 }
617
618 /*!
619   \brief Set instance of dictionary. This method might be used in descendant classes to initialize
620          custom dictionary and replace the default implementation.
621          This method overrides static handle on dictionary that is available
622          through Get() method
623 */
624 void DDS_Dictionary::SetDictionary( const Handle(DDS_Dictionary)& theDict )
625 {
626   myDictionary = theDict; 
627 }