00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00030 #ifndef _SALOMEDS_IDL_
00031 #define _SALOMEDS_IDL_
00032
00033 #include "SALOME_Exception.idl"
00034 #include "SALOME_GenericObj.idl"
00035
00040 module SALOMEDS
00041 {
00044 typedef string URL;
00045
00048 typedef string ID;
00049
00052 typedef string PersistentReference;
00053
00056 typedef string SalomeReference;
00057
00063 typedef sequence<string> ListOfOpenStudies;
00065 typedef sequence<string> ListOfFileNames;
00067 typedef sequence<string> ListOfDates ;
00069 typedef sequence<string> ListOfStrings ;
00071 typedef sequence<ListOfStrings> ListOfListOfStrings ;
00073 typedef sequence<octet> TMPFile;
00074
00075
00076
00077
00078
00079
00080
00081
00082 interface GenericAttribute;
00083 interface Study;
00084 interface StudyManager;
00085 interface StudyBuilder;
00086 interface SObject;
00087 interface SComponent;
00088 interface SComponentIterator;
00089 interface ChildIterator;
00090 interface Driver;
00091 interface AttributeStudyProperties;
00092 interface AttributeParameter;
00093 interface UseCaseIterator;
00094 interface UseCaseBuilder;
00095
00097 typedef sequence<GenericAttribute> ListOfAttributes;
00098
00100 exception NotImplemented {};
00101
00102
00103
00119 interface Study
00120 {
00121
00123 exception StudyInvalidContext {};
00125 exception StudyInvalidComponent {};
00127 exception StudyInvalidDirectory {};
00129 exception StudyNameAlreadyUsed {};
00131 exception StudyObjectAlreadyExists {};
00133 exception StudyNameError {};
00135 exception StudyCommentError {};
00136
00141 attribute string Name;
00146 attribute short StudyId;
00148 typedef sequence<SObject> ListOfSObject;
00150 PersistentReference GetPersistentReference();
00152 SalomeReference GetTransientReference();
00153
00158 boolean IsEmpty();
00167 SComponent FindComponent (in string aComponentName);
00168
00171 SComponent FindComponentID(in ID aComponentID);
00179 SObject FindObject (in string anObjectName);
00185 SObject FindObjectID (in ID aObjectID);
00191 SObject CreateObjectID (in ID aObjectID);
00197 SObject FindObjectIOR (in ID aObjectIOR);
00203 ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName);
00209 SObject FindObjectByPath(in string thePath);
00212 string GetObjectPath(in Object theObject);
00213
00220 void SetContext(in string thePath);
00225 string GetContext();
00230 ListOfStrings GetObjectNames(in string theContext);
00235 ListOfStrings GetDirectoryNames(in string theContext);
00240 ListOfStrings GetFileNames(in string theContext);
00245 ListOfStrings GetComponentNames(in string theContext);
00251 ChildIterator NewChildIterator(in SObject aSO);
00252
00257 SComponentIterator NewComponentIterator();
00258
00265 StudyBuilder NewBuilder() ;
00270 void UpdateIORLabelMap(in string anIOR, in string anEntry);
00271
00279 AttributeStudyProperties GetProperties();
00282 attribute boolean IsSaved;
00287 boolean IsModified();
00288
00291 void Modified();
00292
00295 attribute string URL;
00296
00301 ListOfSObject FindDependances(in SObject anObject);
00302
00307 string GetLastModificationDate();
00313 ListOfDates GetModificationsDate();
00319 string ConvertObjectToIOR(in Object theObject);
00325 Object ConvertIORToObject(in string theIOR);
00328 UseCaseBuilder GetUseCaseBuilder();
00329
00332 void Close();
00333
00336 void EnableUseCaseAutoFilling(in boolean isEnabled);
00337
00341 void AddPostponed(in string theIOR);
00342
00343 void AddCreatedPostponed(in string theIOR);
00344
00345 void RemovePostponed(in long theUndoLimit);
00346
00347 void UndoPostponed(in long theWay);
00348
00349 boolean DumpStudy(in string thePath, in string theBaseName, in boolean isPublished);
00350
00356 AttributeParameter GetCommonParameters(in string theID, in long theSavePoint);
00357
00364 AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint);
00365
00366
00372 string GetDefaultScript(in string theID, in string theModuleName);
00373
00380 long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
00381
00382
00388 void SetStudyLock(in string theLockerID);
00389
00394 boolean IsStudyLocked();
00395
00401 void UnLockStudy(in string theLockerID);
00402
00405 ListOfStrings GetLockerID();
00406
00413 void SetReal( in string theVarName, in double theValue );
00414
00421 void SetInteger( in string theVarName, in long theValue );
00428 void SetBoolean( in string theVarName, in boolean theValue );
00429
00436 void SetString( in string theVarName, in string theValue );
00437
00440 void SetStringAsDouble( in string theVarName, in double theValue );
00441
00446 double GetReal( in string theVarName );
00447
00452 long GetInteger( in string theVarName );
00453
00458 boolean GetBoolean( in string theVarName );
00459
00464 string GetString( in string theVarName );
00465
00466
00472 boolean IsReal( in string theVarName );
00473
00479 boolean IsInteger( in string theVarName );
00480
00486 boolean IsBoolean( in string theVarName );
00487
00493 boolean IsString( in string theVarName );
00494
00501 boolean IsVariable( in string theVarName );
00502
00505 ListOfStrings GetVariableNames();
00506
00514 boolean RemoveVariable( in string theVarName );
00515
00524 boolean RenameVariable( in string theVarName, in string theNewVarName );
00525
00533 boolean IsVariableUsed( in string theVarName );
00534
00540 ListOfListOfStrings ParseVariables( in string theVars );
00541
00542 };
00543
00544
00555
00556
00557 interface StudyBuilder
00558 {
00563 exception LockProtection {};
00572 SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
00577 void DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection);
00578
00583 void RemoveComponent(in SComponent aComponent) raises(LockProtection);
00584
00596 SObject NewObject (in SObject theFatherObject) raises(LockProtection);
00597
00606 SObject NewObjectToTag (in SObject theFatherObject, in long atag) raises(LockProtection);
00613 void RemoveObject (in SObject anObject) raises(LockProtection);
00620 void RemoveObjectWithChildren(in SObject anObject) raises(LockProtection);
00621
00628 void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
00634 void Load (in SObject sco);
00635
00645 GenericAttribute FindOrCreateAttribute(in SObject anObject,
00646 in string aTypeOfAttribute) raises(LockProtection);
00647
00657 boolean FindAttribute(in SObject anObject,
00658 out GenericAttribute anAttribute,
00659 in string aTypeOfAttribute);
00668 void RemoveAttribute(in SObject anObject,
00669 in string aTypeOfAttribute) raises(LockProtection);
00676 void Addreference(in SObject anObject,
00677 in SObject theReferencedObject) ;
00678
00684 void RemoveReference(in SObject anObject) ;
00685
00693 void AddDirectory(in string theName) raises(LockProtection);
00694
00704 void SetGUID(in SObject anObject, in string theGUID) raises(LockProtection);
00711 boolean IsGUID(in SObject anObject, in string theGUID);
00712
00720 void NewCommand();
00730 void CommitCommand() raises(LockProtection);
00734 boolean HasOpenCommand();
00741 void AbortCommand();
00746 attribute long UndoLimit;
00756 void Undo() raises (LockProtection);
00766 void Redo() raises (LockProtection);
00773 boolean GetAvailableUndos();
00780 boolean GetAvailableRedos();
00787 void SetName(in SObject theSO, in string theValue) raises (LockProtection);
00788
00795 void SetComment(in SObject theSO, in string theValue) raises (LockProtection);
00796
00803 void SetIOR(in SObject theSO, in string theValue) raises (LockProtection);
00804 };
00805
00806
00815
00816
00817 interface StudyManager
00818 {
00822 void ping();
00823
00824 void Shutdown();
00825
00829 long getPID();
00830
00834 oneway void ShutdownWithExit();
00835
00845 Study NewStudy(in string study_name);
00846
00855 Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception);
00856
00861 void Close(in Study aStudy);
00871 boolean Save(in Study aStudy, in boolean theMultiFile);
00877 boolean SaveASCII(in Study aStudy, in boolean theMultiFile);
00887 boolean SaveAs(in URL aUrl,
00888 in Study aStudy,
00889 in boolean theMultiFile);
00898 boolean SaveAsASCII(in URL aUrl,
00899 in Study aStudy,
00900 in boolean theMultiFile);
00901
00902
00909 ListOfOpenStudies GetOpenStudies();
00910
00917 Study GetStudyByName (in string aStudyName);
00918
00925 Study GetStudyByID (in short aStudyID);
00926
00927
00928
00932 boolean CanCopy(in SObject theObject);
00937 boolean Copy(in SObject theObject);
00942 boolean CanPaste(in SObject theObject);
00949 SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection);
00950
00956 string ConvertObjectToIOR(in Object theObject);
00962 Object ConvertIORToObject(in string theIOR);
00963
00970 long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
00971
00972
00973 };
00974
00975
00976
00988
00989
00990 interface SObject : SALOME::GenericObj
00991 {
00994 attribute string Name;
00999 ID GetID();
01004 SComponent GetFatherComponent();
01009 SObject GetFather();
01014 short Tag();
01019 short Depth();
01026 boolean FindSubObject (in long atag, out SObject obj);
01034 boolean FindAttribute(out GenericAttribute anAttribute,
01035 in string aTypeOfAttribute);
01041 boolean ReferencedObject(out SObject obj);
01049 ListOfAttributes GetAllAttributes();
01054 Study GetStudy();
01055
01061 Object GetObject();
01062
01067 string GetName();
01068
01073 string GetComment();
01074
01079 string GetIOR();
01080
01087 long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
01088 };
01089
01090
01091
01096
01097 interface GenericAttribute : SALOME::GenericObj
01098 {
01103 exception LockProtection {};
01110 void CheckLocked() raises (LockProtection);
01111
01113 string Type();
01114
01116 string GetClassType();
01117
01119 SObject GetSObject();
01120
01122
01127 long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
01128 };
01129
01130
01131
01132
01139
01140 interface SComponent : SObject
01141 {
01146 string ComponentDataType();
01151 boolean ComponentIOR (out ID theID);
01152
01153 };
01154
01155
01156
01162
01163 interface SComponentIterator : SALOME::GenericObj
01164 {
01168 void Init();
01173 boolean More();
01177 void Next();
01184 SComponent Value();
01185 };
01186
01187
01193
01194 interface ChildIterator : SALOME::GenericObj
01195 {
01200 void Init();
01207 void InitEx(in boolean allLevels);
01212 boolean More();
01216 void Next();
01220 SObject Value();
01221 };
01222
01223
01224
01229 interface UseCaseIterator : SALOME::GenericObj
01230 {
01235 void Init(in boolean allLevels);
01240 boolean More();
01244 void Next();
01248 SObject Value();
01249 };
01250
01251
01252
01258 interface UseCaseBuilder : SALOME::GenericObj
01259 {
01266 boolean Append(in SObject theObject);
01273 boolean Remove(in SObject theObject);
01277 boolean AppendTo(in SObject theFather, in SObject theObject);
01281 boolean InsertBefore(in SObject theFirst, in SObject theNext);
01285 boolean SetCurrentObject(in SObject theObject);
01289 boolean SetRootCurrent();
01293 boolean HasChildren(in SObject theObject);
01297 boolean SetName(in string theName);
01301 string GetName();
01305 boolean IsUseCase(in SObject theObject);
01309 SObject GetCurrentObject();
01313 SObject AddUseCase(in string theName);
01317 UseCaseIterator GetUseCaseIterator(in SObject theObject);
01318 };
01319
01332
01333 interface Driver
01334 {
01335
01349 TMPFile Save(in SComponent theComponent, in string theURL, in boolean isMultiFile);
01350
01362 TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile);
01363
01373 boolean Load(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
01374
01384 boolean LoadASCII(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile);
01385
01392 void Close (in SComponent aSComponent);
01393
01394
01400 string ComponentDataType();
01401
01402
01417 string IORToLocalPersistentID (in SObject theSObject,
01418 in string IORString,
01419 in boolean isMultiFile,
01420 in boolean isASCII);
01436 string LocalPersistentIDToIOR (in SObject theSObject,
01437 in string aLocalPersistentID,
01438 in boolean isMultiFile,
01439 in boolean isASCII)
01440 raises (SALOME::SALOME_Exception);
01441
01442
01448 boolean CanPublishInStudy(in Object theIOR) raises (SALOME::SALOME_Exception);
01461 SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName);
01462
01463
01464
01470 boolean CanCopy(in SObject theObject);
01474 TMPFile CopyFrom(in SObject theObject, out long theObjectID);
01478 boolean CanPaste(in string theComponentName, in long theObjectID);
01482 SObject PasteInto(in TMPFile theStream, in long theObjectID, in SObject theObject);
01483
01484 };
01485 };
01486
01487 #endif