ECSTASY
All in the name
Loading...
Searching...
No Matches
TypeRegistry.hpp File Reference
#include <algorithm>
#include <functional>
#include <optional>
#include "Type.hpp"
#include "util/serialization/foreach.hpp"
Include dependency graph for TypeRegistry.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ecstasy::rtti::TypeRegistry
 Type registry class to store types in cross-platform way. More...
 

Namespaces

namespace  ecstasy
 Namespace containing all symbols specific to ecstasy.
 
namespace  ecstasy::rtti
 Namespace regrouping the cross platform rtti symbols.
 

Macros

#define CONCAT_IMPL(x, y)   x##y
 
#define CONCAT(x, y)   CONCAT_IMPL(x, y)
 
#define REGISTER_TYPE(TYPE)
 Register a component type.
 
#define REGISTER_TYPES(TYPE, ...)   FOR_EACH(REGISTER_TYPE, TYPE, __VA_ARGS__)
 Register multiple component types.
 

Detailed Description

Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Version
1.0.0
Date
2024-10-24

Definition in file TypeRegistry.hpp.

Macro Definition Documentation

◆ CONCAT

#define CONCAT (   x,
 
)    CONCAT_IMPL(x, y)

Definition at line 23 of file TypeRegistry.hpp.

◆ CONCAT_IMPL

#define CONCAT_IMPL (   x,
 
)    x##y

Definition at line 22 of file TypeRegistry.hpp.

◆ REGISTER_TYPE

#define REGISTER_TYPE (   TYPE)
Value:
static bool CONCAT(registered_, __COUNTER__) = \
reinterpret_cast<bool &>(ecstasy::rtti::TypeRegistry::getInstance().registerType<TYPE>(#TYPE));
#define CONCAT(x, y)
static TypeRegistry & getInstance() noexcept
Get the Instance object.

Register a component type.

Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2024-10-04)

Definition at line 31 of file TypeRegistry.hpp.

◆ REGISTER_TYPES

#define REGISTER_TYPES (   TYPE,
  ... 
)    FOR_EACH(REGISTER_TYPE, TYPE, __VA_ARGS__)

Register multiple component types.

Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2024-10-04)

Definition at line 41 of file TypeRegistry.hpp.