Panda3D
eggWriter.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file eggWriter.h
10  * @author drose
11  * @date 2000-02-14
12  */
13 
14 #ifndef EGGWRITER_H
15 #define EGGWRITER_H
16 
17 #include "pandatoolbase.h"
18 #include "eggSingleBase.h"
19 #include "withOutputFile.h"
20 
21 #include "filename.h"
22 #include "luse.h"
23 
24 /**
25  * This is the base class for a program that generates an egg file output, but
26  * doesn't read any for input.
27  */
28 class EggWriter : virtual public EggSingleBase, public WithOutputFile {
29 public:
30  EggWriter(bool allow_last_param = false, bool allow_stdout = true);
31 
32  virtual EggWriter *as_writer();
33 
34  virtual void post_process_egg_file();
35  void write_egg_file();
36 
37 protected:
38  virtual bool handle_args(Args &args);
39  virtual bool post_command_line();
40 
41 private:
42  std::ofstream _output_stream;
43 };
44 
45 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This specialization of EggBase is intended for programs that read and/or write a single egg file.
Definition: eggSingleBase.h:37
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void post_process_egg_file()
Performs any processing of the egg file that is appropriate before writing it out.
Definition: eggWriter.cxx:112
void write_egg_file()
Writes out the egg file as the normal result of the program.
Definition: eggWriter.cxx:177
virtual EggWriter * as_writer()
Returns this object as an EggWriter pointer, if it is in fact an EggWriter, or NULL if it is not.
Definition: eggWriter.cxx:98
This is the bare functionality (intended to be inherited from along with ProgramBase or some derivati...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class for a program that generates an egg file output, but doesn't read any for inpu...
Definition: eggWriter.h:28
EggWriter(bool allow_last_param=false, bool allow_stdout=true)
Egg-writing type programs may specify their output file using either the last-filename convention,...
Definition: eggWriter.cxx:34