This class maintains the set of all known PNMFileTypes in the universe. More...
Public Member Functions | |
int | getNumTypes () |
Returns the total number of types registered. | |
PNMFileType | getType (int n) |
Returns the nth type registered. | |
PNMFileType | getTypeByHandle (TypeHandle handle) |
Returns the PNMFileType instance stored in the registry for the given TypeHandle, e.g. | |
PNMFileType | getTypeFromExtension (string filename) |
Tries to determine what the PNMFileType is likely to be for a particular image file based on its extension. | |
PNMFileType | getTypeFromMagicNumber (string magic_number) |
Tries to determine what the PNMFileType is likely to be for a particular image file based on its magic number, the first two bytes read from the file. | |
list | getTypes () |
write (ostream out, int indent_level) | |
Writes a list of supported image file types to the indicated output stream, one per line. | |
write (ostream out) | |
Writes a list of supported image file types to the indicated output stream, one per line. | |
Static Public Member Functions | |
static PNMFileTypeRegistry | getGlobalPtr () |
Returns a pointer to the global PNMFileTypeRegistry object. |
This class maintains the set of all known PNMFileTypes in the universe.
static PNMFileTypeRegistry getGlobalPtr | ( | ) | [static] |
Returns a pointer to the global PNMFileTypeRegistry object.
int getNumTypes | ( | ) |
Returns the total number of types registered.
PNMFileType getType | ( | int | n | ) |
Returns the nth type registered.
PNMFileType getTypeByHandle | ( | TypeHandle | handle | ) |
Returns the PNMFileType instance stored in the registry for the given TypeHandle, e.g.
as retrieved by a previous call to get_type() on the type instance.
PNMFileType getTypeFromExtension | ( | string | filename | ) |
Tries to determine what the PNMFileType is likely to be for a particular image file based on its extension.
Returns a suitable PNMFileType pointer, or NULL if no type can be determined.
PNMFileType getTypeFromMagicNumber | ( | string | magic_number | ) |
Tries to determine what the PNMFileType is likely to be for a particular image file based on its magic number, the first two bytes read from the file.
Returns a suitable PNMFileType pointer, or NULL if no type can be determined.
list getTypes | ( | ) |
Writes a list of supported image file types to the indicated output stream, one per line.