CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Allocatable.hpp
Go to the documentation of this file.
1 #pragma once
3 namespace CYB {
4  namespace API {
5  namespace Interop {
7  class Allocatable {
8  public:
10  enum class ID {
11  NULL_ID,
12  File,
13  Mutex,
14  Path,
15  Semaphore,
16  };
17 
22  public:
28  template <class AParent> static constexpr ID GetID(void);
29 
31  virtual ~Allocatable() = default;
32  };
33  };
34  };
35 };
36 
38 #define CYB_SET_ALLOCATABLE_ID(AClass)\
39 template<> constexpr CYB::API::Interop::Allocatable::ID CYB::API::Interop::Allocatable::GetID<CYB::API::AClass>(void) {\
40  return ID::AClass;\
41 }
static constexpr ID GetID(void)
Returns the ID of an allocatable object.
ID
Defines the IDs of allocatable engine objects.
Definition: Allocatable.hpp:10
virtual ~Allocatable()=default
See Default Constructors and Destructor.
Defines the base class for allocatable engine objects.
Definition: Allocatable.hpp:7
Used for object which aren't allocatables.