# TMCFileType Class Reference
[MCCore]

Inheritance diagram for TMCFileType:

List of all members.

## Public Member Functions
| TMCFileType ()
| TMCFileType (const MCFileTypeID &typeID, MCTypeFamilyID familyTypeID)
MCFileTypeID | GetID () const
void | SetID (const MCFileTypeID &id)
void | GetName (TMCString &name) const
const TMCString & | GetName (void) const
void | SetName (const TMCString &name)
void | AddType (const TMCFileID &inType)
void | AddExtension (const TMCString &inExtension)
boolean | ContainsExt (const TMCString &extension) const
boolean | ContainsType (const TMCFileID &type) const
boolean | Contains (const TMCString &extension, const TMCFileID &type) const
MCTypeFamilyID | GetFileTypeFamilyID () const
void | SetFileTypeFamilyID (MCTypeFamilyID fileTypeFamilyID)
int32 | GetExtensionsCount () const
const TMCString & | GetExtension (int32 index) const
int32 | GetTypesCount () const
const TMCFileID & | GetType (int32 index) const
## Protected Attributes
MCFileTypeID | fID
| The identifier of the file type (unique for the application).
TMCString31 | fName
| The name of the file type (eg "QuickTime Movie").
MCTypeFamilyID | fFileTypeFamilyID
| eg 2dfiles, 3d files, movies...
TMCClassArray< TMCDynamicString > | fExtensions
| The list of extensions generally used by such files (eg .html, .htm).
TMCArray< TMCFileID > | fTypes
| The platform specific (macos9) types of such files (eg 'TEXT').

## Detailed Description

TMCFileType stores some information about a particular kind of files that the application knows (like "Html files"). That info consists of an ID, name, and a list of extensions and platform (macos9) types.

Note:
  When savind a file, the application uses the first extension of the list.

See also:
  IShFileFormatUtilities has some convenient methods related to file types.

## Constructor & Destructor Documentation

TMCFileType::TMCFileType | ( |  | ) |

TMCFileType::TMCFileType | ( | const MCFileTypeID & | typeID,
|  | MCTypeFamilyID | familyTypeID |
| ) |  |  |

## Member Function Documentation

void TMCFileType::AddExtension | ( | const TMCString & | inExtension | ) |

Adds an extension to the file type

void TMCFileType::AddType | ( | const TMCFileID & | inType | ) |

Adds a type to the file type

boolean TMCFileType::Contains | ( | const TMCString & | extension,
|  | const TMCFileID & | type |
| ) |  |  | const

Tells us if a given extension or TMCFileID is contained in the the TMCFileType

boolean TMCFileType::ContainsExt | ( | const TMCString & | extension | ) | const

Tells us if a given extension is contained in the the TMCFileType

boolean TMCFileType::ContainsType | ( | const TMCFileID & | type | ) | const

Tells us if a given TMCFileID is contained in the the TMCFileType

const TMCString& TMCFileType::GetExtension | ( | int32 | index | ) | const`[inline]`

int32 TMCFileType::GetExtensionsCount | ( |  | ) | const`[inline]`

MCTypeFamilyID TMCFileType::GetFileTypeFamilyID | ( |  | ) | const`[inline]`

Gets the filetype family of a filetype

MCFileTypeID TMCFileType::GetID | ( |  | ) | const`[inline]`

const TMCString& TMCFileType::GetName | ( | void |  | ) | const`[inline]`

void TMCFileType::GetName | ( | TMCString & | name | ) | const`[inline]`

const TMCFileID& TMCFileType::GetType | ( | int32 | index | ) | const`[inline]`

int32 TMCFileType::GetTypesCount | ( |  | ) | const`[inline]`

void TMCFileType::SetFileTypeFamilyID | ( | MCTypeFamilyID | fileTypeFamilyID | ) | `[inline]`

Sets the filetype family of a filetype

void TMCFileType::SetID | ( | const MCFileTypeID & | id | ) | `[inline]`

void TMCFileType::SetName | ( | const TMCString & | name | ) | `[inline]`

## Member Data Documentation

TMCClassArray<TMCDynamicString> TMCFileType::fExtensions`[protected]`

The list of extensions generally used by such files (eg .html, .htm).

MCTypeFamilyID TMCFileType::fFileTypeFamilyID`[protected]`

eg 2dfiles, 3d files, movies...

MCFileTypeID TMCFileType::fID`[protected]`

The identifier of the file type (unique for the application).

TMCString31 TMCFileType::fName`[protected]`

The name of the file type (eg "QuickTime Movie").

TMCArray<TMCFileID> TMCFileType::fTypes`[protected]`

The platform specific (macos9) types of such files (eg 'TEXT').

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

- MCFileType.h