jubilant-funicular
Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Attributes | List of all members
utils::TypeInfo Struct Reference

Struct for storing basic information about a type used by TypeMap. More...

#include <TypeMap.h>

Collaboration diagram for utils::TypeInfo:
Collaboration graph
[legend]

Public Member Functions

bool operator== (const TypeInfo &rhs) const
 
bool is_pointer () const
 Is this a pointer type.
 
bool is_small () const
 Returns false if this type is more bytes than a pointer.
 
bool is_reference () const
 Is this a reference type.
 

Static Public Member Functions

template<typename T >
static const TypeInfo get ()
 This is the only method that should be used for creating a TypeInfo. More...
 

Public Attributes

std::size_t hash
 The type's unique hash code.
 
unsigned char flags = 0
 A bit array of useful information on this type.
 
std::function< void(void *)> destructor
 The type's destructor.
 

Static Private Attributes

static const unsigned char TYPEINFO_POINTER_BIT = 0b0000'0001
 
static const unsigned char TYPEINFO_SMALL_BIT = 0b0000'0010
 
static const unsigned char TYPEINFO_REFERENCE_BIT = 0b0000'0100
 

Detailed Description

Struct for storing basic information about a type used by TypeMap.

Definition at line 11 of file TypeMap.h.

Member Function Documentation

◆ get()

template<typename T >
static const TypeInfo utils::TypeInfo::get ( )
inlinestatic

This is the only method that should be used for creating a TypeInfo.

The name is subject to change

Definition at line 23 of file TypeMap.h.


The documentation for this struct was generated from the following file: