mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
add is_valid
This commit is contained in:
parent
2e85d47cd2
commit
c1583ac567
@ -26,7 +26,8 @@ INLINE PNMWriter::
|
||||
PNMWriter(PNMFileType *type, ostream *file, bool owns_file) :
|
||||
_type(type),
|
||||
_owns_file(owns_file),
|
||||
_file(file)
|
||||
_file(file),
|
||||
_is_valid(true)
|
||||
{
|
||||
}
|
||||
|
||||
@ -106,3 +107,14 @@ INLINE void PNMWriter::
|
||||
copy_header_from(const PNMImageHeader &header) {
|
||||
PNMImageHeader::operator = (header);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PNMWriter::is_valid
|
||||
// Access: Public
|
||||
// Description: Returns true if the PNMWriter can be used to write
|
||||
// data, false if something is wrong.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool PNMWriter::
|
||||
is_valid() const {
|
||||
return _is_valid;
|
||||
}
|
||||
|
@ -59,10 +59,13 @@ public:
|
||||
|
||||
virtual bool supports_stream_write() const;
|
||||
|
||||
INLINE bool is_valid() const;
|
||||
|
||||
protected:
|
||||
PNMFileType *_type;
|
||||
bool _owns_file;
|
||||
ostream *_file;
|
||||
bool _is_valid;
|
||||
};
|
||||
|
||||
#include "pnmWriter.I"
|
||||
|
Loading…
x
Reference in New Issue
Block a user