Driver interface More...
Public Member Functions | |
| TMPFile | Save (in SComponent theComponent, in string theURL, in boolean isMultiFile) |
| Saving the data produced by a definite component. More... | |
| TMPFile | SaveASCII (in SComponent theComponent, in string theURL, in boolean isMultiFile) |
| Saving the data in ASCII format produced by a definite component. More... | |
| boolean | Load (in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile) |
| Loading the data. More... | |
| boolean | LoadASCII (in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile) |
| Loading the data from files in ASCII format. More... | |
| void | Close (in SComponent aSComponent) |
| Closing of the study. More... | |
| string | ComponentDataType () |
| string | IORToLocalPersistentID (in SObject theSObject, in string IORString, in boolean isMultiFile, in boolean isASCII) |
| string | LocalPersistentIDToIOR (in SObject theSObject, in string aLocalPersistentID, in boolean isMultiFile, in boolean isASCII) raises (SALOME::SALOME_Exception) |
| boolean | CanPublishInStudy (in Object theIOR) raises (SALOME::SALOME_Exception) |
| SObject | PublishInStudy (in Study theStudy, in SObject theSObject, in Object theObject, in string theName) |
| Publishing in the study. More... | |
| boolean | CanCopy (in SObject theObject) |
| TMPFile | CopyFrom (in SObject theObject, out long theObjectID) |
| boolean | CanPaste (in string theComponentName, in long theObjectID) |
| SObject | PasteInto (in TMPFile theStream, in long theObjectID, in SObject theObject) |
Driver interface
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 can be called by any component and which provide the following functionality:
| TMPFile SALOMEDS::Driver::Save | ( | in SComponent | theComponent, |
| in string | theURL, | ||
| in boolean | isMultiFile | ||
| ) |
Saving the data produced by a definite component.
This method is called by the StudyManager when saving a study.
| theComponent | SComponent corresponding to this Component |
| theURL | The path to the file in which the data will be saved. |
| isMultiFile | If the value of this boolean parameter is True, the data will be saved in several files. |
See example19 for an example of this method usage in batchmode of SALOME application.
| TMPFile SALOMEDS::Driver::SaveASCII | ( | in SComponent | theComponent, |
| in string | theURL, | ||
| in boolean | isMultiFile | ||
| ) |
Saving the data in ASCII format produced by a definite component.
This method is called by the StudyManager when saving a study in ASCII format.
| theComponent | SComponent corresponding to this Component |
| theURL | The path to the file in which the data will be saved. |
| isMultiFile | If the value of this boolean parameter is True, the data will be saved in several files. |
See example19 for an example of this method usage in batchmode of SALOME application.
| boolean SALOMEDS::Driver::Load | ( | in SComponent | theComponent, |
| in TMPFile | theStream, | ||
| in string | theURL, | ||
| in boolean | isMultiFile | ||
| ) |
Loading the data.
This method is called by the StudyManager when opening a study.
| theComponent | SComponent corresponding to this Component |
| theStream | The file which contains all data saved by the component on Save method |
| isMultiFile | If the value of this boolean parameter is True, the data will be loaded from several files |
| boolean SALOMEDS::Driver::LoadASCII | ( | in SComponent | theComponent, |
| in TMPFile | theStream, | ||
| in string | theURL, | ||
| in boolean | isMultiFile | ||
| ) |
Loading the data from files in ASCII format.
This method is called by the StudyManager when opening a study.
| theComponent | SComponent corresponding to this Component |
| theStream | The file which contains all data saved by the component on Save method |
| isMultiFile | If the value of this boolean parameter is True, the data will be loaded from several files |
| void SALOMEDS::Driver::Close | ( | in SComponent | aSComponent | ) |
Closing of the study.
This method Close is called by the StudyManager when closing a study.
| aSComponent | The according SComponent |
| string SALOMEDS::Driver::ComponentDataType | ( | ) |
Gets the type of the data
| string SALOMEDS::Driver::IORToLocalPersistentID | ( | in SObject | theSObject, |
| in string | IORString, | ||
| in boolean | isMultiFile, | ||
| in boolean | isASCII | ||
| ) |
Transforms IOR of a given SObject into PersistentID. It is called for each object in the study.
| theSObject | The given SObject. |
| IORString | The IOR of the given SObject. |
| isMultiFile | If this parameter is True the study containing the given SObject is stored in several files. |
| isASCII | If this parameter is True the study containing the given SObject is stored in ASCII format. |
| string SALOMEDS::Driver::LocalPersistentIDToIOR | ( | in SObject | theSObject, |
| in string | aLocalPersistentID, | ||
| in boolean | isMultiFile, | ||
| in boolean | isASCII | ||
| ) | raises (SALOME::SALOME_Exception) |
Transforms PersistentID into IOR of the object. It is called for each object in the study.
| theSObject | The given SObject. |
| IORString | The IOR of the given SObject. |
| isMultiFile | If this parameter is True the study containing the given SObject is stored in several files. |
| isASCII | If this parameter is True the study containing the given SObject is stored in ASCII format. |
| boolean SALOMEDS::Driver::CanPublishInStudy | ( | in Object | theIOR | ) | raises (SALOME::SALOME_Exception) |
Publishing in the study
| theIOR | The IOR of a definite object |
| SObject SALOMEDS::Driver::PublishInStudy | ( | in Study | theStudy, |
| in SObject | theSObject, | ||
| in Object | theObject, | ||
| in string | theName | ||
| ) |
Publishing in the study.
Publishes the given object in the study, using the algorithm of this component.
| theStudy | The study in which the object is published |
| theSObject | If this parameter is null the object is published for the first time. Otherwise this parameter should contain a reference to the object published earlier |
| theObject | The object which is published |
| theName | The name of the published object. If this parameter is empty, the name is generated automatically by the component. |
| boolean SALOMEDS::Driver::CanCopy | ( | in SObject | theObject | ) |
Returns True, if the given SObject can be copied to the clipboard.
| theObject | The given SObject which should be copied. |
Returns the object ID and the TMPFile of the object from the given SObject.
| boolean SALOMEDS::Driver::CanPaste | ( | in string | theComponentName, |
| in long | theObjectID | ||
| ) |
Returns True, if the component can paste the object with given ID of the component with name theComponentName.