namespace
reflectionReflection module.
Classes
-
template<typename T>struct Reflect
- Defines the reflection function for the given type
T
. - class ArrayTrait
- Exposes array-like functionality of a type.
- class ConstructibleTrait
- Describes how a reflected type may be constructed and destructed.
- class DictionaryTrait
- Exposes dictionary-like functionality of a type.
- class EnumTrait
- Provides enumeration functionality to an enumerated type.
- class FieldsTrait
- Describes the fields of a reflected type.
- class InheritsTrait
- Provides inheritance relationship between types.
- class MaskTrait
- Provides mask functionality to an enum mask type.
- class NullableTrait
- Used to manipulate values of null-representable types.
- class StringConversionTrait
- Stores functions for converting a type to and from a string.
- class Type
- Describes a reflected type.
- class TypeClient
- Manages the client-side of a reflection channel on top of a stream.
- class TypeRegistry
- Stores a set of types which can be accessed by name.
- class TypeServer
- Used to setup a TypeChannel on top of a stream, from the server side.
Functions
-
auto compare(const Type& type,
const void* a,
const void* b) -> CUBOS_
CORE_ API bool - Compares two instances of the same type.
-
auto makeAnonymousType(const char* name,
const char* file,
std::size_t size,
std::size_t alignment,
void(*)(void*) destructor) -> CUBOS_
CORE_ API const Type& - Creates a new reflection type with a unique name created from a type name and a file path, and with a minimal ConstructibleTrait.
-
template<typename T>auto reflect() -> const Type&
- Reflects the given type
T
. -
template<typename T>auto autoConstructibleTrait() -> ConstructibleTrait
- Returns a ConstructibleTrait with the default, copy and move constructors, set only if the type has them.
Function documentation
CUBOS_ CORE_ API bool cubos:: core:: reflection:: compare(const Type& type,
const void* a,
const void* b)
#include <core/reflection/comparison.hpp>
Compares two instances of the same type.
Parameters | |
---|---|
type | The type of the data being compared |
a | One of the instances. |
b | The other instance. |
Returns | True if the values are equal, false otherwise. |