Cogs.Foundation
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Cogs::Reflection Namespace Reference

Contains reflection support. More...

Namespaces

namespace  Construction
 
namespace  detail
 Resepy from: https://developercommunity.visualstudio.com/t/C2607-after-upgrading-to-Visual-Studio-1/1666785.
 

Classes

struct  Attribute
 An attribute containing metadata or describing behavior of a structure. More...
 
struct  Attributes
 Attribute storage for structures. More...
 
struct  Enumerator
 Single integral constant enumerator. More...
 
struct  EnumeratorDef
 
class  Field
 Field definition describing a single data member of a data structure. More...
 
struct  FieldWrapper
 Convenience wrapper for adding attributes during field creation in a type safe manner. More...
 
struct  GenericAttribute
 Base attribute type for generic attributes. More...
 
class  Method
 Simple method definition. More...
 
struct  Name
 Represents an unique name. More...
 
struct  RegularAttribute
 Base attribute type for regular attributes. More...
 
class  Type
 Represents a discrete type definition, describing a native type class. More...
 
class  TypeDatabase
 Manages all Type instances currently created in the system. More...
 
struct  TypeFlags
 Type flags controlling type behavior. More...
 
class  TypeStore
 Storage class for registered types. More...
 

Typedefs

using CreateInstance = void *(*)()
 Object creation function type. Comparable to regular new.
 
using ConstructInstance = void *(*)(void *)
 Object construction function type. Comparable to placement new.
 
using DestroyInstance = void(*)(void *)
 Object destroy function type. Comparable to regular delete.
 
using DestructInstance = void(*)(void *)
 Object destruction function type. Comparable to calling the destructor.
 
using TypeId = uint16_t
 Built in type used to uniquely identify a single type instance.
 
using FieldId = uint16_t
 Type used to index fields.
 
using MethodId = uint16_t
 Type used to index methods.
 

Enumerations

enum struct  FieldFlags : uint16_t { Default = 0 , Pointer = 0x1 , Array = 0x2 , NoSerialize = 0x4 }
 Field flags. More...
 

Functions

FieldFlags operator| (FieldFlags lhs, FieldFlags rhs)
 Or operator.
 
FieldFlags operator& (FieldFlags lhs, FieldFlags rhs)
 And operator.
 
FieldFlagsoperator|= (FieldFlags &lhs, FieldFlags rhs)
 Or assignment operator.
 

Variables

constexpr size_t kMaxMethodArguments = 4
 Max number of method arguments supported.
 
constexpr TypeId NoType = 0xFFFF
 Definition of no type.
 
constexpr FieldId NoField = 0xFFFF
 No field id.
 
constexpr MethodId NoMethod = 0xFFFF
 No method id.
 

Detailed Description

Contains reflection support.

Typedef Documentation

◆ ConstructInstance

using Cogs::Reflection::ConstructInstance = typedef void* (*)(void*)

Object construction function type. Comparable to placement new.

◆ CreateInstance

using Cogs::Reflection::CreateInstance = typedef void* (*)()

Object creation function type. Comparable to regular new.

◆ DestroyInstance

using Cogs::Reflection::DestroyInstance = typedef void (*)(void*)

Object destroy function type. Comparable to regular delete.

◆ DestructInstance

using Cogs::Reflection::DestructInstance = typedef void (*)(void *)

Object destruction function type. Comparable to calling the destructor.

◆ FieldId

using Cogs::Reflection::FieldId = typedef uint16_t

Type used to index fields.

◆ MethodId

using Cogs::Reflection::MethodId = typedef uint16_t

Type used to index methods.

◆ TypeId

using Cogs::Reflection::TypeId = typedef uint16_t

Built in type used to uniquely identify a single type instance.

Enumeration Type Documentation

◆ FieldFlags

enum struct Cogs::Reflection::FieldFlags : uint16_t
strong

Field flags.

Enumerator
Default 

Standard field.

Pointer 

Field is a pointer.

Array 

Field is an array.

NoSerialize 

Skip Serialize field.

Function Documentation

◆ operator&()

FieldFlags Cogs::Reflection::operator& ( FieldFlags  lhs,
FieldFlags  rhs 
)
inline

And operator.

◆ operator|()

FieldFlags Cogs::Reflection::operator| ( FieldFlags  lhs,
FieldFlags  rhs 
)
inline

Or operator.

◆ operator|=()

FieldFlags & Cogs::Reflection::operator|= ( FieldFlags lhs,
FieldFlags  rhs 
)
inline

Or assignment operator.

Variable Documentation

◆ kMaxMethodArguments

constexpr size_t Cogs::Reflection::kMaxMethodArguments = 4
constexpr

Max number of method arguments supported.

Referenced by Cogs::Reflection::Method::compareSizes(), and Cogs::Reflection::Method::setSizes().

◆ NoField

constexpr FieldId Cogs::Reflection::NoField = 0xFFFF
constexpr

◆ NoMethod

constexpr MethodId Cogs::Reflection::NoMethod = 0xFFFF
constexpr

No method id.

◆ NoType

constexpr TypeId Cogs::Reflection::NoType = 0xFFFF
constexpr