Panda3D
 All Classes Functions Variables Enumerations
eggWriter.h
1 // Filename: eggWriter.h
2 // Created by: drose (14Feb00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef EGGWRITER_H
16 #define EGGWRITER_H
17 
18 #include "pandatoolbase.h"
19 #include "eggSingleBase.h"
20 #include "withOutputFile.h"
21 
22 #include "filename.h"
23 #include "luse.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : EggWriter
27 // Description : This is the base class for a program that generates
28 // an egg file output, but doesn't read any for input.
29 ////////////////////////////////////////////////////////////////////
30 class EggWriter : virtual public EggSingleBase, public WithOutputFile {
31 public:
32  EggWriter(bool allow_last_param = false, bool allow_stdout = true);
33 
34  virtual EggWriter *as_writer();
35 
36  virtual void post_process_egg_file();
37  void write_egg_file();
38 
39 protected:
40  virtual bool handle_args(Args &args);
41  virtual bool post_command_line();
42 
43 private:
44  ofstream _output_stream;
45  ostream *_output_ptr;
46 };
47 
48 #endif
49 
50 
This specialization of EggBase is intended for programs that read and/or write a single egg file...
Definition: eggSingleBase.h:40
virtual void post_process_egg_file()
Performs any processing of the egg file that is appropriate before writing it out.
Definition: eggWriter.cxx:125
void write_egg_file()
Writes out the egg file as the normal result of the program.
Definition: eggWriter.cxx:193
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:108
This is the bare functionality (intended to be inherited from along with ProgramBase or some derivati...
This is the base class for a program that generates an egg file output, but doesn't read any for inpu...
Definition: eggWriter.h:30
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:41