Public Types | Public Member Functions | Protected Member Functions | List of all members
ifile::CTextFileLogStreamerComp Class Reference

Message container displaying messages as log list. More...

#include <CTextFileLogStreamerComp.h>

Inheritance diagram for ifile::CTextFileLogStreamerComp:
ilog::CStreamLogCompBase ifile::IFilePersistence ilog::CLogCompBase ifile::IFileTypeInfo ilog::TMessageDelegatorComp< icomp::CComponentBase > istd::IPolymorphic icomp::CComponentBase ilog::IMessageConsumer icomp::IComponent istd::IPolymorphic istd::IPolymorphic

Public Types

typedef ilog::CStreamLogCompBase BaseClass
 
- Public Types inherited from ilog::CStreamLogCompBase
typedef ilog::CLogCompBase BaseClass
 
- Public Types inherited from ilog::CLogCompBase
typedef
ilog::TMessageDelegatorComp
< icomp::CComponentBase
BaseClass
 
typedef QObject BaseClass2
 
- Public Types inherited from ilog::TMessageDelegatorComp< icomp::CComponentBase >
typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from ilog::IMessageConsumer
typedef istd::TSmartPtr< const
istd::IInformationProvider
MessagePtr
 
- Public Types inherited from ifile::IFilePersistence
enum  OperationState { OS_OK, OS_CANCELED, OS_FAILED }
 Result of operation. More...
 
enum  ErrorType { ET_NO_WRITE_PERMISSIONS, ET_NO_READ_PERMISSIONS, ET_FILE_NOT_EXIST }
 Possible file I/O errors. More...
 
enum  MessageId {
  MI_BAD_OBJECT_TYPE = 0xabf0, MI_CANNOT_LOAD, MI_CANNOT_SAVE, MI_BAD_EXTENSION,
  MI_FILE_NOT_EXIST, MI_UNSUPPORTED_VERSION
}
 List of possible message IDs used in context of this interface. More...
 
- Public Types inherited from ifile::IFileTypeInfo
enum  QueryFlags {
  QF_LOAD = 1 << 0, QF_SAVE = 1 << 1, QF_FILE = 1 << 2, QF_DIRECTORY = 1 << 3,
  QF_ANONYMOUS = 1 << 4
}
 Describe detailed options of query. More...
 

Public Member Functions

 CTextFileLogStreamerComp ()
 
virtual bool IsOperationSupported (const istd::IChangeable *dataObjectPtr, const QString *filePathPtr=NULL, int flags=-1, bool beQuiet=true) const
 Returns true if object dataObject can be loaded/saved. More...
 
virtual int LoadFromFile (istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const
 This function loads data data from file filePath. More...
 
virtual int SaveToFile (const istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const
 This function saves data data to file filePath. More...
 
virtual bool GetFileExtensions (QStringList &result, const istd::IChangeable *dataObjectPtr=NULL, int flags=-1, bool doAppend=false) const
 Get file extensions supported by this loader. More...
 
virtual QString GetTypeDescription (const QString *extensionPtr=NULL) const
 Get description of object type associated with single extension. More...
 
- Public Member Functions inherited from ilog::CStreamLogCompBase
 CStreamLogCompBase ()
 
istd::IInformationProvider::InformationCategory GetWorseCategory () const
 Get worse category (highest code) of all outputed messages. More...
 
virtual bool IsMessageSupported (int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const
 Check if some messge is supported. More...
 
- Public Member Functions inherited from ilog::CLogCompBase
 CLogCompBase ()
 
virtual void AddMessage (const MessagePtr &messagePtr)
 Adds a message item to the container. 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 WriteText (const QString &text, istd::IInformationProvider::InformationCategory category)
 Write a text line to the output stream. More...
 
virtual void OnComponentCreated ()
 
virtual void OnComponentDestroyed ()
 
- Protected Member Functions inherited from ilog::CStreamLogCompBase
virtual void WriteMessageToStream (const istd::IInformationProvider &message)
 Write formatted message to the output stream. More...
 
virtual QString GenerateMessageText (const istd::IInformationProvider &message) const
 Generate formatted message text for the output. More...
 
virtual void WriteMessageToLog (const MessagePtr &messagePtr)
 
- 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

- Signals inherited from ilog::CLogCompBase
void EmitAddMessage (const MessagePtr &messagePtr)
 
- 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

Message container displaying messages as log list.

Definition at line 22 of file CTextFileLogStreamerComp.h.

Member Typedef Documentation

Definition at line 27 of file CTextFileLogStreamerComp.h.

Constructor & Destructor Documentation

ifile::CTextFileLogStreamerComp::CTextFileLogStreamerComp ( )

Member Function Documentation

virtual bool ifile::CTextFileLogStreamerComp::GetFileExtensions ( QStringList &  result,
const istd::IChangeable dataObjectPtr = NULL,
int  flags = -1,
bool  doAppend = false 
) const
virtual

Get file extensions supported by this loader.

Parameters
resultlist of extensions, e.g. {"txt", "doc"}.
dataObjectPtroptional pointer to data object for which all possible extensions are requested. It can be NULL if any object is meant.
flagsset of flags
See Also
QueryFlags.
Parameters
doAppendif true, list of extensions should be appended to existing list.

Implements ifile::IFileTypeInfo.

virtual QString ifile::CTextFileLogStreamerComp::GetTypeDescription ( const QString *  extensionPtr = NULL) const
virtual

Get description of object type associated with single extension.

Implements ifile::IFileTypeInfo.

virtual bool ifile::CTextFileLogStreamerComp::IsOperationSupported ( const istd::IChangeable dataObjectPtr,
const QString *  filePathPtr = NULL,
int  flags = -1,
bool  beQuiet = true 
) const
virtual

Returns true if object dataObject can be loaded/saved.

Parameters
dataObjectPtroptional pointer to data object should be loaded/stored. It can be NULL if any object is meant.
filePathPtroptional 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.
flagscombination of flags defined in QueryFlags and ifile::IFileTypeInfo::QueryFlags.
beQuietif true, no user message output is allowed.

Implements ifile::IFilePersistence.

virtual int ifile::CTextFileLogStreamerComp::LoadFromFile ( istd::IChangeable data,
const QString &  filePath = QString(),
ibase::IProgressManager progressManagerPtr = NULL 
) const
virtual

This function loads data data from file filePath.

Returns
File loading state.
See Also
OperationState

Implements ifile::IFilePersistence.

virtual void ifile::CTextFileLogStreamerComp::OnComponentCreated ( )
protectedvirtual

Reimplemented from icomp::CComponentBase.

virtual void ifile::CTextFileLogStreamerComp::OnComponentDestroyed ( )
protectedvirtual

Reimplemented from ilog::CStreamLogCompBase.

virtual int ifile::CTextFileLogStreamerComp::SaveToFile ( const istd::IChangeable data,
const QString &  filePath = QString(),
ibase::IProgressManager progressManagerPtr = NULL 
) const
virtual

This function saves data data to file filePath.

Returns
File saving state.
See Also
OperationState

Implements ifile::IFilePersistence.

virtual void ifile::CTextFileLogStreamerComp::WriteText ( const QString &  text,
istd::IInformationProvider::InformationCategory  category 
)
protectedvirtual

Write a text line to the output stream.

Implements ilog::CStreamLogCompBase.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy