Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

WithOutputFile Class Reference

#include <withOutputFile.h>

Inheritance diagram for WithOutputFile:

EggWriter FltTrans ImageWriter EggFilter EggMakeFont EggTextureCards ImageFilter EggConverter EggCrop EggTrans ImageResize ImageTrans EggToSomething SomethingToEgg EggToBam EggToC EggToX BamToEgg FltToEgg LwoToEgg MayaToEgg XFileToEgg List of all members.

Public Member Functions

 WithOutputFile (bool allow_last_param, bool allow_stdout, bool binary_output)
virtual ~WithOutputFile ()
ostream & get_output ()
bool has_output_filename () const
Filename get_output_filename () const

Protected Member Functions

bool check_last_arg (ProgramBase::Args &args, int minimum_args)
bool verify_output_file_safe () const

Protected Attributes

bool _allow_last_param
bool _allow_stdout
bool _binary_output
string _preferred_extension
bool _got_output_filename
Filename _output_filename

Private Attributes

ofstream _output_stream
ostream * _output_ptr

Constructor & Destructor Documentation

WithOutputFile::WithOutputFile bool  allow_last_param,
bool  allow_stdout,
bool  binary_output
 

Definition at line 30 of file withOutputFile.cxx.

References _allow_last_param, _allow_stdout, _binary_output, _got_output_filename, _output_ptr, NULL, and ostream.

WithOutputFile::~WithOutputFile  )  [virtual]
 

Definition at line 45 of file withOutputFile.cxx.


Member Function Documentation

bool WithOutputFile::check_last_arg ProgramBase::Args args,
int  minimum_args
[protected]
 

Definition at line 126 of file withOutputFile.cxx.

References _allow_last_param, _allow_stdout, _got_output_filename, _output_filename, _preferred_extension, Filename::from_os_specific(), Filename::get_extension(), nout, and verify_output_file_safe().

Referenced by ImageWriter::handle_args(), ImageFilter::handle_args(), FltTrans::handle_args(), EggWriter::handle_args(), EggToSomething::handle_args(), EggTextureCards::handle_args(), and EggFilter::handle_args().

ostream & WithOutputFile::get_output  ) 
 

Definition at line 56 of file withOutputFile.cxx.

References _allow_stdout, _got_output_filename, _output_filename, _output_ptr, _output_stream, Filename::c_str(), Filename::make_dir(), nassertr, nout, NULL, Filename::open_write(), ostream, Filename::set_binary(), and Filename::set_text().

Referenced by FltTrans::run(), EggToC::run(), EggToC::write_bin(), EggWriter::write_egg_file(), and EggToC::write_vertex_pool().

Filename WithOutputFile::get_output_filename  )  const
 

Definition at line 105 of file withOutputFile.cxx.

References _output_filename, and Filename.

Referenced by EggToX::run(), EggToBam::run(), EggMakeFont::run(), and ImageWriter::write_image().

bool WithOutputFile::has_output_filename  )  const
 

Definition at line 93 of file withOutputFile.cxx.

References _got_output_filename.

Referenced by EggToBam::run(), and EggMakeFont::run().

bool WithOutputFile::verify_output_file_safe  )  const [protected]
 

Definition at line 172 of file withOutputFile.cxx.

References _got_output_filename, _output_filename, Filename::exists(), nassertr, and nout.

Referenced by check_last_arg(), and SomethingToEgg::handle_args().


Member Data Documentation

bool WithOutputFile::_allow_last_param [protected]
 

Definition at line 52 of file withOutputFile.h.

Referenced by check_last_arg(), SomethingToEgg::handle_args(), and WithOutputFile().

bool WithOutputFile::_allow_stdout [protected]
 

Definition at line 53 of file withOutputFile.h.

Referenced by check_last_arg(), get_output(), EggWriter::post_command_line(), and WithOutputFile().

bool WithOutputFile::_binary_output [protected]
 

Definition at line 54 of file withOutputFile.h.

Referenced by WithOutputFile().

bool WithOutputFile::_got_output_filename [protected]
 

Definition at line 56 of file withOutputFile.h.

Referenced by check_last_arg(), EggWriter::EggWriter(), FltTrans::FltTrans(), get_output(), SomethingToEgg::handle_args(), EggWriter::handle_args(), EggFilter::handle_args(), has_output_filename(), ImageWriter::ImageWriter(), EggWriter::post_command_line(), verify_output_file_safe(), and WithOutputFile().

Filename WithOutputFile::_output_filename [protected]
 

Definition at line 57 of file withOutputFile.h.

Referenced by check_last_arg(), EggWriter::EggWriter(), FltTrans::FltTrans(), get_output(), get_output_filename(), SomethingToEgg::handle_args(), EggWriter::handle_args(), EggFilter::handle_args(), ImageWriter::ImageWriter(), MayaToEgg::run(), and verify_output_file_safe().

ostream* WithOutputFile::_output_ptr [private]
 

Reimplemented in EggWriter.

Definition at line 61 of file withOutputFile.h.

Referenced by get_output(), and WithOutputFile().

ofstream WithOutputFile::_output_stream [private]
 

Reimplemented in EggWriter.

Definition at line 60 of file withOutputFile.h.

Referenced by get_output().

string WithOutputFile::_preferred_extension [protected]
 

Definition at line 55 of file withOutputFile.h.

Referenced by check_last_arg(), EggConverter::EggConverter(), EggToSomething::EggToSomething(), EggWriter::EggWriter(), FltTrans::FltTrans(), and SomethingToEgg::SomethingToEgg().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:01:30 2003 for Panda-Tool by doxygen1.3