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