File type definition, including extensions, description, icon and optional delegate for determining if is correct format. More...
#include <mi32/filetype.h>
Public Types | |
| typedef fastdelegate::FastDelegate < bool(FILE_RAW &)> | DELEGATE_FORMAT |
| typedef fastdelegate::FastDelegate < void(MISTRING &, const FILEPATH &)> | PROPERTIES_DELEGATE |
Public Member Functions | |
| FILETYPE (const MISTRING &extn, ICONID iconid=ICONID_DESKTOP_FILE) | |
| FILETYPE (const char *extns, ICONID iconid, const TEXTID description, DELEGATE_FORMAT formatdelegate, PROPERTIES_DELEGATE propertiesdelegate) | |
| FILETYPE (const char *extns, ICONID iconid, const TEXTID description, PROPERTIES_DELEGATE delegate) | |
| FILETYPE (const char *extns, ICONID iconid, const TEXTID description, DELEGATE_FORMAT delegate) | |
| FILETYPE (const char *extns, ICONID iconid=ICONID_DESKTOP_FILE, const TEXTID description=TEXTID__None) | |
| FILETYPE (const FILETYPE &rhs) | |
| FILETYPE () | |
| virtual | ~FILETYPE () |
| bool | CanCheckIsFormat () const |
| const MISTRING & | GetDescription () const |
| const MISTRINGLIST & | GetExtnList () const |
| ICONID | GetIconID () const |
| void | GetProperties (MISTRING &properties, const FILEPATH &filepath) const |
| bool | IsFormat (FILE_RAW &file) const |
| FILETYPE & | operator= (const FILETYPE &rhs) |
| void | RegisterInCommonSet () const |
| void | SetDelegateIsFormat (DELEGATE_FORMAT delegate) |
| void | SetPropertiesDelegate (PROPERTIES_DELEGATE delegate) |
File type definition, including extensions, description, icon and optional delegate for determining if is correct format.
Instances are reference counted so may be copied efficiently.
| typedef fastdelegate::FastDelegate<bool(FILE_RAW&)> FILETYPE::DELEGATE_FORMAT |
Delegate to determine if file is of defined type.
| typedef fastdelegate::FastDelegate<void(MISTRING&, const FILEPATH&)> FILETYPE::PROPERTIES_DELEGATE |
Delegate to get properties.
| FILETYPE::FILETYPE | ( | ) |
Default constructor.
| FILETYPE::FILETYPE | ( | const FILETYPE & | rhs | ) |
Copy constructor.
| FILETYPE::FILETYPE | ( | const char * | extns, | |
| ICONID | iconid = ICONID_DESKTOP_FILE, |
|||
| const TEXTID | description = TEXTID__None | |||
| ) | [explicit] |
Construct with char* extension(s), description, icon and no delegate.
| extns | One or more extensions, separated by space, do not include wildcard (*) or period (.), blank if no extension. | |
| iconid | Icon ID | |
| description | Description TEXTID, if not provided will determine from extensions |
| FILETYPE::FILETYPE | ( | const char * | extns, | |
| ICONID | iconid, | |||
| const TEXTID | description, | |||
| DELEGATE_FORMAT | delegate | |||
| ) |
Construct with char* extension(s), description, icon and format delegate.
| extns | One or more extensions, separated by space, do not include wildcard (*) or period (.), blank if no extension. | |
| iconid | Icon ID | |
| description | Description TEXTID, if none provided will determine from extensions | |
| delegate | Delegate to test if file is actually of specified type |
| FILETYPE::FILETYPE | ( | const char * | extns, | |
| ICONID | iconid, | |||
| const TEXTID | description, | |||
| PROPERTIES_DELEGATE | delegate | |||
| ) |
Construct with char* extension(s), description, icon and properties delegate.
| extns | One or more extensions, separated by space, do not include wildcard (*) or period (.), blank if no extension. | |
| iconid | Icon ID | |
| description | Description TEXTID, if none provided will determine from extensions | |
| delegate | Delegate to get properties |
| FILETYPE::FILETYPE | ( | const char * | extns, | |
| ICONID | iconid, | |||
| const TEXTID | description, | |||
| DELEGATE_FORMAT | formatdelegate, | |||
| PROPERTIES_DELEGATE | propertiesdelegate | |||
| ) |
Construct with char* extension(s), description, icon, format delegate and properties delegate.
| extns | One or more extensions, separated by space, do not include wildcard (*) or period (.), blank if no extension. | |
| iconid | Icon ID | |
| description | Description TEXTID, if none provided will determine from extensions | |
| formatdelegate | Delegate to test if file is actually of specified type | |
| propertiesdelegate | Delegate to get properties |
Construct with MISTRING extension.
| extn | Single extension, do not include wildcard (*) or period (.). | |
| iconid | Icon ID |
| virtual FILETYPE::~FILETYPE | ( | ) | [virtual] |
Destructor.
| bool FILETYPE::CanCheckIsFormat | ( | ) | const |
Determine if can check if file is correct format.
| const MISTRING& FILETYPE::GetDescription | ( | ) | const |
Get file type description.
| const MISTRINGLIST& FILETYPE::GetExtnList | ( | ) | const |
Get extension list.
| ICONID FILETYPE::GetIconID | ( | ) | const |
Get icon ID.
Get properties.
| bool FILETYPE::IsFormat | ( | FILE_RAW & | file | ) | const |
Determine if file is in correct format for type.
Will return true if no delegate.
| void FILETYPE::RegisterInCommonSet | ( | ) | const |
Register this type in common set.
| void FILETYPE::SetDelegateIsFormat | ( | DELEGATE_FORMAT | delegate | ) |
Set delegate to test if file is actually of specified type.
| void FILETYPE::SetPropertiesDelegate | ( | PROPERTIES_DELEGATE | delegate | ) |
Set delegate to get properties.
1.6.1