Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / rive-cpp / include / rive / 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 #include "rive/rive_types.hpp"
7 #include "rive/span.hpp"
8
9 namespace rive {
10     class LayerState;
11     class SMIInput;
12     class ArtboardInstance;
13
14     /// Represents an instance of a state tracked by the State Machine.
15     class StateInstance {
16     private:
17         const LayerState* m_LayerState;
18
19     public:
20         StateInstance(const LayerState* layerState);
21         virtual ~StateInstance();
22         virtual void advance(float seconds, Span<SMIInput*> inputs) = 0;
23         virtual void apply(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