]> SALOME platform Git repositories - modules/kernel.git/blob - idl/SALOMEDS.idl
Salome HOME
1. SALOME::GenericObj : Destroy() -> UnRegister()
[modules/kernel.git] / idl / SALOMEDS.idl
1 //  Copyright (C) 2007-2010  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     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, in string theBaseName, in boolean isPublished);
356
357 /*! \brief  Get an AttributeParameter used to store common parameters for given %theSavePoint.
358
359     \param theID identifies a common parameters set (Example: "Interface Applicative")
360     \param theSavePoint is number of a set of parameters as there can be several sets
361 */
362     AttributeParameter GetCommonParameters(in string theID, in long theSavePoint);
363
364 /*! \brief  Get an AttributeParameter used to store parameters for given %theModuleName.
365
366     \param theID identifies a common parameters set (Example: "Interface Applicative")
367     \param theModuleName is a name of the module (Example: "Geometry")
368     \param theSavePoint is number of a set of parameters as there can be several sets
369 */
370     AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint);
371
372
373 /*! \brief Get a default Python script to restore visual parameters for given %theModuleName.
374
375     \param theID identifies a common parameters set (Example: "Interface Applicative")
376     \param theModuleName is a name of the module (Example: "Geometry")
377 */
378     string GetDefaultScript(in string theID, in string theModuleName);
379
380 /*!
381     Private method, returns an implementation of this Study.
382    \param theHostname is a hostname of the caller
383    \param thePID is a process ID of the caller
384    \param isLocal is set True if the Study is launched locally with the caller
385 */
386     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
387
388
389 /*! \brief  Mark this Study as being locked by the given locker. 
390
391     The lock status can be checked by method IsStudyLocked
392     \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that locks the study.
393 */
394     void SetStudyLock(in string theLockerID);
395
396 /*! \brief Indicate if the Study is locked
397
398    Returns True if the Study was marked locked. 
399 */
400     boolean IsStudyLocked();
401
402 /*! \brief  Mark this Study as being unlocked by the given locker. 
403
404      The lock status can be checked by method IsStudyLocked
405     \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that unlocks the study.
406 */
407     void UnLockStudy(in string theLockerID);
408
409 /*! \brief  Get the list of IDs of the Study's lockers. 
410 */
411     ListOfStrings GetLockerID();
412
413 /*! \brief  Create real variable with Name theVarName and value theValue 
414
415     (or set if variable value into theValue already exists)
416     \param theVarName is a name of the variable
417     \param theVarName is a value of the variable.
418 */
419     void SetReal( in string theVarName, in double theValue );
420
421 /*! \brief  Create integer variable with Name theVarName and value theValue 
422
423     (or set if variable value into theValue already exists)
424     \param theVarName is a name of the variable
425     \param theVarName is a value of the variable.
426 */
427     void SetInteger( in string theVarName, in long theValue );
428 /*! \brief  Create boolean variable with Name theVarName and value theValue 
429
430     (or set if variable value into theValue already exists)
431     \param theVarName is a name of the variable
432     \param theVarName is a value of the variable.
433 */
434     void SetBoolean( in string theVarName, in boolean theValue );
435
436 /*! \brief  Create string variable with Name theVarName and value theValue 
437
438     (or set if variable value into theValue already exists)
439     \param theVarName is a name of the variable
440     \param theVarName is a value of the variable.
441 */
442     void SetString( in string theVarName, in string theValue );
443
444 /*! \brief  Set current value as double for string variable
445 */
446     void SetStringAsDouble( in string theVarName, in double theValue );
447
448 /*! \brief Get value of a real variable
449
450     \param theVarName is a name of the variable.
451 */
452     double GetReal( in string theVarName );
453
454 /*! \brief Get value of an integer variable
455
456     \param theVarName is a name of the variable.
457 */
458     long GetInteger( in string theVarName );
459
460 /*! \brief Get value of a boolean variable
461
462     \param theVarName is a name of the variable.
463 */
464     boolean GetBoolean( in string theVarName );
465
466 /*! \brief Get value of a string variable
467
468     \param theVarName is a name of the variable.
469 */
470     string GetString( in string theVarName );
471     
472
473 /*! \brief Indicate if a variable is real
474
475     Return true if variable is real otherwise return false.
476     \param theVarName is a name of the variable.
477 */
478     boolean IsReal( in string theVarName );
479
480 /*! \brief Indicate if a variable is integer
481
482     Return true if variable is integer otherwise return false.
483     \param theVarName is a name of the variable.
484 */
485     boolean IsInteger( in string theVarName );
486
487 /*! \brief Indicate if a variable is boolean
488
489     Return true if variable is boolean otherwise return false.
490     \param theVarName is a name of the variable.
491 */
492     boolean IsBoolean( in string theVarName );
493
494 /*! \brief Indicate if a variable is string
495
496     Return true if variable is string otherwise return false.
497     \param theVarName is a name of the variable.
498 */
499     boolean IsString( in string theVarName );
500
501 /*! \brief Indicate if a variable exists in the study
502
503     Return true if variable exists in the study,
504     otherwise return false.
505     \param theVarName is a name of the variable.
506 */
507     boolean IsVariable( in string theVarName );
508
509 /*! \brief Get names of all variables from the study.
510 */
511     ListOfStrings GetVariableNames();
512
513 /*! \brief Remove a variable
514
515    Remove variable with the specified name from the study with substitution of its value.
516
517    \param theVarName Name of the variable.
518    \return Status of operation.
519 */
520     boolean RemoveVariable( in string theVarName );
521
522 /*! \brief Rename a variable
523
524    Rename variable with the specified name within the study.
525
526    \param theVarName Name of the variable.
527    \param theNewVarName New name for the variable.
528    \return Status of operation.
529 */
530     boolean RenameVariable( in string theVarName, in string theNewVarName );
531
532 /*! \brief Indicate whether variable is used
533
534    Check that variable is used in the study.
535
536    \param theVarName Name of the variable.
537    \return Variable usage.
538 */
539     boolean IsVariableUsed( in string theVarName );
540
541 /*! \brief Parse variables used for object creation
542
543    \param string with variables, separated by special symbol. 
544    \return Variables list.
545 */
546     ListOfListOfStrings ParseVariables( in string theVars );
547
548 /*!
549      Attach an observer to the Study
550
551     \param theObserver
552 */
553      void attach(in SALOMEDS::Observer theObserver, in boolean modify);   
554   };
555
556   //==========================================================================
557 /*! \brief %Study Builder Interface
558
559   The purpose of the Builder is to add and/or remove objects and attributes.
560   A %StudyBuilder is linked to a %Study. A
561   command management is provided for the undo/redo functionalities.
562   \note
563   <BR><VAR>The Tag</VAR> of an item in %SALOME application is a symbolic description of
564   item's position in the tree-type structure of the browser. In general it has the following
565   form: <TT>0:2:1:1</TT>
566 */
567   //==========================================================================
568
569   interface StudyBuilder
570   {
571 /*! \brief %LockProtection Exception
572
573     This exception is raised while attempting to modify a locked %study.
574 */
575     exception LockProtection {};
576 /*! \brief Creation of a new %SComponent.
577
578    Creates a new %SComponent
579    \param ComponentDataType    Data type of the %SComponent which will be created.
580
581 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
582
583 */
584     SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
585 /*! \brief Definition of the instance to the %SComponent
586
587     Defines the instance to the %SComponent.
588 */
589     void       DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection);
590         
591 /*! \brief Deletion of a %SComponent
592
593   Removes a %SComponent.
594 */
595     void       RemoveComponent(in SComponent aComponent) raises(LockProtection);
596
597 /*! \brief Creation of a new %SObject
598
599    Creates a new %SObject under a definite father %SObject.
600
601    \param theFatherObject The father %SObject under which this one should be created.
602    \return New %SObject
603
604 <em>See \ref example18 for an example of this method usage in batchmode of %SALOME application.</em>
605
606 */
607
608     SObject NewObject      (in SObject theFatherObject) raises(LockProtection);
609
610 /*! \brief Creation of a new %SObject with a definite %tag
611
612    Creates a new %SObject with a definite %tag.
613
614    \param atag Long value corresponding to the tag of the new %SObject.
615    \return New %SObject
616
617 */
618     SObject NewObjectToTag (in SObject theFatherObject, in long atag) raises(LockProtection);
619 /*! \brief Deletion of the %SObject
620
621   Removes a %SObject from the %StudyBuilder.
622
623   \param anObject The %SObject to be deleted.
624 */
625     void    RemoveObject   (in SObject anObject) raises(LockProtection);
626 /*! \brief Deletion of the %SObject with all his child objects.
627
628   Removes the %SObject with all his child objects.
629
630   \param anObject The %SObject to be deleted with all child objects.
631 */
632     void    RemoveObjectWithChildren(in SObject anObject) raises(LockProtection);
633
634 /*!
635    Loads a %SComponent.
636
637 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
638
639 */
640     void  LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
641 /*!
642    Loads a %SObject.
643
644    \param sco %SObject to be loaded.
645 */
646     void  Load (in SObject sco);
647
648 /*! \brief Looking for or creating an attribute assigned to the %SObject
649
650     Allows to find or create 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
654 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
655 */
656
657     GenericAttribute FindOrCreateAttribute(in  SObject        anObject,
658                                          in  string         aTypeOfAttribute) raises(LockProtection);
659
660 /*! \brief Looking for an attribute assigned to a %SObject
661
662     Allows to find an attribute of a specific type which is assigned to the object.
663     \param anObject        The %SObject corresponding to the attribute which is looked for.
664     \param aTypeOfAttribute     Type of the attribute.
665     \param anAttribute       Where the attribute is placed if it's found.
666     \return True if it finds an attribute.
667  */
668
669     boolean FindAttribute(in  SObject        anObject,
670                                  out GenericAttribute anAttribute,
671                                  in  string         aTypeOfAttribute);
672 /*! \brief Deleting the attribute assigned to the %SObject
673
674     Removes the attribute of a specific type which is assigned to the object.
675     \param anObject        The %SObject corresponding to the attribute.
676     \param aTypeOfAttribute     Type of the attribute.
677
678 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
679 */
680     void RemoveAttribute(in  SObject        anObject,
681                          in  string         aTypeOfAttribute) raises(LockProtection);
682 /*!
683     Adds a reference between %anObject and %theReferencedObject.
684     \param anObject The %SObject which will get a reference
685     \param theReferencedObject The %SObject having a reference
686 */
687
688     void Addreference(in SObject anObject,
689                       in SObject theReferencedObject) ;
690
691 /*!
692     Removes a reference from %anObject to another object.
693     \param anObject The %SObject which contains a reference
694 */
695
696     void RemoveReference(in SObject anObject) ;
697
698 /*!
699    Adds a directory in the %Study.
700    \param theName String parameter defining the name of the directory.
701
702 <em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
703
704 */
705     void AddDirectory(in string theName) raises(LockProtection);
706
707 /*! \brief Identification of the %SObject's substructure.
708
709       Identification of the %SObject's substructure by GUID.
710
711
712       \param anObject The %SObject which will be identified
713       \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
714 */
715
716      void SetGUID(in SObject anObject, in string theGUID) raises(LockProtection);
717 /*!
718 Searches for a definite %SObject with a definite GUID and returns True if it finds it.
719
720 \param anObject A definite %SObject which will be identified
721 \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
722 */
723      boolean IsGUID(in SObject anObject, in string theGUID);
724
725 /*! \brief Creation of a new command
726
727    Creates a new command which can contain several different actions.
728    
729 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
730
731 */
732     void NewCommand(); // command management
733 /*! \brief Execution of the command
734
735    Commits all actions declared within this command.
736
737    \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
738
739 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
740
741 */
742     void CommitCommand() raises(LockProtection); // command management
743 /*!
744     Returns True if at this moment there is a command under execution.
745 */
746     boolean HasOpenCommand();
747 /*! \brief Cancelation of the command
748
749     Cancels all actions declared within the command.
750     
751 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
752 */
753     void AbortCommand(); // command management
754 /*! \brief Undolimit
755
756     The number of actions which can be undone
757 */
758     attribute long  UndoLimit;
759 /*! \brief Undo method
760
761     Cancels all actions of the last command.
762
763     \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
764
765 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
766
767 */
768     void Undo() raises (LockProtection);
769 /*! \brief Redo method
770
771     Redoes all actions of the last command.
772
773 \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
774
775 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
776
777 */
778     void Redo() raises (LockProtection);
779 /*!
780     Returns True if at this moment there are any actions which can be canceled.
781     
782 <em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
783
784 */
785     boolean GetAvailableUndos();
786 /*!
787     Returns True if at this moment there are any actions which can be redone.
788
789 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
790
791 */
792     boolean GetAvailableRedos();
793 /*!
794     Puts name attribute with the given string value to the given %SObject
795
796     \param theSO Existing SObject to set name attribute.
797     \param theValue The value to be set to the name attribute.
798 */
799     void SetName(in SObject theSO, in string theValue) raises (LockProtection);
800
801 /*!
802     Puts comment attribute with the given string value to the given %SObject
803
804     \param theSO Existing SObject to set comment attribute.
805     \param theValue The value to be set to the comment attribute.
806 */
807     void SetComment(in SObject theSO, in string theValue) raises (LockProtection);
808
809 /*!
810     Puts IOR attribute with the given string value to the given %SObject
811
812     \param theSO Existing SObject to set IOR attribute.
813     \param theValue The value to be set to the IOR attribute.
814 */
815     void SetIOR(in SObject theSO, in string theValue) raises (LockProtection);
816   };
817
818   //==========================================================================
819 /*! \brief %Study Manager interface
820
821     The purpose of the Manager is to manipulate the %Studies. You will find in this
822     interface the methods to create, open,
823     close, and save a %Study. Since a %SALOME session is multi-document, you will
824     also find the methods allowing to navigate
825     through the collection of studies present in a session.
826 */
827   //==========================================================================
828
829   interface StudyManager
830   {
831 /*!
832     Determines whether the server has already been loaded or not.
833 */
834     void ping();
835
836     void Shutdown();
837
838 /*!
839     Returns the PID of the server
840 */
841     long getPID();
842
843 /*!
844     Shutdown the StudyManager process.
845 */    
846     oneway void ShutdownWithExit();
847
848 /*! \brief Creation of a new study
849
850      Creates a new study with a definite name.
851
852      \param study_name String parameter defining the name of the study
853
854 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
855
856 */
857     Study NewStudy(in string study_name);
858
859 /*! \brief Open a study
860
861      Reads and activates the structure of the study %Objects.
862      \param aStudyUrl The path to the study
863     \warning This method doesn't activate the corba objects. Only a component can do it.
864
865 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
866 */
867     Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception);
868
869 /*! \brief Closing the study
870
871     Closes a study.
872 */
873     void  Close(in Study aStudy);
874 /*! \brief Saving the study in a HDF file (or files).
875
876     Saves a study.
877
878     \param theMultiFile If this parameter is True the study will be saved in several files.
879
880 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
881
882 */
883     boolean  Save(in  Study aStudy, in boolean theMultiFile);
884 /*! \brief Saving a study in a ASCII file (or files).
885
886     Saves a study in an ASCII format file (or files).
887     \param theMultiFile If this parameter is True the study will be saved in several files.
888 */
889     boolean  SaveASCII(in  Study aStudy, in boolean theMultiFile);
890 /*! \brief Saving the study in a specified HDF file (or files).
891
892     Saves the study in a specified file (or files).
893     \param aUrl The path to the definite file in whcih the study will be saved
894     \param aStudy The study which will be saved
895     \param theMultiFile If this parameter is True the study will be saved in several files.
896
897 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
898 */
899     boolean  SaveAs(in URL   aUrl, // if the file already exists
900                 in Study aStudy,
901                 in boolean theMultiFile); // overwrite (as option)
902 /*! \brief Saving the study in a specified ASCII file (or files).
903
904     Saves the study in a specified ASCII file (or files).
905
906     \param aUrl The path to the definite file in whcih the study will be saved
907     \param aStudy The study which will be saved
908     \param theMultiFile If this parameter is True the study will be saved in several files.
909 */
910     boolean  SaveAsASCII(in URL   aUrl, // if the file already exists
911                       in Study aStudy,
912                       in boolean theMultiFile); // overwrite (as option)
913
914
915 /*! \brief List of open studies.
916
917 Gets the list of open studies
918
919     \return A list of open studies in the current session.
920 */
921     ListOfOpenStudies GetOpenStudies();
922
923 /*! \brief Getting a particular %Study picked by name
924
925     Activates a particular %Study
926     among the session collection picking it by name.
927     \param aStudyName The name of the study
928 */
929     Study GetStudyByName  (in string aStudyName);
930
931 /*! \brief Getting a particular %Study picked by ID
932
933     Activates a particular %Study
934     among the session collection picking it by ID.
935     \param aStudyID The ID of the study
936 */
937     Study GetStudyByID  (in short aStudyID);
938
939     // copy/paste methods
940
941 /*!
942     Returns True, if the given %SObject can be copied to the clipboard.
943 */
944     boolean CanCopy(in SObject theObject);
945 /*!
946     Returns True, if the given %SObject is copied to the clipboard.
947     \param theObject The %SObject which will be copied
948 */
949     boolean Copy(in SObject theObject);
950 /*!
951     Returns True, if the object from the clipboard can be pasted to the given %SObject.
952     \param theObject The %SObject stored in the clipboard.
953 */
954     boolean CanPaste(in SObject theObject);
955 /*!
956     Returns the %SObject in which the object from the clipboard was pasted to.
957     \param theObject The %SObject which will be pasted
958     \exception SALOMEDS::StudyBuilder::LockProtection This exception is raised, when trying to paste
959     an object into a study, which is protected for modifications.
960 */
961     SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection);
962
963 /*! \brief Object conversion.
964
965     Converts an object into IOR.
966     \return    IOR
967 */
968     string ConvertObjectToIOR(in Object theObject);
969 /*! \brief Object conversion.
970             
971     Converts IOR into an object.
972     \return    An object
973 */
974     Object ConvertIORToObject(in string theIOR); 
975
976 /*!
977     Private method, returns an implementation of this StudyManager.
978    \param theHostname is a hostname of the caller
979    \param thePID is a process ID of the caller
980    \param isLocal is set True if the StudyManager is launched locally with the caller
981 */
982     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal); 
983
984
985   };
986
987
988   //==========================================================================
989 /*! \brief %SObject interface
990
991    The objects in the %study are built by the %StudyBuilder. The %SObject interface
992    provides methods for elementary inquiries, like getting an object %ID or its attribuites.
993  \note
994  
995    <BR><VAR>Tag</VAR> of an item in %SALOME application is an integer value uniquely defining an item
996    in the tree-type data structure.
997    <BR><VAR>ID</VAR> of an item is a description of item's position in the tree-type data structure.
998    ID is a list of tags and it has the following form: <TT>0:2:1:1</TT>.
999 */
1000   //==========================================================================
1001
1002   interface SObject : SALOME::GenericObj
1003   {
1004 /*! Name of the %SObject
1005 */
1006     attribute string Name; // equivalent to setName() & getName()
1007
1008 /*! Returns true if the %SObject does not belong to any %Study
1009 */
1010     boolean IsNull();
1011
1012 /*! Gets an object %ID
1013
1014    \return ID of the %SObject.
1015 */
1016     ID GetID();
1017 /*!  Acquisition of the father %Component of the %SObject
1018
1019   \return The father %Component of the %SObject.
1020 */
1021     SComponent GetFatherComponent();
1022 /*! Acquisition of the father %SObject of the %SObject
1023
1024    \return the father %SObject of the given %SObject.
1025 */
1026     SObject    GetFather();
1027 /*! Gets the %tag of a %SObject
1028
1029     \return the %tag of a %SObject.
1030 */
1031     short      Tag();
1032 /*! Gets the depth of a %SObject
1033
1034     \return the depth of a %SObject.
1035 */
1036     short      Depth();
1037 /*! Looks for subobjects of a given %SObject.
1038
1039     \param atag Tag of the given %SObject
1040     \return True if it finds a subobject of the %SObject with a definite tag as well as the required subobject.
1041 */
1042
1043     boolean FindSubObject (in long atag, out SObject obj);
1044 /*! Looks for attributes of a given %SObject
1045
1046    \param aTypeOfAttribute String value defining the type of the required attribute of the given %SObject.
1047    \return True if it finds an attribute of a definite type of the given %SObject as well as the discovered attribute.
1048
1049 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
1050 */
1051     boolean FindAttribute(out GenericAttribute anAttribute,
1052                                   in  string         aTypeOfAttribute);
1053 /*! Looks for a %SObject which the given %SObject refers to.
1054
1055     \return The object which the given %SObject refers to as well as True if it finds
1056     this object.
1057 */
1058     boolean ReferencedObject(out SObject obj); // A REVOIR
1059 /*! Gets all attributes of a given %SObject
1060
1061     \return The list of all attributes of the given %SObject.
1062
1063 <em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
1064
1065 */
1066     ListOfAttributes     GetAllAttributes();
1067 /*! Gets the study of a given %SObject.
1068
1069     \return The study containing the given %SObject.
1070 */
1071     Study GetStudy();
1072
1073 /*! Gets the CORBA object by its own IOR attribute.
1074     Returns nil, if can't.
1075
1076     \return The CORBA object of the %SObject.
1077 */
1078     Object GetObject();
1079
1080 /*!
1081     Returns the name attribute value of this SObject.
1082     Returns empty string if there is no name attribute.
1083 */
1084     string GetName();
1085
1086 /*!
1087     Returns the comment attribute value of this SObject.
1088     Returns empty string if there is no comment attribute.
1089 */
1090     string GetComment();
1091
1092 /*!
1093     Returns the IOR attribute value of this SObject.
1094     Returns empty string if there is no IOR attribute.
1095 */
1096     string GetIOR();
1097
1098 /*!
1099     Set an attribute value (of type string)
1100    \param name the name of the attribute
1101    \param value the value of the attribute
1102 */
1103     void SetAttrString(in string name, in string value);
1104
1105 /*!
1106     Private method, returns an implementation of this SObject.
1107    \param theHostname is a hostname of the caller
1108    \param thePID is a process ID of the caller
1109    \param isLocal is set True if the SObject is launched locally with the caller
1110 */
1111     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
1112   };
1113
1114
1115   //==========================================================================
1116 /*! \brief %Generic attribute interface
1117
1118    %Generic attribute is a base interface for all attributes which can be assigned to the SObjects created in the study.
1119 */
1120   //==========================================================================
1121   interface GenericAttribute : SALOME::GenericObj
1122   {
1123 /*! \brief Exception locking all changes
1124
1125     This exception locks all modifications in attributes.
1126 */
1127     exception LockProtection {};
1128 /*! \brief Method CheckLocked
1129
1130    Checks whether the %Study is protected for modifications.
1131
1132    \note <BR>This exception is raised only outside a transaction.
1133 */
1134     void CheckLocked() raises (LockProtection);
1135
1136     //! Get Type
1137     string Type();
1138
1139     //! Get the class type
1140     string GetClassType();      
1141         
1142     //! Get SObject
1143     SObject GetSObject();
1144
1145   //!  Private method, returns an implementation of this GenericAttribute.
1146 /*!
1147    \param theHostname is a hostname of the caller
1148    \param thePID is a process ID of the caller
1149    \param isLocal is set True if the GenericAttribute is launched locally with the caller
1150 */
1151     long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
1152   };
1153
1154
1155
1156   //==========================================================================
1157 /*! \brief %SComponent interface
1158
1159    The %SComponent interface establishes in the study a permanent assocition to the Components integrated into %SALOME platform.
1160    The %SComponent interface is a specialization of the %SObject interface.
1161    It inherits the most of its methods from the %SObject interface.
1162 */
1163   //==========================================================================
1164   interface SComponent : SObject
1165   {
1166 /*! \brief Gets the data type of the given %SComponent
1167
1168     \return The data type of this %SComponent.
1169 */
1170     string  ComponentDataType();
1171 /*! \brief Gets the IOR of the given component
1172
1173   \return True (if there is an instance of the given component) and its IOR.
1174 */
1175     boolean ComponentIOR (out ID theID); //returns True if there is an instance
1176                                          //In this case ID identifies this one
1177   };
1178
1179
1180   //==========================================================================
1181 /*! \brief %SComponentIterator interface
1182
1183   This interface contains the methods allowing to iterate over all components in the list.
1184   The search is started from the first %SComponent in the list.
1185 */
1186   //==========================================================================
1187   interface SComponentIterator : SALOME::GenericObj
1188   {
1189 /*!
1190 \brief Activates the %SComponentIterator.
1191 */
1192     void Init();
1193 /*!  \brief Method More
1194
1195    \return True if there is one more %SComponent in the list.
1196 */
1197     boolean More();
1198 /*!
1199 \brief Moves the iterator to the next %SComponent in the list.
1200 */
1201     void Next();
1202 /*!
1203     \brief Returns the %SComponent corresponding to the current %SComponent found by the iterator.
1204
1205 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
1206
1207 */
1208     SComponent Value();
1209   };
1210
1211   //==========================================================================
1212 /*! \brief %ChildIterator interface
1213
1214     This interface contains methods which allow to iterate over all child
1215     levels.
1216 */
1217   //==========================================================================
1218   interface ChildIterator : SALOME::GenericObj
1219   {
1220 /*!
1221
1222 \brief Activates the %ChildIterator.
1223 */
1224     void Init();
1225 /*!
1226
1227 \brief Activates the %ChildIterator for all child levels.
1228
1229 \param allLevels If this boolean parameter is True, the %ChildIterator will be activated for all child levels.
1230 */
1231     void InitEx(in boolean allLevels);
1232 /*! \brief Method More
1233
1234    \return True if there is one more %ChildIterator in the list.
1235 */
1236     boolean More();
1237 /*!
1238     \brief Passes the iterator to the next level.
1239 */
1240     void Next();
1241 /*!
1242     \brief Returns the %SObject corresponding to the current object found by the iterator.
1243 */
1244     SObject Value();
1245   };
1246
1247   //==========================================================================
1248   //==========================================================================
1249 /*! \brief Interface of the %UseCaseIterator.
1250
1251    This interface contains a set of methods used for iteration over the objects in the use case.
1252 */
1253   interface UseCaseIterator : SALOME::GenericObj
1254   {
1255 /*!
1256 Activates the %UseCaseIterator.
1257 \param allLevels If the value of this parameter is True the Iterator is activated for all subobjects.
1258 */
1259     void Init(in boolean allLevels);
1260 /*! Method More
1261
1262     \return True if the %UseCaseIterator finds one more object.
1263 */
1264     boolean More();
1265 /*!
1266     Passes the iterator to the next object.
1267 */
1268     void Next();
1269 /*!
1270     Returns the %SObject corresponding to the current object found by the Iterator.
1271 */
1272     SObject Value();
1273   };
1274
1275   //==========================================================================
1276   //==========================================================================
1277 /*! \brief Interface of the %UseCaseBuilder
1278
1279    Use case in the study represents a user-managed subtree, containing all or some of the objects which exist in the study.
1280    The %UseCaseBuilder interface contains a set of methods used for management of the use case in the study.
1281 */
1282   interface UseCaseBuilder : SALOME::GenericObj
1283   {
1284 /*!
1285    Adds to the use case an object as a child of the current object of the use case.
1286
1287    \param theObject The added %SObject.
1288    \return True if this %SObject has been added in the use case.
1289 */
1290     boolean Append(in SObject theObject);
1291 /*!
1292    Removes an object from the use case.
1293
1294    \param theObject The deleted %SObject
1295    \return True if this %SObject has been deleted from the use case.
1296 */
1297     boolean Remove(in SObject theObject);
1298 /*!
1299    Adds a child object <VAR>theObject</VAR> to the given father <VAR>theFather</VAR> object in the use case.
1300 */
1301     boolean AppendTo(in SObject theFather, in SObject theObject);
1302 /*!
1303     Inserts in the use case the object <VAR>theFirst</VAR> before the object <VAR>theNext</VAR>.
1304 */
1305     boolean InsertBefore(in SObject theFirst, in SObject theNext);
1306 /*!
1307     Sets the current object of the use case.
1308 */
1309     boolean SetCurrentObject(in SObject theObject);
1310 /*!
1311     Makes the root object to be the current object of the use case.
1312 */
1313     boolean SetRootCurrent();
1314 /*!
1315    Returns True if the given object <VAR>theObject</VAR> of the use case has child objects.
1316 */
1317     boolean HasChildren(in SObject theObject);
1318 /*!
1319    Sets the name of the use case.
1320 */
1321     boolean SetName(in string theName);
1322 /*!
1323    Gets the name of the use case.
1324 */
1325     string GetName();
1326 /*!
1327    Returns True if the given object <VAR>theObject</VAR> represents a use case.
1328 */
1329     boolean IsUseCase(in SObject theObject);
1330 /*!
1331     Gets the current object of the use case.
1332 */
1333     SObject GetCurrentObject();
1334 /*!
1335     Creates a new use case in the use case browser.
1336 */
1337     SObject AddUseCase(in string theName);
1338 /*!
1339     Returns the %UseCaseIterator for the given object <VAR>theObject</VAR> in the use case.
1340 */
1341     UseCaseIterator GetUseCaseIterator(in SObject theObject);
1342   };
1343   //==========================================================================
1344 /*! \brief %Driver interface
1345
1346 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
1347 can be called by any component and which provide the following functionality:
1348 <ul>
1349     <li> publishing in the study of the objects created by a definite component
1350     <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.
1351     <li> transforming of the transient references into persistant references (or vice versa) of the SObjects when saving (or loading) a study
1352     <li> copy/paste common functionality. These methods can be called by any component in order to copy/paste its object created in the study
1353 </ul>
1354
1355 */
1356   //==========================================================================
1357   interface Driver
1358   {
1359
1360     /*! \brief Saving the data produced by a definite component.
1361
1362         This method is called by the StudyManager when saving a study.
1363        \param theComponent    %SComponent corresponding to this Component
1364        \param theURL  The path to the file in which the data will be saved.
1365        \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
1366        \return A byte stream TMPFile that contains all saved data
1367
1368 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
1369
1370      */
1371
1372
1373     TMPFile Save(in SComponent theComponent, in string theURL, in boolean isMultiFile);
1374
1375 /*! \brief Saving the data in ASCII format produced by a definite component.
1376
1377         This method is called by the StudyManager when saving a study in ASCII format.
1378        \param theComponent    %SComponent corresponding to this Component
1379        \param theURL  The path to the file in which the data will be saved.
1380        \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
1381        \return A byte stream TMPFile that will contain all saved data
1382
1383 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
1384
1385      */
1386     TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile);
1387
1388     /*! \brief Loading the data.
1389
1390        This method is called by the StudyManager when opening a study.
1391        \param theComponent      %SComponent corresponding to this Component
1392        \param theStream   The file which contains all data saved by the component on Save method
1393        \param isMultiFile  If the value of this boolean parameter is True, the data will be loaded from several files
1394
1395      */
1396
1397     boolean Load(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
1398
1399     /*! \brief Loading the data from files in ASCII format.
1400
1401        This method is called by the StudyManager when opening a study.
1402        \param theComponent      %SComponent corresponding to this Component
1403        \param theStream   The file which contains all data saved by the component on Save method
1404        \param isMultiFile  If the value of this boolean parameter is True, the data will be loaded from several files
1405
1406      */
1407
1408     boolean LoadASCII(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
1409
1410     /*! \brief Closing of the study
1411
1412       This method Close is called by the StudyManager when closing a study.
1413     \param aSComponent The according %SComponent
1414      */
1415
1416     void Close (in SComponent aSComponent);
1417     //void Close ( in string  aIORSComponent);
1418
1419     /*! Gets the type of the data
1420
1421         \return The type of data produced by the Component in the study.
1422      */
1423
1424      string ComponentDataType();
1425
1426     // Driver Transient -> persistent called for each object in study
1427 /*!
1428    Transforms IOR of a given %SObject into PersistentID. It is called for each
1429    object in the %study.
1430 \note <br> In %SALOME the objects which are present in an active study are identified by an IOR, when this
1431 study is saved these references are transformed into persintent IDs.
1432
1433    \param theSObject The given %SObject.
1434    \param IORString The IOR of the given %SObject.
1435    \param isMultiFile If this parameter is True the study containing the given %SObject is stored in several files.
1436    \param isASCII If this parameter is True the study containing the given %SObject is stored in ASCII format.
1437
1438    \return The persistent ID of the given %SObject
1439
1440 */
1441     string IORToLocalPersistentID (in SObject theSObject,
1442                                    in string IORString,
1443                                    in boolean isMultiFile,
1444                                    in boolean isASCII);
1445 /*!
1446   Transforms PersistentID into IOR of the object. It is called for each
1447    object in the %study.
1448
1449    \note <br> In %SALOME the objects which are present in an saved study (file) are identified by a persistent ID, when this
1450 study is open, these references are transformed into persintent IORs.
1451
1452    \param theSObject The given %SObject.
1453    \param IORString The IOR of the given %SObject.
1454    \param isMultiFile If this parameter is True the study containing the given %SObject is stored in several files.
1455    \param isASCII If this parameter is True the study containing the given %SObject is stored in ASCII format.
1456
1457    \return The IOR of the given %SObject
1458
1459 */
1460     string LocalPersistentIDToIOR (in SObject theSObject,
1461                                    in string aLocalPersistentID,
1462                                    in boolean isMultiFile,
1463                                    in boolean isASCII)
1464       raises (SALOME::SALOME_Exception);
1465
1466     // Publishing in the study
1467 /*! Publishing in the study
1468
1469     \return True if the given %Component can publish a definite object with a given IOR in the %study.
1470     \param theIOR The IOR of a definite object
1471 */
1472     boolean CanPublishInStudy(in Object theIOR) raises (SALOME::SALOME_Exception);
1473 /*! \brief Publishing in the study
1474
1475    Publishes the given object in the %study, using the algorithm of this component.
1476     \param theStudy     The %study in which the object is published
1477     \param theSObject     If this parameter is null the object is published for the first time. Otherwise
1478     this parameter should contain a reference to the object published earlier
1479     \param theObject      The object which is published
1480     \param theName      The name of the published object. If this parameter is empty, the name is generated
1481     automatically by the component.
1482
1483     \return The published %SObject.
1484 */
1485     SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName);
1486
1487     // copy/paste methods
1488
1489 /*!
1490     Returns True, if the given %SObject can be copied to the clipboard.
1491
1492     \param theObject The given %SObject which should be copied.
1493 */
1494     boolean CanCopy(in SObject theObject);
1495 /*!
1496     Returns the object %ID and the %TMPFile of the object from the given %SObject.
1497 */
1498     TMPFile CopyFrom(in SObject theObject, out long theObjectID);
1499 /*!
1500     Returns True, if the component can paste the object with given %ID of the component with name <VAR>theComponentName</VAR>.
1501 */
1502     boolean CanPaste(in string theComponentName, in long theObjectID);
1503 /*!
1504     Returns the %SObject of the pasted object.
1505 */
1506     SObject PasteInto(in TMPFile theStream, in long theObjectID, in SObject theObject);
1507
1508   };
1509 };
1510
1511 #endif