mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
added close_output method
This commit is contained in:
parent
7da51c899f
commit
367cb1a1ff
@ -106,6 +106,25 @@ get_output() {
|
||||
return *_output_ptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: WithOutputFile::close_output
|
||||
// Access: Public
|
||||
// Description: Closes the output stream previously opened by
|
||||
// get_output(). A subsequent call to get_output() will
|
||||
// open a new stream.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void WithOutputFile::
|
||||
close_output() {
|
||||
if (_owns_output_ptr) {
|
||||
delete _output_ptr;
|
||||
_owns_output_ptr = false;
|
||||
}
|
||||
_output_ptr = NULL;
|
||||
_output_stream.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: WithOutputFile::has_output_filename
|
||||
// Access: Public
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
virtual ~WithOutputFile();
|
||||
|
||||
ostream &get_output();
|
||||
void close_output();
|
||||
bool has_output_filename() const;
|
||||
Filename get_output_filename() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user