]> git.tdb.fi Git - libs/game.git/blobdiff - source/game/entity.h
Decorate things which constitute the public API of the library
[libs/game.git] / source / game / entity.h
index c4cf83c119b26bce36fce09ac1238be2bebcd1d2..e6d1cf940cd8da44783976a29fd1ce407cf01770 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GAME_ENTITY_H_
 
 #include "handle.h"
+#include "mspgame_api.h"
 #include "owned.h"
 
 namespace Msp::Game {
@@ -11,13 +12,13 @@ class Stage;
 class Transform;
 struct TransformValues;
 
-class hierarchy_error: public std::logic_error
+class MSPGAME_API hierarchy_error: public std::logic_error
 {
 public:
        hierarchy_error(): std::logic_error("hierarchy error") { }
 };
 
-class Entity
+class MSPGAME_API Entity
 {
 public:
        enum TransformTag { NO_TRANSFORM };
@@ -35,6 +36,7 @@ public:
 
        void add_component(Handle<Component>);
        void remove_component(Handle<Component>);
+       const std::vector<Handle<Component>> &get_components() const { return components; }
 
        template<typename T>
        Handle<T> get_component();