All Frameworks  Class Hierarchy  This Framework  Indexes   

InteractiveInterfaces Interface CATIIniInteractiveSession

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIIniInteractiveSession

Interface to handle documents or to exit during an interactive session.
Role:This interface contains main methods of the File/Menu of the menubar. You can create,open,save,close documents or exit of the session.
This interface must be used during an interactive session because each method impacts the windows which visualize documents or closes the frame of the session.
In a batch, or if you want handle documents without window, you must use methods included in CATDocumentServices .
This interface is implemented by the session, to retrieve a pointer, use the GetPtrSession method.


Method Index


o Close(CATIEditor*)
Closes a given document and closes all theirs windows.
o Exit()
Exits from the session.
o NewFrom(CATUnicodeString&,CATIEditor**)
Creates a new document from one and opens window to visualize it.
o New(CATUnicodeString&,CATIEditor**)
Creates a document of a given type and opens a window to visualize it.
o Open(CATUnicodeString&,CATBoolean,CATIEditor**)
Opens a document and opens a window to visualize it.
o SaveAs(CATUnicodeString&,CATIEditor*,CATUnicodeString&)
Saves an opened document under an another name.
o Save(CATIEditor*)
Saves a given document.

Methods


o Close
public virtual Close( iDocumentToClose= NULL)
Closes a given document and closes all theirs windows.
Parameters:
iDocumentToClose
If iDocumentToClose is NULL, the default value, the current document is closed, otherwise the given document is closed.
Returns:
S_OK if the document opened in a window is closed otherwise E_FAIL.
o Exit
public virtual Exit()
Exits from the session.
Returns:
E_FAIL if the session is not interactive otherwise S_OK.
o NewFrom
public virtual NewFrom( const iNewCompleteName,
oIEditorDocument)
Creates a new document from one and opens window to visualize it.
Role:The
Parameters:
iNewCompleteName
New Complete access name to the document to open ( path + name of the document ). The new document is created from this document.
oIEditorDocument
CATIEditor interface pointer.
Returns:
S_OK if a new document (not empty) is opened in a window otherwise E_FAIL.
o New
public virtual New( const iDocumentType,
oIEditorDocument)
Creates a document of a given type and opens a window to visualize it.
Parameters:
iDocumentType
String to define kind of document to create.
The string is the one which appears in the panel File/New.
oIEditorDocument
CATIEditor interface pointer.
Returns:
S_OK if a new window with an empty document is opened otherwise E_FAIL.
o Open
public virtual Open( const iCompleteName,
const iFlagRead,
oIEditorDocument)
Opens a document and opens a window to visualize it.
Parameters:
iCompleteName
Complete access name to the document to open ( path + name of the document ).
iFlagRead
TRUE
: The document is opened in read only
FALSE
: The document is opened in readwrite
oIEditorDocument
CATIEditor interface pointer.
Returns:
S_OK if the document is opened in a window otherwise E_FAIL.
o SaveAs
public virtual SaveAs( const iCompleteName,
iDocumentToSave= NULL ,
const iFormat="")
Saves an opened document under an another name.
Note:All windows of the concerned document have the new name of the document.
Parameters:
iCompleteName
Complete access name of the document ( path + name of the document ).
iDocumentToSave
If iDocumentToSave is NULL, the default value, the current document is saved otherwise the given document is saved.
iFormat
To save the document with a specific format.(recognized by iDoc).
Returns:
S_OK if the document opened in a window is saved otherwise E_FAIL.
o Save
public virtual Save( iDocumentToSave= NULL)
Saves a given document.
NoteThis is the unic method of this interface without impact on the frame.
Parameters:
iDocumentToSave
If iDocumentToSave is NULL, the default value, the current document is saved, otherwise the given document is saved.
Returns:
S_OK if the document opened in a window is saved otherwise E_FAIL.

This object is included in the file: CATIIniInteractiveSession.h
If needed, your Imakefile.mk should include the module: CATInteractiveInterfaces

Copyright © 2003, Dassault Systèmes. All rights reserved.