|
ACF $AcfVersion:0$
|
Persistence component for files containing plain text. More...
#include <CTextFileLoaderComp.h>
Public Member Functions | |
| virtual bool | IsOperationSupported (const istd::IChangeable *dataObjectPtr, const QString *filePathPtr=NULL, int flags=-1, bool beQuiet=true) const override |
Returns true if object dataObject can be loaded/saved. | |
| virtual ifile::IFilePersistence::OperationState | LoadFromFile (istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const override |
This function loads data data from file filePath. | |
| virtual ifile::IFilePersistence::OperationState | SaveToFile (const istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const override |
This function saves data data to file filePath. | |
| virtual bool | IsDeviceOperationSupported (const istd::IChangeable &dataObject, const QIODevice &device, int deviceOperation) const override |
Returns true if object dataObject can be processed via defined I/O-device. | |
| virtual ifile::IDeviceBasedPersistence::OperationState | ReadFromDevice (istd::IChangeable &data, QIODevice &device, ibase::IProgressManager *progressManagerPtr=nullptr) const override |
This function loads data data from the given I/O-device device. | |
| virtual ifile::IDeviceBasedPersistence::OperationState | WriteToDevice (const istd::IChangeable &data, QIODevice &device, ibase::IProgressManager *progressManagerPtr=nullptr) const override |
This function writes data data to the given I/O-device device. | |
| virtual bool | GetFileExtensions (QStringList &result, const istd::IChangeable *dataObjectPtr=NULL, int flags=-1, bool doAppend=false) const override |
| Get file extensions supported by this loader. | |
| virtual QString | GetTypeDescription (const QString *extensionPtr=NULL) const override |
| Get description of object type associated with single extension. | |
Public Member Functions inherited from icomp::CComponentBase | |
| CComponentBase () | |
| Create component and assign it to specific context. | |
| virtual const icomp::IComponent * | GetParentComponent (bool ownerOnly=false) const override |
| Get parent of this component. | |
| virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="") override |
| Get access to specified component interface. | |
| virtual IComponentContextSharedPtr | GetComponentContext () const override |
| Get access to component context describing all application-specified component information loaded from components registry. | |
| virtual void | SetComponentContext (const IComponentContextSharedPtr &contextPtr, const icomp::IComponent *parentPtr, bool isParentOwner) override |
| Set component context of this component. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Additional Inherited Members | |
Protected Member Functions inherited from icomp::CComponentBase | |
| bool | IsComponentActive () const |
| Check if component is active. | |
| virtual void | OnComponentCreated () |
| virtual void | OnComponentDestroyed () |
| virtual const icomp::IRealComponentStaticInfo & | GetComponentStaticInfo () const =0 |
| Get access to static info of this component. | |
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()) |
Persistence component for files containing plain text.
This component handles loading and saving of plain text files. It implements the IFilePersistence interface to integrate with the ACF file I/O framework and IFileTypeInfo to provide file type metadata.
The loader supports multiple file extensions and can provide different type descriptions for each extension.
The component automatically handles:
Definition at line 62 of file CTextFileLoaderComp.h.
Definition at line 65 of file CTextFileLoaderComp.h.
|
overridevirtual |
Get file extensions supported by this loader.
| result | list of extensions, e.g. {"txt", "doc"}. |
| dataObjectPtr | optional pointer to data object for which all possible extensions are requested. It can be NULL if any object is meant. |
| flags | set of flags |
| doAppend | if true, list of extensions should be appended to existing list. |
Implements ifile::IFileTypeInfo.
|
overridevirtual |
Get description of object type associated with single extension.
Implements ifile::IFileTypeInfo.
|
overridevirtual |
Returns true if object dataObject can be processed via defined I/O-device.
| dataObject | data object should be red/written. |
Implements ifile::IDeviceBasedPersistence.
|
overridevirtual |
Returns true if object dataObject can be loaded/saved.
| dataObjectPtr | optional pointer to data object should be loaded/stored. It can be NULL if any object is meant. |
| filePathPtr | optional pointer to file should be loaded/stored. It can be NULL if any file is meant. If it points at empty string, anonymous loading is mean. |
| flags | combination of flags defined in QueryFlags and ifile::IFileTypeInfo::QueryFlags. |
| beQuiet | if true, no user message output is allowed. |
Implements ifile::IFilePersistence.
|
overridevirtual |
This function loads data data from file filePath.
Implements ifile::IFilePersistence.
|
overridevirtual |
This function loads data data from the given I/O-device device.
Implements ifile::IDeviceBasedPersistence.
|
overridevirtual |
This function saves data data to file filePath.
Implements ifile::IFilePersistence.
|
overridevirtual |
This function writes data data to the given I/O-device device.
Implements ifile::IDeviceBasedPersistence.