Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# PNMFileTypeRegistry Class Reference

This class maintains the set of all known PNMFileTypes in the universe. More...

List of all members.

## 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.

## Detailed Description

This class maintains the set of all known PNMFileTypes in the universe.

## Member Function Documentation

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 | ( |  | ) |

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.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties