Panda3D
|
00001 // Filename: eggWriter.h 00002 // Created by: drose (14Feb00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef EGGWRITER_H 00016 #define EGGWRITER_H 00017 00018 #include "pandatoolbase.h" 00019 #include "eggSingleBase.h" 00020 #include "withOutputFile.h" 00021 00022 #include "filename.h" 00023 #include "luse.h" 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Class : EggWriter 00027 // Description : This is the base class for a program that generates 00028 // an egg file output, but doesn't read any for input. 00029 //////////////////////////////////////////////////////////////////// 00030 class EggWriter : virtual public EggSingleBase, public WithOutputFile { 00031 public: 00032 EggWriter(bool allow_last_param = false, bool allow_stdout = true); 00033 00034 virtual EggWriter *as_writer(); 00035 00036 virtual void post_process_egg_file(); 00037 void write_egg_file(); 00038 00039 protected: 00040 virtual bool handle_args(Args &args); 00041 virtual bool post_command_line(); 00042 00043 private: 00044 ofstream _output_stream; 00045 ostream *_output_ptr; 00046 }; 00047 00048 #endif 00049 00050