SHAPER
9.13.0
|
Realization of Open CASCADE application abstraction. More...
Public Member Functions | |
DEFINE_STANDARD_RTTIEXT (Model_Application, TDocStd_Application) MODEL_EXPORT static HandleggetApplication() | |
Definition of "Handles" usage. More... | |
MODEL_EXPORT std::shared_ptr< Model_Document > | document (const int theDocID) |
Returns the document by the identifier. More... | |
MODEL_EXPORT bool | hasDocument (const int theDocID) |
Returns true if document has been created. More... | |
MODEL_EXPORT bool | hasRoot () |
Returns true if root document has been created. More... | |
MODEL_EXPORT std::shared_ptr< Model_Document > | rootDocument () |
Returns root document, if created (or null otherwise) More... | |
MODEL_EXPORT void | deleteDocument (const int theDocID) |
Deletes the document from the application. More... | |
MODEL_EXPORT void | deleteAllDocuments () |
Deletes all documents existing in the application. More... | |
MODEL_EXPORT void | createDocument (const int theDocID) |
Creates a new document an returns an id of this document. More... | |
MODEL_EXPORT bool | loadDocument (const std::wstring theDocName, const int theDocID) |
Loads document by the file name (if it is registered as load by demand) More... | |
void | setLoadPath (std::string thePath) |
Set path for the loaded by demand documents. More... | |
const std::string & | loadPath () const |
Returns the path for the loaded by demand documents. More... | |
void | setLoadByDemand (std::wstring theID, const int theDocID) |
Defines that specified document must be loaded by demand. More... | |
bool | isLoadByDemand (std::wstring theID, const int theDocIndex) |
Returns true if specified document must be loaded by demand. More... | |
int | generateDocumentId () |
produces new unique identifier of the document More... | |
Standard_CString | ResourcesName () |
Return name of resource (i.e. "Standard") More... | |
virtual void | Formats (TColStd_SequenceOfExtendedString &theFormats) |
Return format (i.e "MDTV-Standard") More... | |
Model_Application () | |
Constructor Use method GetInstance() method to obtain the static instance of the object (or derive your own application) More... | |
Realization of Open CASCADE application abstraction.
Class for internal use only.
Application supports the formats and document management. It is uses OCAF-lke architecture and just implements specific features of the module.
Model_Application::Model_Application | ( | ) |
Constructor Use method GetInstance() method to obtain the static instance of the object (or derive your own application)
Model_Application::DEFINE_STANDARD_RTTIEXT | ( | Model_Application | , |
TDocStd_Application | |||
) |
Definition of "Handles" usage.
Model_Application | is the class name that is covered by the OCCT Handle Retuns the application: one per process |
std::shared_ptr< Model_Document > Model_Application::document | ( | const int | theDocID | ) |
Returns the document by the identifier.
bool Model_Application::hasDocument | ( | const int | theDocID | ) |
Returns true if document has been created.
bool Model_Application::hasRoot | ( | ) |
Returns true if root document has been created.
std::shared_ptr< Model_Document > Model_Application::rootDocument | ( | ) |
Returns root document, if created (or null otherwise)
void Model_Application::deleteDocument | ( | const int | theDocID | ) |
Deletes the document from the application.
void Model_Application::deleteAllDocuments | ( | ) |
Deletes all documents existing in the application.
void Model_Application::createDocument | ( | const int | theDocID | ) |
Creates a new document an returns an id of this document.
theDocID | if it is zero, the root document is created |
bool Model_Application::loadDocument | ( | const std::wstring | theDocName, |
const int | theDocID | ||
) |
Loads document by the file name (if it is registered as load by demand)
theDocName | name of the document file |
theDocID | the identifier of the loaded document (to be created) |
void Model_Application::setLoadPath | ( | std::string | thePath | ) |
Set path for the loaded by demand documents.
const std::string & Model_Application::loadPath | ( | ) | const |
Returns the path for the loaded by demand documents.
void Model_Application::setLoadByDemand | ( | std::wstring | theID, |
const int | theDocID | ||
) |
Defines that specified document must be loaded by demand.
bool Model_Application::isLoadByDemand | ( | std::wstring | theID, |
const int | theDocIndex | ||
) |
Returns true if specified document must be loaded by demand.
int Model_Application::generateDocumentId | ( | ) |
produces new unique identifier of the document
Standard_CString Model_Application::ResourcesName | ( | ) |
Return name of resource (i.e. "Standard")
|
virtual |
Return format (i.e "MDTV-Standard")
theFormats | sequence of allowed formats for input/output |