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