CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Constructor.hpp
Go to the documentation of this file.
1 #pragma once
3 namespace CYB {
4  namespace API {
5  namespace Interop { //Doxygen too stupid for the recursive parse
11  template <typename AType, typename... ATypes> class Constructor : public Constructor<ATypes...> {
12  public:
13  AType FParam;
14  protected:
23  Constructor(AType&& AParam, ATypes&&... AParams, const unsigned short ASize) noexcept;
24 
35  template <class AAllocatable, typename... AArgs> void Construct(void* const ALocation, AArgs&&... AArguments);
36  public:
44  Constructor(AType&& AParam, ATypes&&... AParams) noexcept;
53  template <class AAllocatable> void Construct(void* const ALocation);
54  };
56  template <> class Constructor<void> {
57  private:
58  const unsigned short FSize;
59  protected:
66  Constructor(const unsigned short ASize) noexcept;
67 
78  template <class AAllocatable, typename... AArgs> void Construct(void* const ALocation, AArgs&&... AArguments);
79  public:
85  Constructor() noexcept;
86 
95  template <class AAllocatable> void Construct(void* const ALocation);
96 
103  template <class AAllocatable> bool Valid(void) const noexcept;
104  };
111  template <typename AType> class Constructor<AType> : public EmptyConstructor {
112  public:
113  AType FParam;
114  protected:
122  Constructor(AType&& AParam, const unsigned short ASize) noexcept;
123 
134  template <class AAllocatable, typename... AArgs> void Construct(void* const ALocation, AArgs&&... AArguments);
135  public:
142  Constructor(AType&& AParam) noexcept;
151  template <class AAllocatable> void Construct(void* const ALocation);
152  };
153 
155  class NullConstructor : public EmptyConstructor {
156  public:
158  template <typename... AArgs> NullConstructor(AArgs&&... AArguments) = delete;
159  };
160  };
161  };
162 };
Constructor(AType &&AParam, ATypes &&...AParams, const unsigned short ASize) noexcept
Construct a Constructor.
Used as a base class by all constructors.
Definition: Constructor.hpp:56
AType FParam
The pointer to the parameter.
Definition: Constructor.hpp:13
void Construct(void *const ALocation, AArgs &&...AArguments)
Do placement construction of AAllocatable with AArgs at ALocation.
const unsigned short FSize
The number of arguments in the constructor.
Definition: Constructor.hpp:58
AType FParam
The pointer to the parameter.
Template for defining the types of parameters for engine object constructors with multiple arguments...
Definition: Constructor.hpp:11
Used for object which aren't allocatables.