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

pandatool/src/fltprogs/fltCopy.h

Go to the documentation of this file.
00001 // Filename: fltCopy.h
00002 // Created by:  drose (01Nov00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef FLTCOPY_H
00020 #define FLTCOPY_H
00021 
00022 #include "pandatoolbase.h"
00023 
00024 #include "cvsCopy.h"
00025 
00026 #include "dSearchPath.h"
00027 #include "pointerTo.h"
00028 
00029 #include "pset.h"
00030 
00031 class FltRecord;
00032 class FltTexture;
00033 class FltExternalReference;
00034 
00035 ////////////////////////////////////////////////////////////////////
00036 //       Class : FltCopy
00037 // Description : A program to copy Multigen .flt files into the cvs
00038 //               tree.  It copies the base file plus all externally
00039 //               referenced files as well as all textures.
00040 ////////////////////////////////////////////////////////////////////
00041 class FltCopy : public CVSCopy {
00042 public:
00043   FltCopy();
00044 
00045   void run();
00046 
00047 protected:
00048   virtual bool copy_file(const Filename &source, const Filename &dest,
00049                          CVSSourceDirectory *dir, void *extra_data,
00050                          bool new_file);
00051 
00052 private:
00053   enum FileType {
00054     FT_flt,
00055     FT_texture
00056   };
00057 
00058   class ExtraData {
00059   public:
00060     FileType _type;
00061     FltTexture *_texture;
00062   };
00063 
00064   bool copy_flt_file(const Filename &source, const Filename &dest,
00065                      CVSSourceDirectory *dir);
00066   bool copy_texture(const Filename &source, const Filename &dest,
00067                     CVSSourceDirectory *dir, FltTexture *tex,
00068                     bool new_file);
00069 
00070 
00071   typedef pset< PT(FltExternalReference) > Refs;
00072   typedef pset< PT(FltTexture) > Textures;
00073 
00074   void scan_flt(FltRecord *record, Refs &refs, Textures &textures);
00075 };
00076 
00077 #endif

Generated on Fri May 2 03:19:57 2003 for Panda-Tool by doxygen1.3