Salome HOME
Allow switching OFF C++0x/C++11 support
[modules/kernel.git] / idl / SALOMEDS.idl
1 // Copyright (C) 2007-2015  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 //  File   : SALOMEDS.idl
24 //  Author : Yves FRICAUD
25 //
26 /*!  \file SALOMEDS.idl  \brief This file contains a set of interfaces used for creation, management
27   and modification of the %Study
28 */
29
30 #ifndef _SALOMEDS_IDL_
31 #define _SALOMEDS_IDL_
32
33 #include "SALOME_Exception.idl"
34 #include "SALOME_GenericObj.idl"
35
36 /*! \brief
37      This package contains the interfaces used for creation, management
38      and modification of the %Study
39 */
40 module SALOMEDS
41 {
42 /*! \brief Name of the file in which the %Study is saved.
43 */
44   typedef string URL;
45
46 /*! \brief Main identifier of an object in %SALOME application
47 */
48   typedef string ID;
49
50 /*! \brief While saving the data, IOR is transformed into persistent reference
51 */
52   typedef string PersistentReference;
53
54 /*! \brief IOR of the study in %SALOME application
55 */
56   typedef string SalomeReference;
57
58 /*! \brief List of the names of studies which are currently open in this %SALOME session.
59
60 Since %SALOME is a multi-study application, it allows to open a lot of studies
61 during each working session.
62 */
63   typedef sequence<string> ListOfOpenStudies;
64 //! List of file names
65   typedef sequence<string> ListOfFileNames;
66 //! List of modification dates of a study
67   typedef sequence<string> ListOfDates ;
68 //! An unbounded sequence of strings
69   typedef sequence<string> ListOfStrings ;
70 //! An unbounded sequence of sequence of strings
71   typedef sequence<ListOfStrings> ListOfListOfStrings ;
72 //! A byte stream which is used for binary data transfer between different components
73   typedef sequence<octet> TMPFile;
74
75   // Reference to other objects is treated with function AddReference
76   // and ReferencedObject
77   // All other type of attributes defined in AttributeType enum are
78   // treated with AddAdttribute and GetAttribute
79   // The difference is made because Reference attribute don't contain
80   // strings but reference to ID of other objects
81
82   interface GenericAttribute;
83   interface Study;
84   interface StudyManager;
85   interface StudyBuilder;
86   interface SObject;
87   interface SComponent;
88   interface SComponentIterator;
89   interface ChildIterator;
90   interface Driver;
91   interface AttributeStudyProperties;
92   interface AttributeParameter;
93   interface UseCaseIterator;
94   interface UseCaseBuilder;
95
96   interface Observer
97   {
98     oneway void notifyObserverID(in string theID, in long event);
99   };
100
101
102 //! List of attributes of %SObjects
103   typedef sequence<GenericAttribute> ListOfAttributes;
104
105 //! Exception indicating that this feature hasn't been implemented in %SALOME application.
106   exception NotImplemented {};
107
108
109   //===========================================================================
110  /*! \brief %Study Interface
111
112     The purpose of the %Study is to manage the data produced by various components of %SALOME platform.
113    Most of the %Study operations are handled by the StudyManager and the StudyBuilder.
114    What is left in the %Study interface are elementary inquiries.
115    (Incidentally, we recall that a CORBA attribute is implemented as a pair of get
116       and set methods.) A %Study is explored by a set of tools, mainly iterators
117     , which are described further. Nevertheless, the %Study
118      interface allows the search of an object by name or by ID.
119      \note
120      <BR><VAR>The Path </VAR>of an object in %SALOME application is much alike a standard path of a file.
121     In general it's a string of names of directories divided by a slash '/'.
122      <BR><VAR>The Context</VAR> is the current directory of an object.</P>
123 */
124
125   interface Study
126   {
127
128 //! Invalid study reference
129     exception StudyInvalidReference {};
130 //! Invalid study context
131     exception StudyInvalidContext {};
132 //! Invalid study component
133     exception StudyInvalidComponent {};
134 //! Invalid directory of the %study exception
135     exception StudyInvalidDirectory {};
136 //! Exception pointing that this name of the study has already been used.
137     exception StudyNameAlreadyUsed {};
138 //! study object already exists
139     exception StudyObjectAlreadyExists {};
140 //! Invalid name of the %study exception
141     exception StudyNameError {};
142 //! Invalid study comment
143     exception StudyCommentError {};
144
145 /*! \brief The name of the %Study
146
147    This is equivalent to the methods setName() & getName()
148 */
149     attribute string     Name; // equivalent to setName() & getName()
150 /*! \brief The ID of the %Study
151
152    This is equivalent to the methods setID() & getID()
153 */
154     attribute short      StudyId;
155 //! Sequence containing %SObjects
156     typedef sequence<SObject> ListOfSObject;
157 //!  Get the persistent reference to the %Study.
158     PersistentReference  GetPersistentReference() raises(StudyInvalidReference);
159 //! Get a transient reference to the %Study.
160     SalomeReference      GetTransientReference() raises(StudyInvalidReference);
161
162 /*! \brief indicate whether the %Study is empty
163
164     \return True if the %Study is empty
165 */
166     boolean IsEmpty() raises(StudyInvalidReference);
167 /*! \brief  Find a %SComponent by its name.
168
169    \param aComponentName    It's a string value in the Comment Attribute of the Component,
170     which is looked for, defining the data type of this Component.
171
172 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
173
174 */
175     SComponent FindComponent  (in string aComponentName) raises(StudyInvalidReference);
176
177 /*! \brief  Find a %SComponent by ID of the according %SObject
178 */
179     SComponent FindComponentID(in ID aComponentID) raises(StudyInvalidReference);
180 /*! \brief  Find a %SObject by the Name Attribute of this %SObject
181
182     \param anObjectName String parameter defining the name of the object
183     \return The obtained %SObject
184
185 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
186 */
187     SObject       FindObject      (in string anObjectName) raises(StudyInvalidReference);
188 /*! \brief  Find a %SObject by its ID
189
190     \param aObjectID This parameter defines the ID of the required object
191     \return The obtained %SObject
192 */
193     SObject       FindObjectID    (in ID aObjectID) raises(StudyInvalidReference);
194 /*! \brief Create a %SObject by its ID
195
196     \param aObjectID This parameter defines the ID of the required object
197     \return The created %SObject
198 */
199     SObject       CreateObjectID    (in ID aObjectID) raises(StudyInvalidReference);
200 /*!  \brief Find a %SObject by IOR of the object belonging to this %SObject.
201
202     \param anObjectName This parameter defines the IOR of the object
203     \return The obtained %SObject
204 */
205     SObject       FindObjectIOR   (in ID aObjectIOR) raises(StudyInvalidReference);
206 /*! \brief  Find in the study all %SObjects produced by a given %Component.
207
208     \param anObjectName The Name Attribute of the searched %SObjects should correspond to <VAR>anObjectName</VAR>.
209     \param aComponentName The name of the component, which objects are searched for.
210 */
211     ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName) raises(StudyInvalidReference);
212 /*! \brief  Find a %SObject by the path to it.
213
214     \param thePath The path to the required %SObject.
215     \return The obtained %SObject.
216 */
217     SObject FindObjectByPath(in string thePath) raises(StudyInvalidReference);
218 /*! \brief Get the path to the %SObject.
219 */
220     string GetObjectPath(in Object theObject) raises(StudyInvalidReference);
221
222 /*! \brief  Set the context of the %Study.
223
224     \param thePath String parameter defining the context of the study.
225
226 <em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
227 */
228     void SetContext(in string thePath) raises (StudyInvalidReference, StudyInvalidContext);
229 /*!  \brief Get the context of the %Study.
230
231 <em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
232 */
233     string GetContext() raises (StudyInvalidReference, StudyInvalidContext);
234 /*!  \brief Get a list of names of objects corresponding to the context.
235
236    \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
237 */
238     ListOfStrings GetObjectNames(in string theContext) raises (StudyInvalidReference, StudyInvalidContext);
239 /*! \brief Get a list of names of directories and subdirectories corresponding to the context.
240
241    \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
242 */
243     ListOfStrings GetDirectoryNames(in string theContext) raises (StudyInvalidReference, StudyInvalidContext);
244 /*! \brief  Get a list of names of Files corresponding to the context.
245
246     \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
247 */
248     ListOfStrings GetFileNames(in string theContext) raises (StudyInvalidReference, StudyInvalidContext);
249 /*! \brief Get a list of names of Components corresponding to the context.
250
251    \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
252 */
253     ListOfStrings GetComponentNames(in string theContext) raises(StudyInvalidReference);
254 /*!  \brief Create a new iterator of child levels of the given %SObject.
255
256     \param aSO The given %SObject
257     \return A new iterator of child levels of the given %SObject.
258 */
259     ChildIterator NewChildIterator(in SObject aSO) raises(StudyInvalidReference);
260
261 /*!  \brief Create a new iterator of the %SComponents.
262
263     \return A new iterator of the %SComponents.
264 */
265     SComponentIterator NewComponentIterator() raises(StudyInvalidReference);
266
267 /*! \brief  Create a new %StudyBuilder to add or modify an object in the study.
268
269    \return A new %StudyBuilder.
270
271 <em>See \ref example20 for an example of this method usage in batchmode of %SALOME application.</em>
272 */
273     StudyBuilder NewBuilder() raises(StudyInvalidReference);
274 /*! \brief Labels dependency
275
276     Updates the map with IOR attribute. It's an inner method used for optimization.
277 */
278     void UpdateIORLabelMap(in string anIOR, in string anEntry) raises(StudyInvalidReference);
279
280 /*! \brief Getting properties of the study
281
282    Returns the attribute, which contains the properties of this study.
283
284 <em>See \ref example20 for an example of this method usage in batchmode of %SALOME application.</em>
285
286 */
287     AttributeStudyProperties GetProperties() raises(StudyInvalidReference);
288 /*! \brief  Indicate whether the %study has been saved
289 */
290     attribute boolean IsSaved;
291 /*! \brief  Indicate whether the %study has been modified and not saved.
292
293   Returns True if the %study has been modified and not saved.
294 */
295     boolean IsModified() raises(StudyInvalidReference);
296
297 /*! \brief  Mark the %study as being modified and not saved.
298 */
299     void Modified() raises(StudyInvalidReference);
300
301 /*! \brief  Indicate the file where the %study has been saved
302 */
303     attribute string URL;
304
305 /*! \brief List of %SObjects
306
307     Returns the list of %SObjects which refers to %anObject.
308 */
309     ListOfSObject FindDependances(in SObject anObject) raises(StudyInvalidReference);
310
311 /*! \brief The date of the last saving of the study
312
313     Returns the date of the last saving of study with format: "DD/MM/YYYY HH:MM"
314 */
315     string GetLastModificationDate() raises(StudyInvalidReference);
316 /*! \brief The list of modification dates of the study
317
318     Returns the list of modification dates (without creation date) with format "DD/MM/YYYY HH:MM".
319       Note : the first modification begins the list.
320 */
321     ListOfDates GetModificationsDate() raises(StudyInvalidReference);
322 /*! \brief Object conversion.
323
324     Converts an object into IOR.
325     \return    IOR
326 */
327     string ConvertObjectToIOR(in Object theObject);
328 /*! \brief Object conversion.
329
330     Converts IOR into an object.
331     \return    An object
332 */
333     Object ConvertIORToObject(in string theIOR);
334
335 /*!  \brief Get a new %UseCaseBuilder.
336 */
337     UseCaseBuilder  GetUseCaseBuilder() raises(StudyInvalidReference);
338
339 /*! \brief  Close the components in the study, remove itself from the %StudyManager.
340 */
341     void Close() raises(StudyInvalidReference);
342
343 /*! \brief  Enable (if isEnabled = True)/disable automatic addition of new %SObjects to the use case.
344 */
345     void EnableUseCaseAutoFilling(in boolean isEnabled) raises(StudyInvalidReference);
346
347 /*!
348     Functions for internal usage only
349 */
350     void AddPostponed(in string theIOR) raises(StudyInvalidReference);
351
352     void AddCreatedPostponed(in string theIOR) raises(StudyInvalidReference);
353
354     void RemovePostponed(in long theUndoLimit) raises(StudyInvalidReference);
355
356     void UndoPostponed(in long theWay) raises(StudyInvalidReference);
357
358     boolean DumpStudy(in string thePath,
359                       in string theBaseName,
360                       in boolean isPublished,
361                       in boolean isMultiFile) raises(StudyInvalidReference);
362
363 /*! \brief  Get an AttributeParameter used to store common parameters for given %theSavePoint.
364
365     \param theID identifies a common parameters set (Example: "Interface Applicative")
366     \param theSavePoint is number of a set of parameters as there can be several sets
367 */
368     AttributeParameter GetCommonParameters(in string theID, in long theSavePoint) raises(StudyInvalidReference);
369
370 /*! \brief  Get an AttributeParameter used to store parameters for given %theModuleName.
371
372     \param theID identifies a common parameters set (Example: "Interface Applicative")
373     \param theModuleName is a name of the module (Example: "Geometry")
374     \param theSavePoint is number of a set of parameters as there can be several sets
375 */
376     AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint) raises(StudyInvalidReference);
377
378
379 /*! \brief Get a default Python script to restore visual parameters for given %theModuleName.
380
381     \param theModuleName is a name of the module (Example: "Geometry")
382     \param indent is a string to use for script indentation
383 */
384     string GetDefaultScript(in string theModuleName, in string indent) raises(StudyInvalidReference);
385
386 /*!
387     Private method, returns an implementation of this Study.
388    \param theHostname is a hostname of the caller
389    \param thePID is a process ID of the caller
390    \param isLocal is set True if the Study is launched locally with the caller
391 */
392     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
393
394
395 /*! \brief  Mark this Study as being locked by the given locker.
396
397     The lock status can be checked by method IsStudyLocked
398     \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that locks the study.
399 */
400     void SetStudyLock(in string theLockerID) raises(StudyInvalidReference);
401
402 /*! \brief Indicate if the Study is locked
403
404    Returns True if the Study was marked locked.
405 */
406     boolean IsStudyLocked() raises(StudyInvalidReference);
407
408 /*! \brief  Mark this Study as being unlocked by the given locker.
409
410      The lock status can be checked by method IsStudyLocked
411     \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that unlocks the study.
412 */
413     void UnLockStudy(in string theLockerID) raises(StudyInvalidReference);
414
415 /*! \brief  Get the list of IDs of the Study's lockers.
416 */
417     ListOfStrings GetLockerID() raises(StudyInvalidReference);
418
419 /*! \brief  Create real variable with Name theVarName and value theValue
420
421     (or set if variable value into theValue already exists)
422     \param theVarName is a name of the variable
423     \param theVarName is a value of the variable.
424 */
425     void SetReal( in string theVarName, in double theValue ) raises(StudyInvalidReference);
426
427 /*! \brief  Create integer variable with Name theVarName and value theValue
428
429     (or set if variable value into theValue already exists)
430     \param theVarName is a name of the variable
431     \param theVarName is a value of the variable.
432 */
433     void SetInteger( in string theVarName, in long theValue ) raises(StudyInvalidReference);
434 /*! \brief  Create boolean variable with Name theVarName and value theValue
435
436     (or set if variable value into theValue already exists)
437     \param theVarName is a name of the variable
438     \param theVarName is a value of the variable.
439 */
440     void SetBoolean( in string theVarName, in boolean theValue ) raises(StudyInvalidReference);
441
442 /*! \brief  Create string variable with Name theVarName and value theValue
443
444     (or set if variable value into theValue already exists)
445     \param theVarName is a name of the variable
446     \param theVarName is a value of the variable.
447 */
448     void SetString( in string theVarName, in string theValue ) raises(StudyInvalidReference);
449
450 /*! \brief  Set current value as double for string variable
451 */
452     void SetStringAsDouble( in string theVarName, in double theValue ) raises(StudyInvalidReference);
453
454 /*! \brief Get value of a real variable
455
456     \param theVarName is a name of the variable.
457 */
458     double GetReal( in string theVarName ) raises(StudyInvalidReference);
459
460 /*! \brief Get value of an integer variable
461
462     \param theVarName is a name of the variable.
463 */
464     long GetInteger( in string theVarName ) raises(StudyInvalidReference);
465
466 /*! \brief Get value of a boolean variable
467
468     \param theVarName is a name of the variable.
469 */
470     boolean GetBoolean( in string theVarName ) raises(StudyInvalidReference);
471
472 /*! \brief Get value of a string variable
473
474     \param theVarName is a name of the variable.
475 */
476     string GetString( in string theVarName ) raises(StudyInvalidReference);
477
478
479 /*! \brief Indicate if a variable is real
480
481     Return true if variable is real otherwise return false.
482     \param theVarName is a name of the variable.
483 */
484     boolean IsReal( in string theVarName ) raises(StudyInvalidReference);
485
486 /*! \brief Indicate if a variable is integer
487
488     Return true if variable is integer otherwise return false.
489     \param theVarName is a name of the variable.
490 */
491     boolean IsInteger( in string theVarName ) raises(StudyInvalidReference);
492
493 /*! \brief Indicate if a variable is boolean
494
495     Return true if variable is boolean otherwise return false.
496     \param theVarName is a name of the variable.
497 */
498     boolean IsBoolean( in string theVarName ) raises(StudyInvalidReference);
499
500 /*! \brief Indicate if a variable is string
501
502     Return true if variable is string otherwise return false.
503     \param theVarName is a name of the variable.
504 */
505     boolean IsString( in string theVarName ) raises(StudyInvalidReference);
506
507 /*! \brief Indicate if a variable exists in the study
508
509     Return true if variable exists in the study,
510     otherwise return false.
511     \param theVarName is a name of the variable.
512 */
513     boolean IsVariable( in string theVarName ) raises(StudyInvalidReference);
514
515 /*! \brief Get names of all variables from the study.
516 */
517     ListOfStrings GetVariableNames() raises(StudyInvalidReference);
518
519 /*! \brief Remove a variable
520
521    Remove variable with the specified name from the study with substitution of its value.
522
523    \param theVarName Name of the variable.
524    \return Status of operation.
525 */
526     boolean RemoveVariable( in string theVarName ) raises(StudyInvalidReference);
527
528 /*! \brief Rename a variable
529
530    Rename variable with the specified name within the study.
531
532    \param theVarName Name of the variable.
533    \param theNewVarName New name for the variable.
534    \return Status of operation.
535 */
536     boolean RenameVariable( in string theVarName, in string theNewVarName ) raises(StudyInvalidReference);
537
538 /*! \brief Indicate whether variable is used
539
540    Check that variable is used in the study.
541
542    \param theVarName Name of the variable.
543    \return Variable usage.
544 */
545     boolean IsVariableUsed( in string theVarName ) raises(StudyInvalidReference);
546
547 /*! \brief Parse variables used for object creation
548
549    \param string with variables, separated by special symbol.
550    \return Variables list.
551 */
552     ListOfListOfStrings ParseVariables( in string theVars ) raises(StudyInvalidReference);
553
554 /*!
555      Attach an observer to the Study
556
557     \param theObserver observer being attached
558     \param modify when \c true, observer receives any object's modification events;
559            otherwise observer receives object's creation events only
560 */
561      void attach(in SALOMEDS::Observer theObserver, in boolean modify);
562 /*!
563      Detach an observer from the Study
564
565     \param theObserver observer to be detached
566 */
567      void detach(in SALOMEDS::Observer theObserver);
568   };
569
570   //==========================================================================
571 /*! \brief %Study Builder Interface
572
573   The purpose of the Builder is to add and/or remove objects and attributes.
574   A %StudyBuilder is linked to a %Study. A
575   command management is provided for the undo/redo functionalities.
576   \note
577   <BR><VAR>The Tag</VAR> of an item in %SALOME application is a symbolic description of
578   item's position in the tree-type structure of the browser. In general it has the following
579   form: <TT>0:2:1:1</TT>
580 */
581   //==========================================================================
582
583   interface StudyBuilder
584   {
585 /*! \brief %LockProtection Exception
586
587     This exception is raised while attempting to modify a locked %study.
588 */
589     exception LockProtection {};
590 /*! \brief Creation of a new %SComponent.
591
592    Creates a new %SComponent
593    \param ComponentDataType    Data type of the %SComponent which will be created.
594
595 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
596
597 */
598     SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
599 /*! \brief Definition of the instance to the %SComponent
600
601     Defines the instance to the %SComponent.
602 */
603     void       DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection);
604
605 /*! \brief Deletion of a %SComponent
606
607   Removes a %SComponent.
608 */
609     void       RemoveComponent(in SComponent aComponent) raises(LockProtection);
610
611 /*! \brief Creation of a new %SObject
612
613    Creates a new %SObject under a definite father %SObject.
614
615    \param theFatherObject The father %SObject under which this one should be created.
616    \return New %SObject
617
618 <em>See \ref example18 for an example of this method usage in batchmode of %SALOME application.</em>
619
620 */
621
622     SObject NewObject      (in SObject theFatherObject) raises(LockProtection);
623
624 /*! \brief Creation of a new %SObject with a definite %tag
625
626    Creates a new %SObject with a definite %tag.
627
628    \param atag Long value corresponding to the tag of the new %SObject.
629    \return New %SObject
630
631 */
632     SObject NewObjectToTag (in SObject theFatherObject, in long atag) raises(LockProtection);
633 /*! \brief Deletion of the %SObject
634
635   Removes a %SObject from the %StudyBuilder.
636
637   \param anObject The %SObject to be deleted.
638 */
639     void    RemoveObject   (in SObject anObject) raises(LockProtection);
640 /*! \brief Deletion of the %SObject with all his child objects.
641
642   Removes the %SObject with all his child objects.
643
644   \param anObject The %SObject to be deleted with all child objects.
645 */
646     void    RemoveObjectWithChildren(in SObject anObject) raises(LockProtection);
647
648 /*!
649    Loads a %SComponent.
650
651 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
652
653 */
654     void  LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
655 /*!
656    Loads a %SObject.
657
658    \param sco %SObject to be loaded.
659 */
660     void  Load (in SObject sco);
661
662 /*! \brief Looking for or creating an attribute assigned to the %SObject
663
664     Allows to find or create an attribute of a specific type which is assigned to the object.
665     \param anObject        The %SObject corresponding to the attribute which is looked for.
666     \param aTypeOfAttribute     Type of the attribute.
667
668 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
669 */
670
671     GenericAttribute FindOrCreateAttribute(in  SObject        anObject,
672                                          in  string         aTypeOfAttribute) raises(LockProtection);
673
674 /*! \brief Looking for an attribute assigned to a %SObject
675
676     Allows to find an attribute of a specific type which is assigned to the object.
677     \param anObject        The %SObject corresponding to the attribute which is looked for.
678     \param aTypeOfAttribute     Type of the attribute.
679     \param anAttribute       Where the attribute is placed if it's found.
680     \return True if it finds an attribute.
681  */
682
683     boolean FindAttribute(in  SObject        anObject,
684                                  out GenericAttribute anAttribute,
685                                  in  string         aTypeOfAttribute);
686 /*! \brief Deleting the attribute assigned to the %SObject
687
688     Removes the attribute of a specific type which is assigned to the object.
689     \param anObject        The %SObject corresponding to the attribute.
690     \param aTypeOfAttribute     Type of the attribute.
691
692 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
693 */
694     void RemoveAttribute(in  SObject        anObject,
695                          in  string         aTypeOfAttribute) raises(LockProtection);
696 /*!
697     Adds a reference between %anObject and %theReferencedObject.
698     \param anObject The %SObject which will get a reference
699     \param theReferencedObject The %SObject having a reference
700 */
701
702     void Addreference(in SObject anObject,
703                       in SObject theReferencedObject) ;
704
705 /*!
706     Removes a reference from %anObject to another object.
707     \param anObject The %SObject which contains a reference
708 */
709
710     void RemoveReference(in SObject anObject) ;
711
712 /*!
713    Adds a directory in the %Study.
714    \param theName String parameter defining the name of the directory.
715
716 <em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
717
718 */
719     void AddDirectory(in string theName) raises(LockProtection);
720
721 /*! \brief Identification of the %SObject's substructure.
722
723       Identification of the %SObject's substructure by GUID.
724
725
726       \param anObject The %SObject which will be identified
727       \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
728 */
729
730      void SetGUID(in SObject anObject, in string theGUID) raises(LockProtection);
731 /*!
732 Searches for a definite %SObject with a definite GUID and returns True if it finds it.
733
734 \param anObject A definite %SObject which will be identified
735 \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
736 */
737      boolean IsGUID(in SObject anObject, in string theGUID);
738
739 /*! \brief Creation of a new command
740
741    Creates a new command which can contain several different actions.
742
743 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
744
745 */
746     void NewCommand(); // command management
747 /*! \brief Execution of the command
748
749    Commits all actions declared within this command.
750
751    \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
752
753 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
754
755 */
756     void CommitCommand() raises(LockProtection); // command management
757 /*!
758     Returns True if at this moment there is a command under execution.
759 */
760     boolean HasOpenCommand();
761 /*! \brief Cancelation of the command
762
763     Cancels all actions declared within the command.
764
765 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
766 */
767     void AbortCommand(); // command management
768 /*! \brief Undolimit
769
770     The number of actions which can be undone
771 */
772     attribute long  UndoLimit;
773 /*! \brief Undo method
774
775     Cancels all actions of the last command.
776
777     \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
778
779 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
780
781 */
782     void Undo() raises (LockProtection);
783 /*! \brief Redo method
784
785     Redoes all actions of the last command.
786
787 \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
788
789 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
790
791 */
792     void Redo() raises (LockProtection);
793 /*!
794     Returns True if at this moment there are any actions which can be canceled.
795
796 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
797
798 */
799     boolean GetAvailableUndos();
800 /*!
801     Returns True if at this moment there are any actions which can be redone.
802
803 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
804
805 */
806     boolean GetAvailableRedos();
807 /*!
808     Puts name attribute with the given string value to the given %SObject
809
810     \param theSO Existing SObject to set name attribute.
811     \param theValue The value to be set to the name attribute.
812 */
813     void SetName(in SObject theSO, in string theValue) raises (LockProtection);
814
815 /*!
816     Puts comment attribute with the given string value to the given %SObject
817
818     \param theSO Existing SObject to set comment attribute.
819     \param theValue The value to be set to the comment attribute.
820 */
821     void SetComment(in SObject theSO, in string theValue) raises (LockProtection);
822
823 /*!
824     Puts IOR attribute with the given string value to the given %SObject
825
826     \param theSO Existing SObject to set IOR attribute.
827     \param theValue The value to be set to the IOR attribute.
828 */
829     void SetIOR(in SObject theSO, in string theValue) raises (LockProtection);
830   };
831
832   //==========================================================================
833 /*! \brief %Study Manager interface
834
835     The purpose of the Manager is to manipulate the %Studies. You will find in this
836     interface the methods to create, open,
837     close, and save a %Study. Since a %SALOME session is multi-document, you will
838     also find the methods allowing to navigate
839     through the collection of studies present in a session.
840 */
841   //==========================================================================
842
843   interface StudyManager
844   {
845 /*!
846     Determines whether the server has already been loaded or not.
847 */
848     void ping();
849
850     void Shutdown();
851
852 /*!
853     Returns the PID of the server
854 */
855     long getPID();
856
857 /*!
858     Shutdown the StudyManager process.
859 */
860     oneway void ShutdownWithExit();
861
862 /*! \brief Creation of a new study
863
864      Creates a new study with a definite name.
865
866      \param study_name String parameter defining the name of the study
867
868 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
869
870 */
871     Study NewStudy(in string study_name) raises (SALOME::SALOME_Exception);
872
873 /*! \brief Open a study
874
875      Reads and activates the structure of the study %Objects.
876      \param aStudyUrl The path to the study
877     \warning This method doesn't activate the corba objects. Only a component can do it.
878
879 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
880 */
881     Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception);
882
883 /*! \brief Closing the study
884
885     Closes a study.
886 */
887     void  Close(in Study aStudy);
888 /*! \brief Saving the study in a HDF file (or files).
889
890     Saves a study.
891
892     \param theMultiFile If this parameter is True the study will be saved in several files.
893
894 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
895
896 */
897     boolean  Save(in  Study aStudy, in boolean theMultiFile);
898 /*! \brief Saving a study in a ASCII file (or files).
899
900     Saves a study in an ASCII format file (or files).
901     \param theMultiFile If this parameter is True the study will be saved in several files.
902 */
903     boolean  SaveASCII(in  Study aStudy, in boolean theMultiFile);
904 /*! \brief Saving the study in a specified HDF file (or files).
905
906     Saves the study in a specified file (or files).
907     \param aUrl The path to the definite file in whcih the study will be saved
908     \param aStudy The study which will be saved
909     \param theMultiFile If this parameter is True the study will be saved in several files.
910
911 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
912 */
913     boolean  SaveAs(in URL   aUrl, // if the file already exists
914                 in Study aStudy,
915                 in boolean theMultiFile); // overwrite (as option)
916 /*! \brief Saving the study in a specified ASCII file (or files).
917
918     Saves the study in a specified ASCII file (or files).
919
920     \param aUrl The path to the definite file in whcih the study will be saved
921     \param aStudy The study which will be saved
922     \param theMultiFile If this parameter is True the study will be saved in several files.
923 */
924     boolean  SaveAsASCII(in URL   aUrl, // if the file already exists
925                       in Study aStudy,
926                       in boolean theMultiFile); // overwrite (as option)
927
928
929 /*! \brief List of open studies.
930
931 Gets the list of open studies
932
933     \return A list of open studies in the current session.
934 */
935     ListOfOpenStudies GetOpenStudies();
936
937 /*! \brief Getting a particular %Study picked by name
938
939     Activates a particular %Study
940     among the session collection picking it by name.
941     \param aStudyName The name of the study
942 */
943     Study GetStudyByName  (in string aStudyName);
944
945 /*! \brief Getting a particular %Study picked by ID
946
947     Activates a particular %Study
948     among the session collection picking it by ID.
949     \param aStudyID The ID of the study
950 */
951     Study GetStudyByID  (in short aStudyID);
952
953     // copy/paste methods
954
955 /*!
956     Returns True, if the given %SObject can be copied to the clipboard.
957 */
958     boolean CanCopy(in SObject theObject);
959 /*!
960     Returns True, if the given %SObject is copied to the clipboard.
961     \param theObject The %SObject which will be copied
962 */
963     boolean Copy(in SObject theObject);
964 /*!
965     Returns True, if the object from the clipboard can be pasted to the given %SObject.
966     \param theObject The %SObject stored in the clipboard.
967 */
968     boolean CanPaste(in SObject theObject);
969 /*!
970     Returns the %SObject in which the object from the clipboard was pasted to.
971     \param theObject The %SObject which will be pasted
972     \exception SALOMEDS::StudyBuilder::LockProtection This exception is raised, when trying to paste
973     an object into a study, which is protected for modifications.
974 */
975     SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection);
976
977 /*! \brief Object conversion.
978
979     Converts an object into IOR.
980     \return    IOR
981 */
982     string ConvertObjectToIOR(in Object theObject);
983 /*! \brief Object conversion.
984
985     Converts IOR into an object.
986     \return    An object
987 */
988     Object ConvertIORToObject(in string theIOR);
989
990 /*!
991     Private method, returns an implementation of this StudyManager.
992    \param theHostname is a hostname of the caller
993    \param thePID is a process ID of the caller
994    \param isLocal is set True if the StudyManager is launched locally with the caller
995 */
996     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
997
998   };
999
1000
1001   //==========================================================================
1002 /*! \brief %SObject interface
1003
1004    The objects in the %study are built by the %StudyBuilder. The %SObject interface
1005    provides methods for elementary inquiries, like getting an object %ID or its attribuites.
1006  \note
1007
1008    <BR><VAR>Tag</VAR> of an item in %SALOME application is an integer value uniquely defining an item
1009    in the tree-type data structure.
1010    <BR><VAR>ID</VAR> of an item is a description of item's position in the tree-type data structure.
1011    ID is a list of tags and it has the following form: <TT>0:2:1:1</TT>.
1012 */
1013   //==========================================================================
1014
1015   interface SObject : SALOME::GenericObj
1016   {
1017 /*! Name of the %SObject
1018 */
1019     attribute string Name; // equivalent to setName() & getName()
1020
1021 /*! Returns true if the %SObject does not belong to any %Study
1022 */
1023     boolean IsNull();
1024
1025 /*! Gets an object %ID
1026    \return ID of the %SObject.
1027 */
1028     ID GetID();
1029
1030 /*!  Acquisition of the father %Component of the %SObject
1031   \return The father %Component of the %SObject.
1032 */
1033     SComponent GetFatherComponent();
1034
1035 /*! Acquisition of the father %SObject of the %SObject
1036    \return the father %SObject of the given %SObject.
1037 */
1038     SObject    GetFather();
1039
1040 /*! Gets the %tag of a %SObject
1041     \return the %tag of a %SObject.
1042 */
1043     short      Tag();
1044
1045 /*! Returns a tag of the last child %SObject (if any) of this %SObject.
1046     Returns zero if this %SObject has no children.
1047 */
1048     short      GetLastChildTag();
1049
1050 /*! Gets the depth of a %SObject
1051     \return the depth of a %SObject.
1052 */
1053     short      Depth();
1054
1055 /*! Looks for subobjects of a given %SObject.
1056     \param atag Tag of the given %SObject
1057     \return True if it finds a subobject of the %SObject with a definite tag as well as the required subobject.
1058 */
1059     boolean FindSubObject (in long atag, out SObject obj);
1060
1061 /*! Looks for attributes of a given %SObject
1062    \param aTypeOfAttribute String value defining the type of the required attribute of the given %SObject.
1063    \return True if it finds an attribute of a definite type of the given %SObject as well as the discovered attribute.
1064
1065 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
1066 */
1067     boolean FindAttribute(out GenericAttribute anAttribute,
1068                                   in  string         aTypeOfAttribute);
1069
1070 /*! Looks for a %SObject which the given %SObject refers to.
1071     \return The object which the given %SObject refers to as well as True if it finds
1072     this object.
1073 */
1074     boolean ReferencedObject(out SObject obj); // A REVOIR
1075
1076 /*! Gets all attributes of a given %SObject
1077     \return The list of all attributes of the given %SObject.
1078
1079 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
1080
1081 */
1082     ListOfAttributes     GetAllAttributes();
1083
1084 /*! Gets the study of a given %SObject.
1085     \return The study containing the given %SObject.
1086 */
1087     Study GetStudy();
1088
1089 /*! Gets the CORBA object by its own IOR attribute.
1090     Returns nil, if can't.
1091     \return The CORBA object of the %SObject.
1092 */
1093     Object GetObject();
1094
1095 /*!
1096     Returns the name attribute value of this SObject.
1097     Returns empty string if there is no name attribute.
1098 */
1099     string GetName();
1100
1101 /*!
1102     Returns the comment attribute value of this SObject.
1103     Returns empty string if there is no comment attribute.
1104 */
1105     string GetComment();
1106
1107 /*!
1108     Returns the IOR attribute value of this SObject.
1109     Returns empty string if there is no IOR attribute.
1110 */
1111     string GetIOR();
1112
1113 /*!
1114     Set an attribute value (of type string)
1115    \param name the name of the attribute
1116    \param value the value of the attribute
1117 */
1118     void SetAttrString(in string name, in string value);
1119
1120 /*!
1121     Private method, returns an implementation of this SObject.
1122    \param theHostname is a hostname of the caller
1123    \param thePID is a process ID of the caller
1124    \param isLocal is set True if the SObject is launched locally with the caller
1125 */
1126     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
1127   };
1128
1129
1130   //==========================================================================
1131 /*! \brief %Generic attribute interface
1132
1133    %Generic attribute is a base interface for all attributes which can be assigned to the SObjects created in the study.
1134 */
1135   //==========================================================================
1136   interface GenericAttribute : SALOME::GenericObj
1137   {
1138 /*! \brief Exception locking all changes
1139
1140     This exception locks all modifications in attributes.
1141 */
1142     exception LockProtection {};
1143 /*! \brief Method CheckLocked
1144
1145    Checks whether the %Study is protected for modifications.
1146
1147    \note <BR>This exception is raised only outside a transaction.
1148 */
1149     void CheckLocked() raises (LockProtection);
1150
1151     //! Get Type
1152     string Type();
1153
1154     //! Get the class type
1155     string GetClassType();
1156
1157     //! Get SObject
1158     SObject GetSObject();
1159
1160   //!  Private method, returns an implementation of this GenericAttribute.
1161 /*!
1162    \param theHostname is a hostname of the caller
1163    \param thePID is a process ID of the caller
1164    \param isLocal is set True if the GenericAttribute is launched locally with the caller
1165 */
1166     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
1167   };
1168
1169
1170
1171   //==========================================================================
1172 /*! \brief %SComponent interface
1173
1174    The %SComponent interface establishes in the study a permanent assocition to the Components integrated into %SALOME platform.
1175    The %SComponent interface is a specialization of the %SObject interface.
1176    It inherits the most of its methods from the %SObject interface.
1177 */
1178   //==========================================================================
1179   interface SComponent : SObject
1180   {
1181 /*! \brief Gets the data type of the given %SComponent
1182
1183     \return The data type of this %SComponent.
1184 */
1185     string  ComponentDataType();
1186 /*! \brief Gets the IOR of the given component
1187
1188   \return True (if there is an instance of the given component) and its IOR.
1189 */
1190     boolean ComponentIOR (out ID theID); //returns True if there is an instance
1191                                          //In this case ID identifies this one
1192   };
1193
1194
1195   //==========================================================================
1196 /*! \brief %SComponentIterator interface
1197
1198   This interface contains the methods allowing to iterate over all components in the list.
1199   The search is started from the first %SComponent in the list.
1200 */
1201   //==========================================================================
1202   interface SComponentIterator : SALOME::GenericObj
1203   {
1204 /*!
1205 \brief Activates the %SComponentIterator.
1206 */
1207     void Init();
1208 /*!  \brief Method More
1209
1210    \return True if there is one more %SComponent in the list.
1211 */
1212     boolean More();
1213 /*!
1214 \brief Moves the iterator to the next %SComponent in the list.
1215 */
1216     void Next();
1217 /*!
1218     \brief Returns the %SComponent corresponding to the current %SComponent found by the iterator.
1219
1220 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
1221
1222 */
1223     SComponent Value();
1224   };
1225
1226   //==========================================================================
1227 /*! \brief %ChildIterator interface
1228
1229     This interface contains methods which allow to iterate over all child
1230     levels.
1231 */
1232   //==========================================================================
1233   interface ChildIterator : SALOME::GenericObj
1234   {
1235 /*!
1236
1237 \brief Activates the %ChildIterator.
1238 */
1239     void Init();
1240 /*!
1241
1242 \brief Activates the %ChildIterator for all child levels.
1243
1244 \param allLevels If this boolean parameter is True, the %ChildIterator will be activated for all child levels.
1245 */
1246     void InitEx(in boolean allLevels);
1247 /*! \brief Method More
1248
1249    \return True if there is one more %ChildIterator in the list.
1250 */
1251     boolean More();
1252 /*!
1253     \brief Passes the iterator to the next level.
1254 */
1255     void Next();
1256 /*!
1257     \brief Returns the %SObject corresponding to the current object found by the iterator.
1258 */
1259     SObject Value();
1260   };
1261
1262   //==========================================================================
1263   //==========================================================================
1264 /*! \brief Interface of the %UseCaseIterator.
1265
1266    This interface contains a set of methods used for iteration over the objects in the use case.
1267 */
1268   interface UseCaseIterator : SALOME::GenericObj
1269   {
1270 /*!
1271 Activates the %UseCaseIterator.
1272 \param allLevels If the value of this parameter is True the Iterator is activated for all subobjects.
1273 */
1274     void Init(in boolean allLevels);
1275 /*! Method More
1276
1277     \return True if the %UseCaseIterator finds one more object.
1278 */
1279     boolean More();
1280 /*!
1281     Passes the iterator to the next object.
1282 */
1283     void Next();
1284 /*!
1285     Returns the %SObject corresponding to the current object found by the Iterator.
1286 */
1287     SObject Value();
1288   };
1289
1290   //==========================================================================
1291   //==========================================================================
1292 /*! \brief Interface of the %UseCaseBuilder
1293
1294    Use case in the study represents a user-managed subtree, containing all or some of the objects which exist in the study.
1295    The %UseCaseBuilder interface contains a set of methods used for management of the use case in the study.
1296 */
1297   interface UseCaseBuilder : SALOME::GenericObj
1298   {
1299 /*!
1300    Adds to the use case an object as a child of the current object of the use case.
1301
1302    \param theObject The added %SObject.
1303    \return True if this %SObject has been added in the use case.
1304 */
1305     boolean Append(in SObject theObject);
1306 /*!
1307    Removes an object from the use case.
1308
1309    \param theObject The deleted %SObject
1310    \return True if this %SObject has been deleted from the use case.
1311 */
1312     boolean Remove(in SObject theObject);
1313 /*!
1314    Adds a child object <VAR>theObject</VAR> to the given father <VAR>theFather</VAR> object in the use case.
1315 */
1316     boolean AppendTo(in SObject theFather, in SObject theObject);
1317 /*!
1318     Inserts in the use case the object <VAR>theFirst</VAR> before the object <VAR>theNext</VAR>.
1319 */
1320     boolean InsertBefore(in SObject theFirst, in SObject theNext);
1321 /*!
1322     Sets the current object of the use case.
1323 */
1324     boolean SetCurrentObject(in SObject theObject);
1325 /*!
1326     Makes the root object to be the current object of the use case.
1327 */
1328     boolean SetRootCurrent();
1329 /*!
1330    Returns True if the given object <VAR>theObject</VAR> of the use case has child objects.
1331 */
1332     boolean HasChildren(in SObject theObject);
1333 /*!
1334    Returns True if children of the given object <VAR>theObject</VAR> of the use case tree were sorted successfully.
1335 */
1336     boolean SortChildren(in SObject theObject, in boolean theAscendingOrder);
1337 /*!
1338    Gets father object of the given object <VAR>theObject</VAR> in the use cases tree.
1339 */
1340     SObject GetFather(in SObject theObject);
1341 /*!
1342    Sets the name of the use case.
1343 */
1344     boolean SetName(in string theName);
1345 /*!
1346    Gets the name of the use case.
1347 */
1348     string GetName();
1349 /*!
1350    Returns True if the given object <VAR>theObject</VAR> represents a use case.
1351 */
1352     boolean IsUseCase(in SObject theObject);
1353 /*!
1354    Returns True if the given object <VAR>theObject</VAR> is included in the use cases tree on any level.
1355 */
1356     boolean IsUseCaseNode(in SObject theObject);
1357 /*!
1358     Gets the current object of the use case.
1359 */
1360     SObject GetCurrentObject();
1361 /*!
1362     Creates a new use case in the use case browser.
1363 */
1364     SObject AddUseCase(in string theName);
1365 /*!
1366     Returns the %UseCaseIterator for the given object <VAR>theObject</VAR> in the use case.
1367 */
1368     UseCaseIterator GetUseCaseIterator(in SObject theObject);
1369   };
1370   //==========================================================================
1371 /*! \brief %Driver interface
1372
1373 This class represents a common tool for all components integrated into SALOME application, that allows them to communicate with the study. It contains a set of methods which
1374 can be called by any component and which provide the following functionality:
1375 <ul>
1376     <li> publishing in the study of the objects created by a definite component
1377     <li> saving/loading of the data created by a definite component. These methods are called by the StudyManager when loading/saving a study containing the data created by a definite component.
1378     <li> transforming of the transient references into persistant references (or vice versa) of the SObjects when saving (or loading) a study
1379     <li> copy/paste common functionality. These methods can be called by any component in order to copy/paste its object created in the study
1380 </ul>
1381
1382 */
1383   //==========================================================================
1384   interface Driver
1385   {
1386
1387     /*! \brief Saving the data produced by a definite component.
1388
1389         This method is called by the StudyManager when saving a study.
1390        \param theComponent    %SComponent corresponding to this Component
1391        \param theURL  The path to the file in which the data will be saved.
1392        \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
1393        \return A byte stream TMPFile that contains all saved data
1394
1395 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
1396
1397      */
1398
1399
1400     TMPFile Save(in SComponent theComponent, in string theURL, in boolean isMultiFile);
1401
1402 /*! \brief Saving the data in ASCII format produced by a definite component.
1403
1404         This method is called by the StudyManager when saving a study in ASCII format.
1405        \param theComponent    %SComponent corresponding to this Component
1406        \param theURL  The path to the file in which the data will be saved.
1407        \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
1408        \return A byte stream TMPFile that will contain all saved data
1409
1410 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
1411
1412      */
1413     TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile);
1414
1415     /*! \brief Loading the data.
1416
1417        This method is called by the StudyManager when opening a study.
1418        \param theComponent      %SComponent corresponding to this Component
1419        \param theStream   The file which contains all data saved by the component on Save method
1420        \param isMultiFile  If the value of this boolean parameter is True, the data will be loaded from several files
1421
1422      */
1423
1424     boolean Load(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
1425
1426     /*! \brief Loading the data from files in ASCII format.
1427
1428        This method is called by the StudyManager when opening a study.
1429        \param theComponent      %SComponent corresponding to this Component
1430        \param theStream   The file which contains all data saved by the component on Save method
1431        \param isMultiFile  If the value of this boolean parameter is True, the data will be loaded from several files
1432
1433      */
1434
1435     boolean LoadASCII(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
1436
1437     /*! \brief Closing of the study
1438
1439       This method Close is called by the StudyManager when closing a study.
1440     \param aSComponent The according %SComponent
1441      */
1442
1443     void Close (in SComponent aSComponent);
1444     //void Close ( in string  aIORSComponent);
1445
1446     /*! Gets the type of the data
1447
1448         \return The type of data produced by the Component in the study.
1449      */
1450
1451      string ComponentDataType();
1452
1453     // Driver Transient -> persistent called for each object in study
1454 /*!
1455    Transforms IOR of a given %SObject into PersistentID. It is called for each
1456    object in the %study.
1457 \note <br> In %SALOME the objects which are present in an active study are identified by an IOR, when this
1458 study is saved these references are transformed into persintent IDs.
1459
1460    \param theSObject The given %SObject.
1461    \param IORString The IOR of the given %SObject.
1462    \param isMultiFile If this parameter is True the study containing the given %SObject is stored in several files.
1463    \param isASCII If this parameter is True the study containing the given %SObject is stored in ASCII format.
1464
1465    \return The persistent ID of the given %SObject
1466
1467 */
1468     string IORToLocalPersistentID (in SObject theSObject,
1469                                    in string IORString,
1470                                    in boolean isMultiFile,
1471                                    in boolean isASCII);
1472 /*!
1473   Transforms PersistentID into IOR of the object. It is called for each
1474    object in the %study.
1475
1476    \note <br> In %SALOME the objects which are present in an saved study (file) are identified by a persistent ID, when this
1477 study is open, these references are transformed into persintent IORs.
1478
1479    \param theSObject The given %SObject.
1480    \param IORString The IOR of the given %SObject.
1481    \param isMultiFile If this parameter is True the study containing the given %SObject is stored in several files.
1482    \param isASCII If this parameter is True the study containing the given %SObject is stored in ASCII format.
1483
1484    \return The IOR of the given %SObject
1485
1486 */
1487     string LocalPersistentIDToIOR (in SObject theSObject,
1488                                    in string aLocalPersistentID,
1489                                    in boolean isMultiFile,
1490                                    in boolean isASCII)
1491       raises (SALOME::SALOME_Exception);
1492
1493     // Publishing in the study
1494 /*! Publishing in the study
1495
1496     \return True if the given %Component can publish a definite object with a given IOR in the %study.
1497     \param theIOR The IOR of a definite object
1498 */
1499     boolean CanPublishInStudy(in Object theIOR) raises (SALOME::SALOME_Exception);
1500 /*! \brief Publishing in the study
1501
1502    Publishes the given object in the %study, using the algorithm of this component.
1503     \param theStudy     The %study in which the object is published
1504     \param theSObject     If this parameter is null the object is published for the first time. Otherwise
1505     this parameter should contain a reference to the object published earlier
1506     \param theObject      The object which is published
1507     \param theName      The name of the published object. If this parameter is empty, the name is generated
1508     automatically by the component.
1509
1510     \return The published %SObject.
1511 */
1512     SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName);
1513
1514     // copy/paste methods
1515
1516 /*!
1517     Returns True, if the given %SObject can be copied to the clipboard.
1518
1519     \param theObject The given %SObject which should be copied.
1520 */
1521     boolean CanCopy(in SObject theObject);
1522 /*!
1523     Returns the object %ID and the %TMPFile of the object from the given %SObject.
1524 */
1525     TMPFile CopyFrom(in SObject theObject, out long theObjectID);
1526 /*!
1527     Returns True, if the component can paste the object with given %ID of the component with name <VAR>theComponentName</VAR>.
1528 */
1529     boolean CanPaste(in string theComponentName, in long theObjectID);
1530 /*!
1531     Returns the %SObject of the pasted object.
1532 */
1533     SObject PasteInto(in TMPFile theStream, in long theObjectID, in SObject theObject);
1534
1535   };
1536 };
1537
1538 #endif