SHAPER
9.12.0
|
Object that knows (from the initial XML file) which plugin contains which feature, loads and stores reference to loaded plugins by the feature functionality request. More...
Public Member Functions | |
virtual bool | load (const char *theFileName) |
Loads the OCAF document from the file. More... | |
virtual bool | save (const char *theFileName, std::list< std::string > &theResults) |
Saves the OCAF document to the file. More... | |
virtual void | closeAll () |
Closes all documents. More... | |
virtual void | startOperation (const std::string &theId="", const bool theAttachedToNested=false) |
Starts a new operation (opens a transaction) More... | |
virtual void | finishOperation () |
Finishes the previously started operation (closes the transaction) More... | |
virtual void | abortOperation () |
Aborts the operation. More... | |
virtual bool | isOperation () |
Returns true if operation has been started, but not yet finished or aborted. More... | |
virtual bool | isModified () |
Returns true if document was modified (since creation/opening) More... | |
virtual bool | canUndo () |
Returns True if there are available Undos. More... | |
virtual void | undo () |
Undoes last operation. More... | |
virtual bool | canRedo () |
Returns True if there are available Redos. More... | |
virtual void | redo () |
Redoes last operation. More... | |
virtual std::list< std::string > | undoList () |
Returns stack of performed operations. More... | |
virtual std::list< std::string > | redoList () |
Returns stack of rolled back operations. More... | |
virtual void | clearUndoRedo () |
Clears undo and redo lists of all documents in the session. More... | |
virtual std::shared_ptr< ModelAPI_Document > | moduleDocument () |
Returns the root document of the application (that may contains sub-documents) More... | |
virtual std::shared_ptr< ModelAPI_Document > | document (int theDocID) |
Returns the document by ID, loads if not loaded yet. Returns null if no such document. More... | |
virtual bool | hasModuleDocument () |
Return true if root document has been already created. More... | |
virtual std::shared_ptr< ModelAPI_Document > | activeDocument () |
Returns the current document that used for current work in the application. More... | |
virtual void | setActiveDocument (std::shared_ptr< ModelAPI_Document > theDoc, bool theSendSignal=true) |
Defines the current document that used for current work in the application. More... | |
virtual std::list< std::shared_ptr< ModelAPI_Document > > | allOpenedDocuments () |
Returns all the opened documents of the session (without postponed) More... | |
virtual bool | isLoadByDemand (const std::wstring theDocID, const int theDocIndex) |
Returns true if document is not loaded yet. More... | |
virtual void | registerPlugin (ModelAPI_Plugin *thePlugin) |
Registers the plugin that creates features. More... | |
virtual bool | checkLicense (const std::string &thePluginName) |
Verifies the license for the plugin is valid. More... | |
virtual void | processEvent (const std::shared_ptr< Events_Message > &theMessage) |
Processes the configuration file reading. More... | |
virtual std::shared_ptr< ModelAPI_Document > | copy (std::shared_ptr< ModelAPI_Document > theSource, const int theDestID) |
Copies the document to the new one. More... | |
virtual ModelAPI_ValidatorsFactory * | validators () |
Returns the validators factory: the only one instance per application. More... | |
virtual ModelAPI_FiltersFactory * | filters () |
Returns the filters factory: the only one instance per application. More... | |
void | setCheckTransactions (const bool theCheck) |
Sets the flag to check modifications outside the transaction or not. More... | |
Model_Session () | |
Is called only once, on startup of the application. More... | |
virtual int | transactionID () |
Returns the global identifier of the current transaction (needed for the update algo) More... | |
virtual bool | isAutoUpdateBlocked () |
Returns true if auto-update in the application is blocked. More... | |
virtual void | blockAutoUpdate (const bool theBlock) |
Set state of the auto-update of features result in the application. More... | |
virtual bool | isLoading () |
Returns true if a loading process is performed (so, no need to react on a new part creation) More... | |
virtual EVENTS_EXPORT bool | groupMessages () |
Listener that needs mostly grouped messages received returns true in this method. More... | |
Static Public Member Functions | |
static std::shared_ptr< ModelAPI_Session > | get () |
Returns the real implementation (the alone instance per application) of the plugin manager. More... | |
Protected Member Functions | |
void | LoadPluginsInfo () |
Loads (if not done yet) the information about the features and plugins. More... | |
FeaturePtr | createFeature (std::string theFeatureID, Model_Document *theDocOwner) |
Creates the feature object using plugins functionality. More... | |
ModelAPI_Plugin * | getPlugin (const std::string &thePluginName) |
Get the plugin by name. If it is not loaded, load plugin. More... | |
void | groupWhileFlush (const std::shared_ptr< Events_Message > &theMessage) |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners) More... | |
EVENTS_EXPORT void | flushGrouped (const Events_ID &theID) |
Sends myGroups on flush finish. More... | |
Static Protected Member Functions | |
static void | setSession (std::shared_ptr< ModelAPI_Session > theManager) |
Sets the session interface implementation (once per application launch) More... | |
Protected Attributes | |
bool | myIsLoading |
keeps the state of the loading of the document More... | |
Friends | |
class | Model_Document |
class | Model_Objects |
Object that knows (from the initial XML file) which plugin contains which feature, loads and stores reference to loaded plugins by the feature functionality request.
Model_Session::Model_Session | ( | ) |
Is called only once, on startup of the application.
|
virtual |
Loads the OCAF document from the file.
theFileName | full name of the file to load |
Implements ModelAPI_Session.
|
virtual |
Saves the OCAF document to the file.
theFileName | full name of the file to store |
theResults | the result full file names that were stored by "save" |
Implements ModelAPI_Session.
|
virtual |
Closes all documents.
Implements ModelAPI_Session.
|
virtual |
Starts a new operation (opens a transaction)
theId | string-identifier of the started transaction |
theAttachedToNested | if it is true, it means that this transaction is attached to the nested where it is located and will be committed on the next commit with the nested |
Implements ModelAPI_Session.
|
virtual |
Finishes the previously started operation (closes the transaction)
Implements ModelAPI_Session.
|
virtual |
Aborts the operation.
Implements ModelAPI_Session.
|
virtual |
Returns true if operation has been started, but not yet finished or aborted.
Implements ModelAPI_Session.
|
virtual |
Returns true if document was modified (since creation/opening)
Implements ModelAPI_Session.
|
virtual |
Returns True if there are available Undos.
Implements ModelAPI_Session.
|
virtual |
Undoes last operation.
Implements ModelAPI_Session.
|
virtual |
Returns True if there are available Redos.
Implements ModelAPI_Session.
|
virtual |
Redoes last operation.
Implements ModelAPI_Session.
|
virtual |
Returns stack of performed operations.
Implements ModelAPI_Session.
|
virtual |
Returns stack of rolled back operations.
Implements ModelAPI_Session.
|
virtual |
Clears undo and redo lists of all documents in the session.
Implements ModelAPI_Session.
|
virtual |
Returns the root document of the application (that may contains sub-documents)
Implements ModelAPI_Session.
|
virtual |
Returns the document by ID, loads if not loaded yet. Returns null if no such document.
Implements ModelAPI_Session.
|
virtual |
Return true if root document has been already created.
Implements ModelAPI_Session.
|
virtual |
Returns the current document that used for current work in the application.
Implements ModelAPI_Session.
|
virtual |
Defines the current document that used for current work in the application.
Implements ModelAPI_Session.
|
virtual |
Returns all the opened documents of the session (without postponed)
Implements ModelAPI_Session.
|
virtual |
Returns true if document is not loaded yet.
Implements ModelAPI_Session.
|
virtual |
Registers the plugin that creates features.
It is obligatory for each plugin to call this function on loading to be found by the plugin manager on call of the feature)
Implements ModelAPI_Session.
|
virtual |
Verifies the license for the plugin is valid.
Implements ModelAPI_Session.
|
virtual |
Processes the configuration file reading.
Implements Events_Listener.
|
virtual |
Copies the document to the new one.
Implements ModelAPI_Session.
|
virtual |
Returns the validators factory: the only one instance per application.
Implements ModelAPI_Session.
|
virtual |
Returns the filters factory: the only one instance per application.
Implements ModelAPI_Session.
|
inline |
Sets the flag to check modifications outside the transaction or not.
|
virtual |
Returns the global identifier of the current transaction (needed for the update algo)
Implements ModelAPI_Session.
|
virtual |
Returns true if auto-update in the application is blocked.
Implements ModelAPI_Session.
|
virtual |
Set state of the auto-update of features result in the application.
Implements ModelAPI_Session.
|
protected |
Loads (if not done yet) the information about the features and plugins.
|
protected |
Creates the feature object using plugins functionality.
|
protected |
Get the plugin by name. If it is not loaded, load plugin.
|
staticinherited |
Returns the real implementation (the alone instance per application) of the plugin manager.
|
inlinevirtualinherited |
Returns true if a loading process is performed (so, no need to react on a new part creation)
|
staticprotectedinherited |
Sets the session interface implementation (once per application launch)
|
inlinevirtualinherited |
Listener that needs mostly grouped messages received returns true in this method.
In this case during the message is flushed, all the new messages are grouped, not sended immideately and then sent in the end of flush.
Reimplemented in SketchSolver_Manager, and SketchPlugin_OverConstraintsResolver.
|
protectedinherited |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners)
|
protectedinherited |
Sends myGroups on flush finish.
|
protectedinherited |
keeps the state of the loading of the document