Panda3D
|
This is a base class for a program that reads in a number of egg files, operates on them, and writes them out again (presumably to a different directory). More...
#include "eggMultiFilter.h"
Public Member Functions | |
EggMultiFilter (bool allow_empty=false) | |
Protected Member Functions | |
Filename | get_output_filename (const Filename &source_filename) const |
Returns the output filename of the egg file with the given input filename. | |
virtual bool | handle_args (Args &args) |
Does something with the additional arguments on the command line (after all the -options have been parsed). | |
virtual bool | post_command_line () |
This is called after the command line has been completely processed, and it gives the program a chance to do some last-minute processing and validation of the options and arguments. | |
virtual void | write_eggs () |
Writes out all of the egg files in the _eggs vector, to the output directory if one is specified, or over the input files if -inplace was specified. | |
Protected Attributes | |
bool | _allow_empty |
Filename | _filename |
bool | _got_input_filename |
bool | _got_output_dirname |
bool | _got_output_filename |
bool | _inplace |
Filename | _input_filename |
Filename | _output_dirname |
Filename | _output_filename |
bool | _read_only |
This is a base class for a program that reads in a number of egg files, operates on them, and writes them out again (presumably to a different directory).
Definition at line 28 of file eggMultiFilter.h.
Filename EggMultiFilter::get_output_filename | ( | const Filename & | source_filename | ) | const [protected] |
Returns the output filename of the egg file with the given input filename.
This is based on the user's choice of -inplace, -o, or -d.
Definition at line 185 of file eggMultiFilter.cxx.
Referenced by write_eggs().
bool EggMultiFilter::handle_args | ( | ProgramBase::Args & | args | ) | [protected, virtual] |
Does something with the additional arguments on the command line (after all the -options have been parsed).
Returns true if the arguments are good, false otherwise.
Reimplemented from ProgramBase.
Reimplemented in EggOptchar, and EggPalettize.
Definition at line 81 of file eggMultiFilter.cxx.
References Filename::from_os_specific(), Filename::get_dirname(), and Filename::open_read().
bool EggMultiFilter::post_command_line | ( | ) | [protected, virtual] |
This is called after the command line has been completely processed, and it gives the program a chance to do some last-minute processing and validation of the options and arguments.
It should return true if everything is fine, false if there is an error.
Reimplemented from ProgramBase.
Reimplemented in EggCharacterFilter.
Definition at line 164 of file eggMultiFilter.cxx.
References EggBase::append_command_comment(), and EggData::set_coordinate_system().
Referenced by EggCharacterFilter::post_command_line().
void EggMultiFilter::write_eggs | ( | ) | [protected, virtual] |
Writes out all of the egg files in the _eggs vector, to the output directory if one is specified, or over the input files if -inplace was specified.
Reimplemented in EggCharacterFilter.
Definition at line 209 of file eggMultiFilter.cxx.
References EggData::get_egg_filename(), get_output_filename(), Filename::make_dir(), EggMultiBase::post_process_egg_files(), and EggData::write_egg().