]> git.tdb.fi Git - libs/game.git/blobdiff - source/game/pool.h
Decorate things which constitute the public API of the library
[libs/game.git] / source / game / pool.h
index 16801f4d48aead654cb53eb57ccff70d84f377b0..e4fe70453310c3ea337d47ab684d10f8663ae7c1 100644 (file)
@@ -1,10 +1,11 @@
-#ifndef MSP_GAME_STORAGE_H_
-#define MSP_GAME_STORAGE_H_
+#ifndef MSP_GAME_POOL_H_
+#define MSP_GAME_POOL_H_
 
 #include <cstdint>
 #include <memory>
 #include <vector>
 #include <msp/core/noncopyable.h>
+#include "mspgame_api.h"
 
 namespace Msp::Game {
 
@@ -13,7 +14,7 @@ class PoolBase;
 template<typename T>
 class Pool;
 
-class PoolPool: public NonCopyable
+class MSPGAME_API PoolPool: public NonCopyable
 {
 private:
        std::vector<std::unique_ptr<PoolBase>> pools;
@@ -35,7 +36,7 @@ public:
 };
 
 
-class PoolBase: public NonCopyable
+class MSPGAME_API PoolBase: public NonCopyable
 {
 private:
        using DeleteFunc = void(void *);
@@ -72,6 +73,7 @@ private:
        void add_block();
 
 public:
+       std::uint32_t get_capacity() const { return capacity; }
        void destroy(void *);
 };