14#ifndef PNMFILETYPESTBIMAGE_H
15#define PNMFILETYPESTBIMAGE_H
30class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeStbImage :
public PNMFileType {
32 PNMFileTypeStbImage();
34 virtual std::string get_name()
const;
42 virtual PNMReader *
make_reader(std::istream *file,
bool owns_file =
true,
43 const std::string &magic_number = std::string());
46 static void register_with_read_factory();
49 static TypedWritable *make_PNMFileTypeStbImage(
const FactoryParams ¶ms);
52 static TypeHandle get_class_type() {
55 static void init_type() {
56 PNMFileType::init_type();
58 PNMFileType::get_class_type());
60 virtual TypeHandle get_type()
const {
61 return get_class_type();
63 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
66 static TypeHandle _type_handle;
This is the base class of a family of classes that represent particular image file types that PNMImag...
virtual bool has_magic_number() const
Returns true if this particular file type uses a magic number to identify it, false otherwise.
virtual PNMReader * make_reader(std::istream *file, bool owns_file=true, const std::string &magic_number=std::string())
Allocates and returns a new PNMReader suitable for reading from this file type, if possible.
get_num_extensions
Returns the number of different possible filename extensions associated with this particular file typ...
get_extension
Returns the nth possible filename extension associated with this particular file type,...
virtual bool matches_magic_number(const std::string &magic_number) const
Returns true if the indicated "magic number" byte stream (the initial few bytes read from the file) m...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...