Nebula
Loading...
Searching...
No Matches
Game::ComponentInterface Class Reference

#include <component.h>

Detailed Description

These are registered to the attribute registry so that we can add more functionality to attributes.

Inherits MemDb::Attribute.

Public Types

using ComponentInitFunc = void (*)(Game::World*, Game::Entity, void*)
 

Public Member Functions

template<typename T >
 ComponentInterface (Util::StringAtom name, T const &defaultValue, uint32_t flags)
 construct from template type, with default value.
 
const char * GetName () const
 
const char * GetFullyQualifiedName () const
 
const char ** GetFieldNames () const
 
const char ** GetFieldTypenames () const
 
const size_t * GetFieldByteOffsets () const
 
size_t const GetNumFields () const
 
- Public Member Functions inherited from MemDb::Attribute
template<typename T >
 Attribute (Util::StringAtom name, T const &defaultValue, uint32_t flags)
 construct from template type, with default value.
 
 Attribute (Util::StringAtom name, SizeT typeSizeBytes, void const *defaultValue, uint32_t flags)
 construct from type size in bytes, with default value from void*.
 
 Attribute ()=default
 default constructor
 
 Attribute (Attribute &&desc) noexcept
 move constructor
 
 ~Attribute ()
 desctructor
 
void operator= (Attribute &&rhs) noexcept
 move assignment operator
 
void operator= (Attribute &rhs)
 assignment operator
 

Public Attributes

ComponentInitFunc Init = nullptr
 
- Public Attributes inherited from MemDb::Attribute
Util::StringAtom name
 name of attribute
 
SizeT typeSize = 0
 size of type in bytes
 
void * defVal = nullptr
 default value
 
uint32_t externalFlags
 externally managed flags
 

Private Attributes

const char * componentName = nullptr
 
const char * fullyQualifiedName = nullptr
 
const char ** fieldNames = nullptr
 
const char ** fieldTypenames = nullptr
 
const size_t * fieldByteOffsets = nullptr
 
size_t numFields = 0
 

Member Typedef Documentation

◆ ComponentInitFunc

Constructor & Destructor Documentation

◆ ComponentInterface()

template<typename T >
Game::ComponentInterface::ComponentInterface ( Util::StringAtom name,
T const & defaultValue,
uint32_t flags )
inlineexplicit

construct from template type, with default value.

Member Function Documentation

◆ GetFieldByteOffsets()

const size_t * Game::ComponentInterface::GetFieldByteOffsets ( ) const
inline

◆ GetFieldNames()

const char ** Game::ComponentInterface::GetFieldNames ( ) const
inline

◆ GetFieldTypenames()

const char ** Game::ComponentInterface::GetFieldTypenames ( ) const
inline

◆ GetFullyQualifiedName()

const char * Game::ComponentInterface::GetFullyQualifiedName ( ) const
inline

◆ GetName()

const char * Game::ComponentInterface::GetName ( ) const
inline

◆ GetNumFields()

size_t const Game::ComponentInterface::GetNumFields ( ) const
inline

Member Data Documentation

◆ componentName

const char* Game::ComponentInterface::componentName = nullptr
private

◆ fieldByteOffsets

const size_t* Game::ComponentInterface::fieldByteOffsets = nullptr
private

◆ fieldNames

const char** Game::ComponentInterface::fieldNames = nullptr
private

◆ fieldTypenames

const char** Game::ComponentInterface::fieldTypenames = nullptr
private

◆ fullyQualifiedName

const char* Game::ComponentInterface::fullyQualifiedName = nullptr
private

◆ Init

ComponentInitFunc Game::ComponentInterface::Init = nullptr

◆ numFields

size_t Game::ComponentInterface::numFields = 0
private

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