eggAnimPreload.h

00001 // Filename: eggAnimPreload.h
00002 // Created by:  drose (06Aug08)
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 EGGANIMPRELOAD_H
00016 #define EGGANIMPRELOAD_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "eggNode.h"
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //       Class : EggAnimPreload
00024 // Description : This corresponds to an <AnimPreload> entry.
00025 ////////////////////////////////////////////////////////////////////
00026 class EXPCL_PANDAEGG EggAnimPreload : public EggNode {
00027 PUBLISHED:
00028   INLINE EggAnimPreload(const string &name = "");
00029   INLINE EggAnimPreload(const EggAnimPreload &copy);
00030   INLINE EggAnimPreload &operator = (const EggAnimPreload &copy);
00031 
00032   INLINE void set_fps(double fps);
00033   INLINE void clear_fps();
00034   INLINE bool has_fps() const;
00035   INLINE double get_fps() const;
00036 
00037   INLINE void set_num_frames(int num_frames);
00038   INLINE void clear_num_frames();
00039   INLINE bool has_num_frames() const;
00040   INLINE int get_num_frames() const;
00041 
00042   virtual void write(ostream &out, int indent_level) const;
00043 
00044 private:
00045   double _fps;
00046   bool _has_fps;
00047   int _num_frames;
00048   bool _has_num_frames;
00049 
00050 public:
00051   static TypeHandle get_class_type() {
00052     return _type_handle;
00053   }
00054   static void init_type() {
00055     EggNode::init_type();
00056     register_type(_type_handle, "EggAnimPreload",
00057                   EggNode::get_class_type());
00058   }
00059   virtual TypeHandle get_type() const {
00060     return get_class_type();
00061   }
00062   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00063 
00064 private:
00065   static TypeHandle _type_handle;
00066 };
00067 
00068 #include "eggAnimPreload.I"
00069 
00070 #endif
00071