![]() |
XII Release 0.1.0
|
Copyright (c) Theophilus Eriata. All Rights Reserved. More...
#include <DocumentManager.h>
Classes | |
| struct | Event |
| struct | Request |
Public Types | |
| using | CustomAction = xiiVariant (*)(const xiiDocument*) |
Public Member Functions | |
| xiiStatus | CanOpenDocument (xiiStringView sFilePath) const |
| xiiStatus | CreateDocument (xiiStringView sDocumentTypeName, xiiStringView sPath, xiiDocument *&out_pDocument, xiiBitflags< xiiDocumentFlags > flags=xiiDocumentFlags::None, const xiiDocumentObject *pOpenContext=nullptr) |
| xiiStatus | OpenDocument (xiiStringView sDocumentTypeName, xiiStringView sPath, xiiDocument *&out_pDocument, xiiBitflags< xiiDocumentFlags > flags=xiiDocumentFlags::AddToRecentFilesList|xiiDocumentFlags::RequestWindow, const xiiDocumentObject *pOpenContext=nullptr) |
| virtual xiiStatus | CloneDocument (xiiStringView sPath, xiiStringView sClonePath, xiiUuid &inout_cloneGuid) |
| void | CloseDocument (xiiDocument *pDocument) |
| void | EnsureWindowRequested (xiiDocument *pDocument, const xiiDocumentObject *pOpenContext=nullptr) |
| const xiiDynamicArray< xiiDocument * > & | GetAllOpenDocuments () const |
| Returns a list of all currently open documents that are managed by this document manager. | |
| xiiDocument * | GetDocumentByPath (xiiStringView sPath) const |
| bool | EnsureDocumentIsClosed (xiiStringView sPath) |
| void | CloseAllDocumentsOfManager () |
| void | GetSupportedDocumentTypes (xiiDynamicArray< const xiiDocumentTypeDescriptor * > &inout_documentTypes) const |
| Public Member Functions inherited from xiiReflectedClass | |
| virtual const xiiRTTI * | GetDynamicRTTI () const |
| bool | IsInstanceOf (const xiiRTTI *pType) const |
| Returns whether the type of this instance is of the given type or derived from it. | |
| template<typename T> | |
| XII_ALWAYS_INLINE bool | IsInstanceOf () const |
| Returns whether the type of this instance is of the given type or derived from it. | |
Static Public Member Functions | |
| static const xiiHybridArray< xiiDocumentManager *, 16 > & | GetAllDocumentManagers () |
| static xiiResult | FindDocumentTypeFromPath (xiiStringView sPath, bool bForCreation, const xiiDocumentTypeDescriptor *&out_pTypeDesc) |
| static xiiDocument * | GetDocumentByGuid (const xiiUuid &guid) |
| static bool | EnsureDocumentIsClosedInAllManagers (xiiStringView sPath) |
| static void | CloseAllDocuments () |
| static const xiiDocumentTypeDescriptor * | GetDescriptorForDocumentType (xiiStringView sDocumentType) |
| static const xiiMap< xiiString, const xiiDocumentTypeDescriptor * > & | GetAllDocumentDescriptors () |
| Static Public Member Functions inherited from xiiNoBase | |
| static const xiiRTTI * | GetStaticRTTI () |
Static Public Attributes | |
| static xiiCopyOnBroadcastEvent< const Event & > | s_Events |
| static xiiEvent< Request & > | s_Requests |
| static xiiMap< xiiString, CustomAction > | s_CustomActions |
Protected Member Functions | |
| virtual void | InternalCloneDocument (xiiStringView sPath, xiiStringView sClonePath, const xiiUuid &documentId, const xiiUuid &seedGuid, const xiiUuid &cloneGuid, xiiAbstractObjectGraph *pHeader, xiiAbstractObjectGraph *pObjects, xiiAbstractObjectGraph *pTypes) |
Private Member Functions | |
| virtual xiiStatus | InternalCreateDocument (xiiStringView sDocumentTypeName, xiiStringView sPath, bool bCreateNewDocument, xiiDocument *&out_pDocument, const xiiDocumentObject *pOpenContext)=0 |
Copyright (c) Theophilus Eriata. All Rights Reserved.
| xiiStatus xiiDocumentManager::CreateDocument | ( | xiiStringView | sDocumentTypeName, |
| xiiStringView | sPath, | ||
| xiiDocument *& | out_pDocument, | ||
| xiiBitflags< xiiDocumentFlags > | flags = xiiDocumentFlags::None, | ||
| const xiiDocumentObject * | pOpenContext = nullptr ) |
Creates a new document.
| szDocumentTypeName | Document type to create. See xiiDocumentTypeDescriptor. |
| szPath | Absolute path to the document to be created. |
| out_pDocument | Out parameter for the resulting xiiDocument. Will be nullptr on failure. |
| flags | Flags to define various options like whether a window should be created. |
| pOpenContext | An generic context object. Allows for custom data to be passed along into the construction. E.g. inform a sub-document which main document it belongs to. |
| bool xiiDocumentManager::EnsureDocumentIsClosed | ( | xiiStringView | sPath | ) |
If the given document is open, it will be closed. User is not asked about it, unsaved changes are discarded. Returns true if the document was open and needed to be closed. This function only operates on documents opened by this manager. Use EnsureDocumentIsClosedInAllManagers() to close documents of any type.
|
static |
If the given document is open, it will be closed. User is not asked about it, unsaved changes are discarded. Returns true if the document was open and needed to be closed.
|
privatepure virtual |
Constructs a document, including its initial content. On failure the manager destroys any returned document. A successful factory must return a non-null document. Loading, registration and window events follow only on success.
Implemented in xiiAnimatedMeshAssetDocumentManager, xiiAnimationClipAssetDocumentManager, xiiAnimationGraphAssetManager, xiiBlackboardTemplateAssetDocumentManager, xiiCollectionAssetDocumentManager, xiiColorGradientAssetDocumentManager, xiiCurve1DAssetDocumentManager, xiiCustomDataAssetDocumentManager, xiiDecalAssetDocumentManager, xiiImageDataAssetDocumentManager, xiiLUTAssetDocumentManager, xiiMaterialAssetDocumentManager, xiiMeshAssetDocumentManager, xiiPropertyAnimAssetDocumentManager, xiiRenderPipelineAssetManager, xiiSceneDocumentManager, xiiSkeletonAssetDocumentManager, xiiStateMachineAssetManager, xiiSurfaceAssetDocumentManager, xiiTextureAssetDocumentManager, xiiTextureCubeAssetDocumentManager, and xiiVisualScriptClassAssetManager.
| xiiStatus xiiDocumentManager::OpenDocument | ( | xiiStringView | sDocumentTypeName, |
| xiiStringView | sPath, | ||
| xiiDocument *& | out_pDocument, | ||
| xiiBitflags< xiiDocumentFlags > | flags = xiiDocumentFlags::AddToRecentFilesList | xiiDocumentFlags::RequestWindow, | ||
| const xiiDocumentObject * | pOpenContext = nullptr ) |
Opens an existing document.
| szDocumentTypeName | Document type to open. See xiiDocumentTypeDescriptor. |
| szPath | Absolute path to the document to be opened. |
| out_pDocument | Out parameter for the resulting xiiDocument. Will be nullptr on failure. |
| flags | Flags to define various options like whether a window should be created. |
| pOpenContext | An generic context object. Allows for custom data to be passed along into the construction. E.g. inform a sub-document which main document it belongs to. |