15 #include "pnmFileType.h" 17 #include "string_utils.h" 18 #include "executionEnvironment.h" 19 #include "bamReader.h" 20 #include "bamWriter.h" 22 bool PNMFileType::_did_init_pnm =
false;
63 nassertr(
false,
string());
140 if (!_did_init_pnm) {
141 _did_init_pnm =
true;
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object, in preparation for writing to a Bam file.
virtual string get_extension(int n) const
Returns the nth possible filename extension associated with this particular file type, without a leading dot.
virtual PNMWriter * make_writer(ostream *file, bool owns_file=true)
Allocates and returns a new PNMWriter suitable for reading from this file type, if possible...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
virtual PNMReader * make_reader(istream *file, bool owns_file=true, const string &magic_number=string())
Allocates and returns a new PNMReader suitable for reading from this file type, if possible...
virtual bool matches_magic_number(const string &magic_number) const
Returns true if the indicated "magic number" byte stream (the initial few bytes read from the file) m...
This is an abstract base class that defines the interface for reading image files of various types...
This is an abstract base class that defines the interface for writing image files of various types...
virtual bool has_magic_number() const
Returns true if this particular file type uses a magic number to identify it, false otherwise...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual int get_num_extensions() const
Returns the number of different possible filename extensions associated with this particular file typ...
virtual string get_suggested_extension() const
Returns a suitable filename extension (without a leading dot) to suggest for files of this type...