Panda3D
eggAnimPreload.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 eggAnimPreload.h
10  * @author drose
11  * @date 2008-08-06
12  */
13 
14 #ifndef EGGANIMPRELOAD_H
15 #define EGGANIMPRELOAD_H
16 
17 #include "pandabase.h"
18 
19 #include "eggNode.h"
20 
21 /**
22  * This corresponds to an <AnimPreload> entry.
23  */
24 class EXPCL_PANDA_EGG EggAnimPreload : public EggNode {
25 PUBLISHED:
26  INLINE explicit EggAnimPreload(const std::string &name = "");
27  INLINE EggAnimPreload(const EggAnimPreload &copy);
28  INLINE EggAnimPreload &operator = (const EggAnimPreload &copy);
29 
30  INLINE void set_fps(double fps);
31  INLINE void clear_fps();
32  INLINE bool has_fps() const;
33  INLINE double get_fps() const;
34 
35  INLINE void set_num_frames(int num_frames);
36  INLINE void clear_num_frames();
37  INLINE bool has_num_frames() const;
38  INLINE int get_num_frames() const;
39 
40  virtual void write(std::ostream &out, int indent_level) const;
41 
42 private:
43  double _fps;
44  bool _has_fps;
45  int _num_frames;
46  bool _has_num_frames;
47 
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  EggNode::init_type();
54  register_type(_type_handle, "EggAnimPreload",
55  EggNode::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
61 
62 private:
63  static TypeHandle _type_handle;
64 };
65 
66 #include "eggAnimPreload.I"
67 
68 #endif
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This corresponds to an <AnimPreload> entry.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:35
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81