OCC Main Page | ApplicationFramework | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

# ApplicationFramework
TKCDF
CDF

# CDF_Application Class Reference

`#include <CDF_Application.hxx>`

Inheritance diagram for CDF_Application:

[legend]

## Public Member Functions
Standard_EXPORT void | Open (const Handle(CDM_Document)&aDocument)
| puts the document in the current session directory and calls the virtual method Activate on it.
Standard_EXPORT CDM_CanCloseStatus | CanClose (const Handle(CDM_Document)&aDocument)
Standard_EXPORT void | Close (const Handle(CDM_Document)&aDocument)
| removes the document of the current session directory and closes the document;
Standard_EXPORT Handle_CDM_Document | Retrieve (const TCollection_ExtendedString &aFolder, const TCollection_ExtendedString &aName, const Standard_Boolean UseStorageConfiguration=Standard_True)
| This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. The content of {aFolder}, {aName} and {aVersion} depends on the Database Manager system. If the DBMS is only based on the OS, {aFolder} is a directory and {aName} is the name of a file. In this case the use of the syntax with {aVersion} has no sense. For example: .
Standard_EXPORT Handle_CDM_Document | Retrieve (const TCollection_ExtendedString &aFolder, const TCollection_ExtendedString &aName, const TCollection_ExtendedString &aVersion, const Standard_Boolean UseStorageConfiguration=Standard_True)
| This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. -- If the DBMS is only based on the OS, this syntax should not be used. If the DBMS is EUCLID/Design Manager, {aFolder}, {aName} and {aVersion} have the form they have in EUCLID/Design Manager. For example: Handle(CDM_Document) theDocument=myApplication->Retrieve("|user|cascade","box","2"); A link is kept with the database through an instance of CDM_MetaData .
Standard_EXPORT CDF_RetrievableStatus | CanRetrieve (const TCollection_ExtendedString &aFolder, const TCollection_ExtendedString &aName)
Standard_EXPORT CDF_RetrievableStatus | CanRetrieve (const TCollection_ExtendedString &aFolder, const TCollection_ExtendedString &aName, const TCollection_ExtendedString &aVersion)
virtual Standard_EXPORT void | Formats (TColStd_SequenceOfExtendedString &Formats)=0
CDF_RetrievableStatus | GetRetrieveStatus () const
| Checks status after Retrieve .
Standard_EXPORT Standard_Boolean | FindReader (const TCollection_ExtendedString &aFileName)
Standard_EXPORT Handle_PCDM_Reader | Reader (const TCollection_ExtendedString &aFileName)
Standard_EXPORT Standard_Boolean | FindReaderFromFormat (const TCollection_ExtendedString &aFormat)
Standard_EXPORT Handle_PCDM_Reader | ReaderFromFormat (const TCollection_ExtendedString &aFormat)
Standard_EXPORT Standard_Boolean | Format (const TCollection_ExtendedString &aFileName, TCollection_ExtendedString &theFormat)
| try to retrieve a Format directly in the file or in application resource by using extension. returns True if found;
Standard_EXPORT Standard_ExtString | DefaultFolder ()
Standard_EXPORT Standard_Boolean | SetDefaultFolder (const Standard_ExtString aFolder)
Standard_EXPORT Standard_ExtString | DefaultExtension ()
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const
## Static Public Member Functions
static Standard_EXPORT Handle_CDF_Application | Load (const Standard_GUID &aGUID)
| plugs an application. Open is used - for opening a Document that has been created in an application - for opening a Document from the database - for opening a Document from a file. The Open methods always add the document in the session directory and calls the virtual Activate method. The document is considered to be opened until Close is used. To be storable, a document must be opened by an application since the application resources are needed to store it.
## Protected Member Functions
Standard_EXPORT | CDF_Application ()
## Protected Attributes
CDF_RetrievableStatus | myRetrievableStatus
## Private Member Functions
virtual Standard_EXPORT void | Activate (const Handle(CDM_Document)&aDocument, const CDF_TypeOfActivation aTypeOfActivation)
| Informs the application that aDocument has been activated. A document is activated when it is created or retrieved. aTypeOfActivation will be: - CDF_TOA_New if the document is a new one (even empty or retrieved from the database for the first time). - CDF_TOA_Unchanged if the document was already retrieved but had no changes since the previous retrieval. - CDF_TOA_Modified if the document was already retrieved and modified since the previous retrieval. You do not need to call <activate>, but you should redefine this method to implement application specific behavior. .
Standard_EXPORT Handle_CDM_Document | Retrieve (const Handle(CDM_MetaData)&aMetaData, const Standard_Boolean UseStorageConfiguration)
Standard_EXPORT Handle_CDM_Document | Retrieve (const Handle(CDM_MetaData)&aMetaData, const Standard_Boolean UseStorageConfiguration, const Standard_Boolean IsComponent)
Standard_EXPORT Standard_Integer | DocumentVersion (const Handle(CDM_MetaData)&theMetaData)
| returns -1 if the metadata has no modification counter.
Standard_EXPORT Standard_Boolean | FindReader (const TCollection_ExtendedString &aFileName, Standard_GUID &PluginIn, TCollection_ExtendedString &ResourceName)
Standard_EXPORT Standard_Boolean | FindReaderFromFormat (const TCollection_ExtendedString &aFormat, Standard_GUID &PluginIn, TCollection_ExtendedString &ResourceName)
Standard_EXPORT CDF_TypeOfActivation | TypeOfActivation (const Handle(CDM_MetaData)&aMetaData)
Standard_EXPORT CDF_RetrievableStatus | CanRetrieve (const Handle(CDM_MetaData)&aMetaData)
## Private Attributes
TCollection_ExtendedString | myDefaultFolder

## Constructor & Destructor Documentation

Standard_EXPORT CDF_Application::CDF_Application | ( |  | ) | `[protected]`

## Member Function Documentation

virtual Standard_EXPORT void CDF_Application::Activate | ( | const Handle(CDM_Document)& | aDocument,
|  | const CDF_TypeOfActivation | aTypeOfActivation
| ) | `[private, virtual]`

Standard_EXPORT CDM_CanCloseStatus CDF_Application::CanClose | ( | const Handle(CDM_Document)& | aDocument | ) |

Standard_EXPORT CDF_RetrievableStatus CDF_Application::CanRetrieve | ( | const Handle(CDM_MetaData)& | aMetaData | ) | `[private]`

Standard_EXPORT CDF_RetrievableStatus CDF_Application::CanRetrieve | ( | const TCollection_ExtendedString & | aFolder,
|  | const TCollection_ExtendedString & | aName,
|  | const TCollection_ExtendedString & | aVersion
| ) |

Standard_EXPORT CDF_RetrievableStatus CDF_Application::CanRetrieve | ( | const TCollection_ExtendedString & | aFolder,
|  | const TCollection_ExtendedString & | aName
| ) |

Standard_EXPORT void CDF_Application::Close | ( | const Handle(CDM_Document)& | aDocument | ) |

Standard_EXPORT Standard_ExtString CDF_Application::DefaultExtension | ( |  | ) |

Standard_EXPORT Standard_ExtString CDF_Application::DefaultFolder | ( |  | ) |

Standard_EXPORT Standard_Integer CDF_Application::DocumentVersion | ( | const Handle(CDM_MetaData)& | theMetaData | ) | `[private, virtual]`

| Implements CDM_Application.

Standard_EXPORT Standard_Boolean CDF_Application::FindReader | ( | const TCollection_ExtendedString & | aFileName,
|  | Standard_GUID & | PluginIn,
|  | TCollection_ExtendedString & | ResourceName
| ) | `[private]`

Standard_EXPORT Standard_Boolean CDF_Application::FindReader | ( | const TCollection_ExtendedString & | aFileName | ) |

Standard_EXPORT Standard_Boolean CDF_Application::FindReaderFromFormat | ( | const TCollection_ExtendedString & | aFormat,
|  | Standard_GUID & | PluginIn,
|  | TCollection_ExtendedString & | ResourceName
| ) | `[private]`

Standard_EXPORT Standard_Boolean CDF_Application::FindReaderFromFormat | ( | const TCollection_ExtendedString & | aFormat | ) |

Standard_EXPORT Standard_Boolean CDF_Application::Format | ( | const TCollection_ExtendedString & | aFileName,
|  | TCollection_ExtendedString & | theFormat
| ) |

virtual Standard_EXPORT void CDF_Application::Formats | ( | TColStd_SequenceOfExtendedString & | Formats | ) | `[pure virtual]`

| Implemented in AppStd_Application, AppStdL_Application, TDocStd_Application, and TObj_Application.

CDF_RetrievableStatus CDF_Application::GetRetrieveStatus | ( |  | ) | const`[inline]`

Standard_EXPORT const CDF_Application::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from CDM_Application. Reimplemented in AppStd_Application, AppStdL_Application, and TDocStd_Application.

static Standard_EXPORT Handle_CDF_Application CDF_Application::Load | ( | const Standard_GUID & | aGUID | ) | `[static]`

Standard_EXPORT void CDF_Application::Open | ( | const Handle(CDM_Document)& | aDocument | ) |

Standard_EXPORT Handle_PCDM_Reader CDF_Application::Reader | ( | const TCollection_ExtendedString & | aFileName | ) |

Standard_EXPORT Handle_PCDM_Reader CDF_Application::ReaderFromFormat | ( | const TCollection_ExtendedString & | aFormat | ) |

Standard_EXPORT Handle_CDM_Document CDF_Application::Retrieve | ( | const Handle(CDM_MetaData)& | aMetaData,
|  | const Standard_Boolean | UseStorageConfiguration,
|  | const Standard_Boolean | IsComponent
| ) | `[private]`

Standard_EXPORT Handle_CDM_Document CDF_Application::Retrieve | ( | const Handle(CDM_MetaData)& | aMetaData,
|  | const Standard_Boolean | UseStorageConfiguration
| ) | `[private, virtual]`

| Implements CDM_Application.

Standard_EXPORT Handle_CDM_Document CDF_Application::Retrieve | ( | const TCollection_ExtendedString & | aFolder,
|  | const TCollection_ExtendedString & | aName,
|  | const TCollection_ExtendedString & | aVersion,
|  | const Standard_Boolean | UseStorageConfiguration = `Standard_True`
| ) |

Standard_EXPORT Handle_CDM_Document CDF_Application::Retrieve | ( | const TCollection_ExtendedString & | aFolder,
|  | const TCollection_ExtendedString & | aName,
|  | const Standard_Boolean | UseStorageConfiguration = `Standard_True`
| ) |

Standard_EXPORT Standard_Boolean CDF_Application::SetDefaultFolder | ( | const Standard_ExtString | aFolder | ) |

Standard_EXPORT CDF_TypeOfActivation CDF_Application::TypeOfActivation | ( | const Handle(CDM_MetaData)& | aMetaData | ) | `[private]`

## Field Documentation

TCollection_ExtendedString CDF_Application::myDefaultFolder`[private]`

CDF_RetrievableStatus CDF_Application::myRetrievableStatus`[protected]`

The documentation for this class was generated from the following files:

- CDF_Application.hxx
- CDF_Application.lxx