FILETYPE Class Reference

File type definition, including extensions, description, icon and optional delegate for determining if is correct format. More...

#include <mi32/filetype.h>

List of all members.

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 MISTRINGGetDescription () const
const MISTRINGLISTGetExtnList () const
ICONID GetIconID () const
void GetProperties (MISTRING &properties, const FILEPATH &filepath) const
bool IsFormat (FILE_RAW &file) const
FILETYPEoperator= (const FILETYPE &rhs)
void RegisterInCommonSet () const
void SetDelegateIsFormat (DELEGATE_FORMAT delegate)
void SetPropertiesDelegate (PROPERTIES_DELEGATE delegate)

Detailed Description

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.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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
FILETYPE::FILETYPE ( const MISTRING extn,
ICONID  iconid = ICONID_DESKTOP_FILE 
) [explicit]

Construct with MISTRING extension.

Parameters:
extn Single extension, do not include wildcard (*) or period (.).
iconid Icon ID
virtual FILETYPE::~FILETYPE (  )  [virtual]

Destructor.


Member Function Documentation

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.

void FILETYPE::GetProperties ( MISTRING properties,
const FILEPATH filepath 
) const

Get properties.

bool FILETYPE::IsFormat ( FILE_RAW file  )  const

Determine if file is in correct format for type.

Will return true if no delegate.

FILETYPE& FILETYPE::operator= ( const FILETYPE rhs  ) 

Assignment.

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.


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

Generated on Sun Oct 7 21:33:22 2012 for TNTsdk 2012 by  doxygen 1.6.1