UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
animationprotocol.h
Go to the documentation of this file.
1 
2 #ifndef UGDK_UTIL_ANIMATIONPROTOCOL_H_
3 #define UGDK_UTIL_ANIMATIONPROTOCOL_H_
4 
5 #include <map>
6 #include <utility>
10 
11 namespace ugdk {
12 
13 class AnimationProtocol : public gdd::DescriptionProtocol<action::AnimationSet> {
14  public:
15  enum ParsingScope {
19  };
20 
22  virtual ~AnimationProtocol() { if(current_effect_) delete current_effect_; }
23 
24  bool NewDescription();
25  bool NewData(const gdd::GDDString& data_name);
26  bool NewProperty(const gdd::GDDString& property_name, const gdd::GDDArgs& property_args);
27  bool NewRing(const gdd::GDDString& ring_typename);
28  bool NewEntry(const gdd::GDDString& entry_name, const gdd::GDDArgs& entry_args);
29  bool NewSimpleChain(const gdd::GDDString& ring_typename, const gdd::GDDArgs& ring_args);
30 
31  private:
32  action::Animation *current_animation_;
33  graphic::Modifier* current_effect_;
34  ParsingScope current_scope_;
35  bool composing_;
36 
37  typedef bool (AnimationProtocol::*EntryFunction) (const gdd::GDDArgs&);
38 
39 
40  std::map< std::pair<ParsingScope, gdd::GDDString>, EntryFunction > entry_functions_;
41 
42  bool NewEntry_EffectNumber( const gdd::GDDArgs& ); //TODO: implement this function.
43  bool NewEntry_EffectAlpha( const gdd::GDDArgs& );
44  bool NewEntry_EffectColor( const gdd::GDDArgs& );
45  bool NewEntry_EffectPosition( const gdd::GDDArgs& );
46  bool NewEntry_EffectMirror( const gdd::GDDArgs& );
47  bool NewEntry_EffectSize( const gdd::GDDArgs& );
48  bool NewEntry_EffectRotation( const gdd::GDDArgs& );
49 
50  bool NewEntry_FrameNumber( const gdd::GDDArgs& );
51  bool NewEntry_FrameAlpha( const gdd::GDDArgs& );
52  bool NewEntry_FrameColor( const gdd::GDDArgs& );
53  bool NewEntry_FramePosition( const gdd::GDDArgs& );
54  bool NewEntry_FrameMirror( const gdd::GDDArgs& );
55  bool NewEntry_FrameSize( const gdd::GDDArgs& );
56  bool NewEntry_FrameRotation( const gdd::GDDArgs& );
57 
58 
59  const bool arg_is_not_doubleing(const gdd::GDDString&) {
60  //TODO: Implement this.
61  return false;
62  }
63  const bool arg_is_not_integer(const gdd::GDDString&) {
64  //TODO: Implement this.
65  return false;
66  }
67  const bool arg_is_not_hexadecimal(const gdd::GDDString&) {
68  //TODO: Implement this.
69  return false;
70  }
71  const bool arg_is_not_flip_axis(const gdd::GDDString&) {
72  //TODO: Implement this.
73  return false;
74  }
75 
76 };
77 
78 } /* namespace ugdk */
79 #endif /* UGDK_UTIL_ANIMATIONPROTOCOL_H_ */