Graphisoft®

File Type ManagerVersion: 1.0

Introduction

The purpose of the File Type Manager is to provide a platform independent way of file type identification and administration. As the number of registered file types grown in AC, they become unidentifiable, because the usage of three byte extensions on Win32 plus the MacType on the Mac could not distinguish certain types of files form each other. Some types can only be identified by reading into the file and identify it by its content. There is also a need to reduce the number of used extensions, and use the same extension for "families" of file types.

The File Type Manager implements two classes to manage type information. A small class called FileType used to store basic information on a specific type of file such as extensions, description and MacType. This class is also used as a standalone object for exchanging type information between some IO functions.

The second class called FileTypeManager organizes file type information. This class stores FileType objects in  hierarchical groups. Each file type can be member of multiply groups. It enables one level many-to-many relation between groups and types, but group to group relations are restricted to single parent, tree type hierarchy.

 

The database of the FileTypeManager is static. This means that all FileTypeManager objects can use information stored by other FileTypeManager objects with some restrictions. It also enables the usage many of the member functions to be static, so they can be used without an instance of the FileTypeManager object. As a general rule functions that administer type information are connected to the FileTypeManager object that entered that FileType object into the manager. Important behavior of the FileTypeManager is that it cleans up its own data from the static database on destruction of the instance. Most searching and other querying functions are static. A FileType entered and queried by the same FileTypeManager has privilege over FileTypes entered by other FileTypeManagers. This means that if an AddOn creates its own FileTypeManager object it can't enter any data into the static database that would corrupt the usage of a FileTypeManager created by AC or another AddOn.

See Also

File Type Manager, FileTypeManager class, FileType class