up-to-date submodule(rive-cpp)
[platform/core/uifw/rive-tizen.git] / submodule / include / animation / state_instance.hpp
1 #ifndef _RIVE_STATE_INSTANCE_HPP_
2 #define _RIVE_STATE_INSTANCE_HPP_
3
4 #include <string>
5 #include <stddef.h>
6
7 namespace rive
8 {
9         class LayerState;
10         class SMIInput;
11         class Artboard;
12
13         /// Represents an instance of a state tracked by the State Machine.
14         class StateInstance
15         {
16         private:
17                 const LayerState* m_LayerState;
18
19         public:
20                 StateInstance(const LayerState* layerState);
21                 virtual ~StateInstance();
22                 virtual void advance(float seconds, SMIInput** inputs) = 0;
23                 virtual void apply(Artboard* artboard, float mix) = 0;
24
25                 /// Returns true when the State Machine needs to keep advancing this
26                 /// state.
27                 virtual bool keepGoing() const = 0;
28
29                 const LayerState* state() const;
30         };
31 } // namespace rive
32 #endif