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