Version: 6.5.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
SALOMEDS.idl
Go to the documentation of this file.
1 // Copyright (C) 2007-2012 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 //
30 #ifndef _SALOMEDS_IDL_
31 #define _SALOMEDS_IDL_
32 
33 #include "SALOME_Exception.idl"
34 #include "SALOME_GenericObj.idl"
35 
40 module SALOMEDS
41 {
44  typedef string URL;
45 
48  typedef string ID;
49 
52  typedef string PersistentReference;
53 
56  typedef string SalomeReference;
57 
63  typedef sequence<string> ListOfOpenStudies;
65  typedef sequence<string> ListOfFileNames;
67  typedef sequence<string> ListOfDates ;
69  typedef sequence<string> ListOfStrings ;
71  typedef sequence<ListOfStrings> ListOfListOfStrings ;
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 
103  typedef sequence<GenericAttribute> ListOfAttributes;
104 
106  exception NotImplemented {};
107 
108 
109  //===========================================================================
125  interface Study
126  {
127 
129  exception StudyInvalidContext {};
131  exception StudyInvalidComponent {};
133  exception StudyInvalidDirectory {};
135  exception StudyNameAlreadyUsed {};
139  exception StudyNameError {};
141  exception StudyCommentError {};
142 
147  attribute string Name; // equivalent to setName() & getName()
152  attribute short StudyId;
154  typedef sequence<SObject> ListOfSObject;
156  PersistentReference GetPersistentReference();
158  SalomeReference GetTransientReference();
159 
164  boolean IsEmpty();
173  SComponent FindComponent (in string aComponentName);
174 
177  SComponent FindComponentID(in ID aComponentID);
185  SObject FindObject (in string anObjectName);
191  SObject FindObjectID (in ID aObjectID);
197  SObject CreateObjectID (in ID aObjectID);
203  SObject FindObjectIOR (in ID aObjectIOR);
209  ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName);
215  SObject FindObjectByPath(in string thePath);
218  string GetObjectPath(in Object theObject);
219 
226  void SetContext(in string thePath);
231  string GetContext();
236  ListOfStrings GetObjectNames(in string theContext);
241  ListOfStrings GetDirectoryNames(in string theContext);
246  ListOfStrings GetFileNames(in string theContext);
251  ListOfStrings GetComponentNames(in string theContext);
257  ChildIterator NewChildIterator(in SObject aSO);
258 
263  SComponentIterator NewComponentIterator();
264 
271  StudyBuilder NewBuilder() ;
276  void UpdateIORLabelMap(in string anIOR, in string anEntry);
277 
285  AttributeStudyProperties GetProperties();
288  attribute boolean IsSaved;
293  boolean IsModified();
294 
297  void Modified();
298 
301  attribute string URL;
302 
307  ListOfSObject FindDependances(in SObject anObject);
308 
313  string GetLastModificationDate();
319  ListOfDates GetModificationsDate();
325  string ConvertObjectToIOR(in Object theObject);
331  Object ConvertIORToObject(in string theIOR);
332 
335  UseCaseBuilder GetUseCaseBuilder();
336 
339  void Close();
340 
343  void EnableUseCaseAutoFilling(in boolean isEnabled);
344 
348  void AddPostponed(in string theIOR);
349 
350  void AddCreatedPostponed(in string theIOR);
351 
352  void RemovePostponed(in long theUndoLimit);
353 
354  void UndoPostponed(in long theWay);
355 
356  boolean DumpStudy(in string thePath,
357  in string theBaseName,
358  in boolean isPublished,
359  in boolean isMultiFile);
360 
366  AttributeParameter GetCommonParameters(in string theID, in long theSavePoint);
367 
374  AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint);
375 
376 
382  string GetDefaultScript(in string theID, in string theModuleName);
383 
390  long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
391 
392 
398  void SetStudyLock(in string theLockerID);
399 
404  boolean IsStudyLocked();
405 
411  void UnLockStudy(in string theLockerID);
412 
415  ListOfStrings GetLockerID();
416 
423  void SetReal( in string theVarName, in double theValue );
424 
431  void SetInteger( in string theVarName, in long theValue );
438  void SetBoolean( in string theVarName, in boolean theValue );
439 
446  void SetString( in string theVarName, in string theValue );
447 
450  void SetStringAsDouble( in string theVarName, in double theValue );
451 
456  double GetReal( in string theVarName );
457 
462  long GetInteger( in string theVarName );
463 
468  boolean GetBoolean( in string theVarName );
469 
474  string GetString( in string theVarName );
475 
476 
482  boolean IsReal( in string theVarName );
483 
489  boolean IsInteger( in string theVarName );
490 
496  boolean IsBoolean( in string theVarName );
497 
503  boolean IsString( in string theVarName );
504 
511  boolean IsVariable( in string theVarName );
512 
515  ListOfStrings GetVariableNames();
516 
524  boolean RemoveVariable( in string theVarName );
525 
534  boolean RenameVariable( in string theVarName, in string theNewVarName );
535 
543  boolean IsVariableUsed( in string theVarName );
544 
550  ListOfListOfStrings ParseVariables( in string theVars );
551 
557  void attach(in SALOMEDS::Observer theObserver, in boolean modify);
558  };
559 
560  //==========================================================================
571  //==========================================================================
572 
573  interface StudyBuilder
574  {
579  exception LockProtection {};
588  SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
593  void DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection);
594 
599  void RemoveComponent(in SComponent aComponent) raises(LockProtection);
600 
612  SObject NewObject (in SObject theFatherObject) raises(LockProtection);
613 
622  SObject NewObjectToTag (in SObject theFatherObject, in long atag) raises(LockProtection);
629  void RemoveObject (in SObject anObject) raises(LockProtection);
636  void RemoveObjectWithChildren(in SObject anObject) raises(LockProtection);
637 
644  void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
650  void Load (in SObject sco);
651 
661  GenericAttribute FindOrCreateAttribute(in SObject anObject,
662  in string aTypeOfAttribute) raises(LockProtection);
663 
673  boolean FindAttribute(in SObject anObject,
674  out GenericAttribute anAttribute,
675  in string aTypeOfAttribute);
684  void RemoveAttribute(in SObject anObject,
685  in string aTypeOfAttribute) raises(LockProtection);
692  void Addreference(in SObject anObject,
693  in SObject theReferencedObject) ;
694 
700  void RemoveReference(in SObject anObject) ;
701 
709  void AddDirectory(in string theName) raises(LockProtection);
710 
720  void SetGUID(in SObject anObject, in string theGUID) raises(LockProtection);
727  boolean IsGUID(in SObject anObject, in string theGUID);
728 
736  void NewCommand(); // command management
746  void CommitCommand() raises(LockProtection); // command management
750  boolean HasOpenCommand();
757  void AbortCommand(); // command management
762  attribute long UndoLimit;
772  void Undo() raises (LockProtection);
782  void Redo() raises (LockProtection);
789  boolean GetAvailableUndos();
796  boolean GetAvailableRedos();
803  void SetName(in SObject theSO, in string theValue) raises (LockProtection);
804 
811  void SetComment(in SObject theSO, in string theValue) raises (LockProtection);
812 
819  void SetIOR(in SObject theSO, in string theValue) raises (LockProtection);
820  };
821 
822  //==========================================================================
831  //==========================================================================
832 
833  interface StudyManager
834  {
838  void ping();
839 
840  void Shutdown();
841 
845  long getPID();
846 
850  oneway void ShutdownWithExit();
851 
861  Study NewStudy(in string study_name);
862 
871  Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception);
872 
877  void Close(in Study aStudy);
887  boolean Save(in Study aStudy, in boolean theMultiFile);
893  boolean SaveASCII(in Study aStudy, in boolean theMultiFile);
903  boolean SaveAs(in URL aUrl, // if the file already exists
904  in Study aStudy,
905  in boolean theMultiFile); // overwrite (as option)
914  boolean SaveAsASCII(in URL aUrl, // if the file already exists
915  in Study aStudy,
916  in boolean theMultiFile); // overwrite (as option)
917 
918 
925  ListOfOpenStudies GetOpenStudies();
926 
933  Study GetStudyByName (in string aStudyName);
934 
941  Study GetStudyByID (in short aStudyID);
942 
943  // copy/paste methods
944 
948  boolean CanCopy(in SObject theObject);
953  boolean Copy(in SObject theObject);
958  boolean CanPaste(in SObject theObject);
965  SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection);
966 
972  string ConvertObjectToIOR(in Object theObject);
978  Object ConvertIORToObject(in string theIOR);
979 
986  long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
987 
988 
989  };
990 
991 
992  //==========================================================================
1004  //==========================================================================
1005 
1007  {
1010  attribute string Name; // equivalent to setName() & getName()
1011 
1014  boolean IsNull();
1015 
1020  ID GetID();
1025  SComponent GetFatherComponent();
1030  SObject GetFather();
1035  short Tag();
1040  short Depth();
1047  boolean FindSubObject (in long atag, out SObject obj);
1055  boolean FindAttribute(out GenericAttribute anAttribute,
1056  in string aTypeOfAttribute);
1062  boolean ReferencedObject(out SObject obj); // A REVOIR
1070  ListOfAttributes GetAllAttributes();
1075  Study GetStudy();
1076 
1082  Object GetObject();
1083 
1088  string GetName();
1089 
1094  string GetComment();
1095 
1100  string GetIOR();
1101 
1107  void SetAttrString(in string name, in string value);
1108 
1115  long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
1116  };
1117 
1118 
1119  //==========================================================================
1124  //==========================================================================
1126  {
1131  exception LockProtection {};
1138  void CheckLocked() raises (LockProtection);
1139 
1141  string Type();
1142 
1144  string GetClassType();
1145 
1147  SObject GetSObject();
1148 
1150 
1155  long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
1156  };
1157 
1158 
1159 
1160  //==========================================================================
1167  //==========================================================================
1168  interface SComponent : SObject
1169  {
1174  string ComponentDataType();
1179  boolean ComponentIOR (out ID theID); //returns True if there is an instance
1180  //In this case ID identifies this one
1181  };
1182 
1183 
1184  //==========================================================================
1190  //==========================================================================
1192  {
1196  void Init();
1201  boolean More();
1205  void Next();
1212  SComponent Value();
1213  };
1214 
1215  //==========================================================================
1221  //==========================================================================
1223  {
1228  void Init();
1235  void InitEx(in boolean allLevels);
1240  boolean More();
1244  void Next();
1248  SObject Value();
1249  };
1250 
1251  //==========================================================================
1252  //==========================================================================
1258  {
1263  void Init(in boolean allLevels);
1268  boolean More();
1272  void Next();
1276  SObject Value();
1277  };
1278 
1279  //==========================================================================
1280  //==========================================================================
1287  {
1294  boolean Append(in SObject theObject);
1301  boolean Remove(in SObject theObject);
1305  boolean AppendTo(in SObject theFather, in SObject theObject);
1309  boolean InsertBefore(in SObject theFirst, in SObject theNext);
1313  boolean SetCurrentObject(in SObject theObject);
1317  boolean SetRootCurrent();
1321  boolean HasChildren(in SObject theObject);
1325  SObject GetFather(in SObject theObject);
1329  boolean SetName(in string theName);
1333  string GetName();
1337  boolean IsUseCase(in SObject theObject);
1341  boolean IsUseCaseNode(in SObject theObject);
1345  SObject GetCurrentObject();
1349  SObject AddUseCase(in string theName);
1353  UseCaseIterator GetUseCaseIterator(in SObject theObject);
1354  };
1355  //==========================================================================
1368  //==========================================================================
1369  interface Driver
1370  {
1371 
1385  TMPFile Save(in SComponent theComponent, in string theURL, in boolean isMultiFile);
1386 
1398  TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile);
1399 
1409  boolean Load(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
1410 
1420  boolean LoadASCII(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
1421 
1428  void Close (in SComponent aSComponent);
1429  //void Close ( in string aIORSComponent);
1430 
1436  string ComponentDataType();
1437 
1438  // Driver Transient -> persistent called for each object in study
1453  string IORToLocalPersistentID (in SObject theSObject,
1454  in string IORString,
1455  in boolean isMultiFile,
1456  in boolean isASCII);
1472  string LocalPersistentIDToIOR (in SObject theSObject,
1473  in string aLocalPersistentID,
1474  in boolean isMultiFile,
1475  in boolean isASCII)
1476  raises (SALOME::SALOME_Exception);
1477 
1478  // Publishing in the study
1484  boolean CanPublishInStudy(in Object theIOR) raises (SALOME::SALOME_Exception);
1497  SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName);
1498 
1499  // copy/paste methods
1500 
1506  boolean CanCopy(in SObject theObject);
1510  TMPFile CopyFrom(in SObject theObject, out long theObjectID);
1514  boolean CanPaste(in string theComponentName, in long theObjectID);
1518  SObject PasteInto(in TMPFile theStream, in long theObjectID, in SObject theObject);
1519 
1520  };
1521 };
1522 
1523 #endif
Parameter attribute.
Definition: SALOMEDS_Attributes.idl:1695
Invalid study comment.
Definition: SALOMEDS.idl:141
Interface of the UseCaseBuilder.
Definition: SALOMEDS.idl:1286
interface for common behavior of SALOME transient CORBA objects
Definition: SALOME_GenericObj.idl:40
attribute string Name
The name of the Study.
Definition: SALOMEDS.idl:147
Invalid study component.
Definition: SALOMEDS.idl:131
string PersistentReference
While saving the data, IOR is transformed into persistent reference.
Definition: SALOMEDS.idl:52
ChildIterator interface
Definition: SALOMEDS.idl:1222
Definition: SALOMEDS.idl:96
string URL
Name of the file in which the Study is saved.
Definition: SALOMEDS.idl:44
string SalomeReference
IOR of the study in SALOME application.
Definition: SALOMEDS.idl:56
sequence< ListOfStrings > ListOfListOfStrings
An unbounded sequence of sequence of strings.
Definition: SALOMEDS.idl:71
The main exception in SALOME application.
Definition: SALOME_Exception.idl:70
sequence< string > ListOfDates
List of modification dates of a study.
Definition: SALOMEDS.idl:67
LockProtection Exception
Definition: SALOMEDS.idl:579
string ID
Main identifier of an object in SALOME application.
Definition: SALOMEDS.idl:48
Study Interface
Definition: SALOMEDS.idl:125
Interface of the UseCaseIterator.
Definition: SALOMEDS.idl:1257
attribute string Name
Definition: SALOMEDS.idl:1010
sequence< SObject > ListOfSObject
Sequence containing SObjects.
Definition: SALOMEDS.idl:154
sequence< string > ListOfStrings
An unbounded sequence of strings.
Definition: SALOMEDS.idl:69
study object already exists
Definition: SALOMEDS.idl:137
sequence< GenericAttribute > ListOfAttributes
List of attributes of SObjects.
Definition: SALOMEDS.idl:99
Invalid study context.
Definition: SALOMEDS.idl:129
Exception locking all changes.
Definition: SALOMEDS.idl:1131
Study Builder Interface
Definition: SALOMEDS.idl:573
Exception indicating that this feature hasn't been implemented in SALOME application.
Definition: SALOMEDS.idl:106
sequence< octet > TMPFile
A byte stream which is used for binary data transfer between different components.
Definition: SALOMEDS.idl:73
attribute string URL
Indicate the file where the study has been saved.
Definition: SALOMEDS.idl:301
Study properties attribute
Definition: SALOMEDS_Attributes.idl:1534
Driver interface
Definition: SALOMEDS.idl:1369
SComponentIterator interface
Definition: SALOMEDS.idl:1191
Invalid directory of the study exception.
Definition: SALOMEDS.idl:133
This package contains the interfaces used for creation, management and modification of the Study...
Definition: SALOMEDS.idl:40
Study Manager interface
Definition: SALOMEDS.idl:833
Invalid name of the study exception.
Definition: SALOMEDS.idl:139
attribute short StudyId
The ID of the Study.
Definition: SALOMEDS.idl:152
SObject interface
Definition: SALOMEDS.idl:1006
Exception pointing that this name of the study has already been used.
Definition: SALOMEDS.idl:135
sequence< string > ListOfFileNames
List of file names.
Definition: SALOMEDS.idl:65
sequence< string > ListOfOpenStudies
List of the names of studies which are currently open in this SALOME session.
Definition: SALOMEDS.idl:63
interface for common behavior of SALOME transient CORBA objects
Generic attribute interface
Definition: SALOMEDS.idl:1125
SComponent interface
Definition: SALOMEDS.idl:1168
attribute boolean IsSaved
Indicate whether the study has been saved.
Definition: SALOMEDS.idl:288
This file contains the objects defining the main exception used in SALOME application.
Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS