CFileTypeInfoComp.h
Go to the documentation of this file.
1 #ifndef ifile_CFileTypeInfoComp_included
2 #define ifile_CFileTypeInfoComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 #include <ifile/IFileTypeInfo.h>
8 
9 
10 namespace ifile
11 {
12 
13 
20  public icomp::CComponentBase,
21  virtual public ifile::IFileTypeInfo
22 {
23 public:
25 
26  I_BEGIN_COMPONENT(CFileTypeInfoComp);
27  I_REGISTER_INTERFACE(ifile::IFileTypeInfo);
28  I_ASSIGN_MULTI_0(m_fileExtensionsAttrPtr, "FileExtensions", "List of supported file extensions", false);
29  I_ASSIGN_MULTI_0(m_typeDescriptionsAttrPtr, "TypeDescriptions", "List of descriptions for each extension", false);
30  I_ASSIGN_MULTI_0(m_fileExtensionsWinAttrPtr, "FileExtensionsWin", "List of supported file extensions for Windows systems only", false);
31  I_ASSIGN_MULTI_0(m_typeDescriptionsWinAttrPtr, "TypeDescriptionsWin", "List of descriptions for each extension for Windows systems only", false);
32  I_ASSIGN_MULTI_0(m_fileExtensionsMacAttrPtr, "FileExtensionsMac", "List of supported file extensions for MAC systems only", false);
33  I_ASSIGN_MULTI_0(m_typeDescriptionsMacAttrPtr, "TypeDescriptionsMac", "List of descriptions for each extension for MAC systems only", false);
34  I_ASSIGN_MULTI_0(m_fileExtensionsUnxAttrPtr, "FileExtensionsUnx", "List of supported file extensions for Unix-type systems only (without MAC)", false);
35  I_ASSIGN_MULTI_0(m_typeDescriptionsUnxAttrPtr, "TypeDescriptionsUnx", "List of descriptions for each extension for Unix-type systems only (without MAC)", false);
36  I_END_COMPONENT;
37 
38  // reimplemented (ifile::IFileTypeInfo)
39  virtual bool GetFileExtensions(QStringList& result, const istd::IChangeable* dataObjectPtr = NULL, int flags = -1, bool doAppend = false) const;
40  virtual QString GetTypeDescription(const QString* extensionPtr = NULL) const;
41 
42 private:
43  I_MULTIATTR(QString, m_fileExtensionsAttrPtr);
44  I_MULTITEXTATTR(m_typeDescriptionsAttrPtr);
45  I_MULTIATTR(QString, m_fileExtensionsWinAttrPtr);
46  I_MULTITEXTATTR(m_typeDescriptionsWinAttrPtr);
47  I_MULTIATTR(QString, m_fileExtensionsMacAttrPtr);
48  I_MULTITEXTATTR(m_typeDescriptionsMacAttrPtr);
49  I_MULTIATTR(QString, m_fileExtensionsUnxAttrPtr);
50  I_MULTITEXTATTR(m_typeDescriptionsUnxAttrPtr);
51 };
52 
53 
54 } // namespace ifile
55 
56 
57 #endif // !ifile_CFileTypeInfoComp_included
58 
59 
Provide loading and saving of objects.
Definition: IFileTypeInfo.h:22
Base class for component implementation.
virtual QString GetTypeDescription(const QString *extensionPtr=NULL) const
Get description of object type associated with single extension.
Simple implementation of ifile::IFileTypeInfo using user defined extension list and descriptions...
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
icomp::CComponentBase BaseClass
#define NULL
Definition: istd.h:64
virtual bool GetFileExtensions(QStringList &result, const istd::IChangeable *dataObjectPtr=NULL, int flags=-1, bool doAppend=false) const
Get file extensions supported by this loader.

© 2007-2017 Witold Gantzke and Kirill Lepskiy