From d5c5ff3289ef93b5ed33a9e3ba21dcc818f34303 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sat, 3 Oct 2015 21:53:09 +0300 Subject: [PATCH] Update entity interfaces to include a typedef to a bitset used by event types. --- source/Entity.hpp | 51 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/source/Entity.hpp b/source/Entity.hpp index 2bd90007..113f2b4a 100644 --- a/source/Entity.hpp +++ b/source/Entity.hpp @@ -11,6 +11,7 @@ // ------------------------------------------------------------------------------------------------ #include +#include // ------------------------------------------------------------------------------------------------ namespace SqMod { @@ -123,7 +124,10 @@ public: static constexpr const SQChar* CName = "CBlip"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -197,7 +201,10 @@ public: static constexpr const SQChar* CName = "CCheckpoint"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -283,7 +290,10 @@ public: static constexpr const SQChar* CName = "CKeybind"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -357,7 +367,10 @@ public: static constexpr const SQChar* CName = "CObject"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -433,7 +446,10 @@ public: static constexpr const SQChar* CName = "CPickup"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -595,7 +611,10 @@ public: static constexpr const SQChar* CName = "CPlayer"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -669,7 +688,10 @@ public: static constexpr const SQChar* CName = "CSphere"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -742,7 +764,10 @@ public: static constexpr const SQChar* CName = "CSprite"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -815,7 +840,10 @@ public: static constexpr const SQChar* CName = "CTextdraw"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------ @@ -899,7 +927,10 @@ public: static constexpr const SQChar* CName = "CVehicle"; // -------------------------------------------------------------------------------------------- - typedef std::array< Instance, Limit > Instances; + typedef std::array< Instance, Limit > Instances; + + // -------------------------------------------------------------------------------------------- + typedef std::bitset< Limit > Set; }; /* ------------------------------------------------------------------------------------------------