Back to index

salome-kernel  6.5.0
Public Member Functions
SALOMEDS::Driver Interface Reference

Driver interface More...

import "SALOMEDS.idl";

List of all members.

Public Member Functions

TMPFile Save (in SComponent theComponent, in string theURL, in boolean isMultiFile)
 Saving the data produced by a definite component.
TMPFile SaveASCII (in SComponent theComponent, in string theURL, in boolean isMultiFile)
 Saving the data in ASCII format produced by a definite component.
boolean Load (in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile)
 Loading the data.
boolean LoadASCII (in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile)
 Loading the data from files in ASCII format.
void Close (in SComponent aSComponent)
 Closing of the study.
string ComponentDataType ()
 Gets the type of the data.
string IORToLocalPersistentID (in SObject theSObject, in string IORString, in boolean isMultiFile, in boolean isASCII)
 Transforms IOR of a given SObject into PersistentID.
string LocalPersistentIDToIOR (in SObject theSObject, in string aLocalPersistentID, in boolean isMultiFile, in boolean isASCII) raises (SALOME::SALOME_Exception)
 Transforms PersistentID into IOR of the object.
boolean CanPublishInStudy (in Object theIOR) raises (SALOME::SALOME_Exception)
 Publishing in the study.
SObject PublishInStudy (in Study theStudy, in SObject theSObject, in Object theObject, in string theName)
 Publishing in the study.
boolean CanCopy (in SObject theObject)
 Returns True, if the given SObject can be copied to the clipboard.
TMPFile CopyFrom (in SObject theObject, out long theObjectID)
 Returns the object ID and the TMPFile of the object from the given SObject.
boolean 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.
SObject PasteInto (in TMPFile theStream, in long theObjectID, in SObject theObject)
 Returns the SObject of the pasted object.

Detailed Description

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:

Definition at line 1369 of file SALOMEDS.idl.


Member Function Documentation

boolean SALOMEDS::Driver::CanCopy ( in SObject  theObject)

Returns True, if the given SObject can be copied to the clipboard.

Parameters:
theObjectThe given SObject which should be copied.
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.

boolean SALOMEDS::Driver::CanPublishInStudy ( in Object  theIOR) raises (SALOME::SALOME_Exception)

Publishing in the study.

Returns:
True if the given Component can publish a definite object with a given IOR in the study.
Parameters:
theIORThe IOR of a definite object
void SALOMEDS::Driver::Close ( in SComponent  aSComponent)

Closing of the study.

This method Close is called by the StudyManager when closing a study.

Parameters:
aSComponentThe according SComponent

Gets the type of the data.

Returns:
The type of data produced by the Component in the study.
TMPFile SALOMEDS::Driver::CopyFrom ( in SObject  theObject,
out long  theObjectID 
)

Returns the object ID and the TMPFile of the object from the given SObject.

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.

Note:

In SALOME the objects which are present in an active study are identified by an IOR, when this study is saved these references are transformed into persintent IDs.
Parameters:
theSObjectThe given SObject.
IORStringThe IOR of the given SObject.
isMultiFileIf this parameter is True the study containing the given SObject is stored in several files.
isASCIIIf this parameter is True the study containing the given SObject is stored in ASCII format.
Returns:
The persistent ID of the given SObject
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.

Parameters:
theComponentSComponent corresponding to this Component
theStreamThe file which contains all data saved by the component on Save method
isMultiFileIf the value of this boolean parameter is True, the data will be loaded from several files

Here is the caller graph for this function:

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.

Parameters:
theComponentSComponent corresponding to this Component
theStreamThe file which contains all data saved by the component on Save method
isMultiFileIf the value of this boolean parameter is True, the data will be loaded from several files
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.

Note:

In SALOME the objects which are present in an saved study (file) are identified by a persistent ID, when this study is open, these references are transformed into persintent IORs.
Parameters:
theSObjectThe given SObject.
IORStringThe IOR of the given SObject.
isMultiFileIf this parameter is True the study containing the given SObject is stored in several files.
isASCIIIf this parameter is True the study containing the given SObject is stored in ASCII format.
Returns:
The IOR of the given SObject
SObject SALOMEDS::Driver::PasteInto ( in TMPFile  theStream,
in long  theObjectID,
in SObject  theObject 
)

Returns the SObject of the pasted 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.

Parameters:
theStudyThe study in which the object is published
theSObjectIf this parameter is null the object is published for the first time. Otherwise this parameter should contain a reference to the object published earlier
theObjectThe object which is published
theNameThe name of the published object. If this parameter is empty, the name is generated automatically by the component.
Returns:
The published SObject.
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.
   \param theComponent    %SComponent corresponding to this Component
   \param theURL  The path to the file in which the data will be saved.
   \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
   \return A byte stream TMPFile that contains all saved data

See example19 for an example of this method usage in batchmode of SALOME application.

Here is the caller graph for this function:

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.
   \param theComponent    %SComponent corresponding to this Component
   \param theURL  The path to the file in which the data will be saved.
   \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
   \return A byte stream TMPFile that will contain all saved data

See example19 for an example of this method usage in batchmode of SALOME application.


The documentation for this interface was generated from the following file: