Public Types | Public Member Functions | Protected Member Functions | List of all members
idoc::CCompositeDocumentTemplateComp Class Reference

Complex document template consists of more simple templates. More...

#include <CCompositeDocumentTemplateComp.h>

Inheritance diagram for idoc::CCompositeDocumentTemplateComp:
icomp::CComponentBase idoc::IDocumentTemplate icomp::IComponent idoc::IDocumentTypesInfo istd::IPolymorphic istd::IPolymorphic

Public Types

typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from idoc::IDocumentTypesInfo
enum  SupportedFeatures { SF_NEW_DOCUMENT = 0x0001, SF_EDIT_DOCUMENT = 0x0010, SF_DEFAULT = 0xffff }
 Enumeration for supported types of operation with the document. More...
 
typedef QVector< QByteArray > Ids
 

Public Member Functions

virtual bool IsFeatureSupported (int featureFlags, const QByteArray &documentTypeId) const
 Return true, if the feature(s) is supported by this document template. More...
 
virtual Ids GetDocumentTypeIds () const
 Get list of supported document ID's can be created for specified file. More...
 
virtual QString GetDocumentTypeName (const QByteArray &documentTypeId) const
 Get human readable name of some document type ID. More...
 
virtual ifile::IFileTypeInfoGetDocumentFileTypeInfo (const QByteArray &documentTypeId) const
 Get file type information object for some selected document type. More...
 
virtual Ids GetDocumentTypeIdsForFile (const QString &filePath) const
 Get list of supported document ID's can be created for specified file. More...
 
virtual QString GetDefaultDirectory (const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=NULL) const
 Return default directory for specified document type. More...
 
virtual Ids GetViewTypeIds (const QByteArray &documentTypeId) const
 Return supported view type IDs for specified document type. More...
 
virtual QString GetViewTypeName (const QByteArray &documentTypeId, const QByteArray &viewTypeId) const
 Get human readable name of some view type ID. More...
 
virtual ifile::IFilePersistenceGetFileLoader (const QByteArray &documentTypeId) const
 Get file loader/saver for spacified document ID. More...
 
virtual istd::IChangeableCreateDocument (QByteArray &documentTypeId, bool initialize=true, bool beQuiet=false, bool *ignoredFlagPtr=NULL) const
 Creates a document instance for document type documentTypeId. More...
 
virtual istd::IPolymorphicCreateView (const QByteArray &documentTypeId, istd::IChangeable *documentPtr, const QByteArray &viewTypeId=QByteArray()) const
 Creates a view instance for document document of type viewTypeId. More...
 
virtual idoc::IUndoManagerCreateUndoManager (const QByteArray &documentTypeId, istd::IChangeable *documentPtr) const
 Creates an undo manger for a given document documentPtr. More...
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context. More...
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component. More...
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")
 Get access to specified component interface. More...
 
virtual const IComponentContextGetComponentContext () const
 Get access to component context describing all application-specified component information loaded from components registry. More...
 
virtual void SetComponentContext (const icomp::IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 Set component context of this component. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Member Functions

virtual void OnComponentCreated ()
 
virtual void OnComponentDestroyed ()
 
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active. More...
 
virtual const
icomp::IRealComponentStaticInfo
GetComponentStaticInfo () const =0
 Get access to static info of this component. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from icomp::CComponentBase
static const
icomp::IRealComponentStaticInfo
InitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const icomp::IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 

Detailed Description

Complex document template consists of more simple templates.

Definition at line 17 of file CCompositeDocumentTemplateComp.h.

Member Typedef Documentation

Definition at line 22 of file CCompositeDocumentTemplateComp.h.

Member Function Documentation

virtual istd::IChangeable* idoc::CCompositeDocumentTemplateComp::CreateDocument ( QByteArray &  documentTypeId,
bool  initialize = true,
bool  beQuiet = false,
bool *  ignoredFlagPtr = NULL 
) const
virtual

Creates a document instance for document type documentTypeId.

Parameters
documentTypeIdID of document type, can be empty for default document. If document type is undefined (empty), this field will be used to return ID of used type.
initializeIf true, document should be filled with initial data (operation new), otherwise initialization is not needed (e.g. for document loading - filling of data will be done by loader).
ignoredFlagPtroptional output flag indicating that the user canceled this operation.

Implements idoc::IDocumentTemplate.

virtual idoc::IUndoManager* idoc::CCompositeDocumentTemplateComp::CreateUndoManager ( const QByteArray &  documentTypeId,
istd::IChangeable documentPtr 
) const
virtual

Creates an undo manger for a given document documentPtr.

Parameters
documentTypeIdID of document type.
documentPtrpointer to document object.
Returns
pointer to created instance of undo manager or NULL, if creating of undo manager was impossible.

Implements idoc::IDocumentTemplate.

virtual istd::IPolymorphic* idoc::CCompositeDocumentTemplateComp::CreateView ( const QByteArray &  documentTypeId,
istd::IChangeable documentPtr,
const QByteArray &  viewTypeId = QByteArray() 
) const
virtual

Creates a view instance for document document of type viewTypeId.

Parameters
documentTypeIdID of document type.
documentPtrpointer to document object.
viewTypeIdoptional ID specifying view type if more view types are supported.

Implements idoc::IDocumentTemplate.

virtual QString idoc::CCompositeDocumentTemplateComp::GetDefaultDirectory ( const QString &  sugestedDir = "",
const QByteArray *  documentTypeIdPtr = NULL 
) const
virtual

Return default directory for specified document type.

Parameters
sugestedDirtemplate directory sugested by user.
documentTypeIdPtroptional ID of document type.

Implements idoc::IDocumentTypesInfo.

virtual ifile::IFileTypeInfo* idoc::CCompositeDocumentTemplateComp::GetDocumentFileTypeInfo ( const QByteArray &  documentTypeId) const
virtual

Get file type information object for some selected document type.

Parameters
documentTypeIdID of document type as returned by GetDocumentTypeIds().

Implements idoc::IDocumentTypesInfo.

virtual Ids idoc::CCompositeDocumentTemplateComp::GetDocumentTypeIds ( ) const
virtual

Get list of supported document ID's can be created for specified file.

Implements idoc::IDocumentTypesInfo.

virtual Ids idoc::CCompositeDocumentTemplateComp::GetDocumentTypeIdsForFile ( const QString &  filePath) const
virtual

Get list of supported document ID's can be created for specified file.

Implements idoc::IDocumentTypesInfo.

virtual QString idoc::CCompositeDocumentTemplateComp::GetDocumentTypeName ( const QByteArray &  documentTypeId) const
virtual

Get human readable name of some document type ID.

Parameters
documentTypeIdID of document type as returned by GetDocumentTypeIds().

Implements idoc::IDocumentTypesInfo.

virtual ifile::IFilePersistence* idoc::CCompositeDocumentTemplateComp::GetFileLoader ( const QByteArray &  documentTypeId) const
virtual

Get file loader/saver for spacified document ID.

Parameters
documentTypeIdtype ID of document will be loaded/saved.

Implements idoc::IDocumentTemplate.

virtual Ids idoc::CCompositeDocumentTemplateComp::GetViewTypeIds ( const QByteArray &  documentTypeId) const
virtual

Return supported view type IDs for specified document type.

Parameters
documentTypeIdID of document type.

Implements idoc::IDocumentTemplate.

virtual QString idoc::CCompositeDocumentTemplateComp::GetViewTypeName ( const QByteArray &  documentTypeId,
const QByteArray &  viewTypeId 
) const
virtual

Get human readable name of some view type ID.

Implements idoc::IDocumentTemplate.

virtual bool idoc::CCompositeDocumentTemplateComp::IsFeatureSupported ( int  featureFlags,
const QByteArray &  documentTypeId 
) const
virtual

Return true, if the feature(s) is supported by this document template.

Implements idoc::IDocumentTypesInfo.

virtual void idoc::CCompositeDocumentTemplateComp::OnComponentCreated ( )
protectedvirtual

Reimplemented from icomp::CComponentBase.

virtual void idoc::CCompositeDocumentTemplateComp::OnComponentDestroyed ( )
protectedvirtual

Reimplemented from icomp::CComponentBase.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy