CORGI
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
corgi::Component< T >::ComponentData Struct Reference

A structure of data that is associated with each Entity. More...

#include <component.h>

Detailed Description

template<typename T>
struct corgi::Component< T >::ComponentData

A structure of data that is associated with each Entity.

It contains the template struct, as well as a pointer back to the Entity that owns this data.

Public Member Functions

 ComponentData ()
 The default constructor for an empty ComponentData.
 
 ComponentData (ComponentData &&src)
 Construct a new ComponentData from an existing ComponentData. More...
 
ComponentDataoperator= (ComponentData &&src)
 Move a referenced ComponentData into this ComponentData. More...
 

Public Attributes

EntityRef entity
 The Entity associated with this data.
 
data
 The data to associate with the Entity.
 

Constructor & Destructor Documentation

template<typename T>
corgi::Component< T >::ComponentData::ComponentData ( ComponentData &&  src)
inline

Construct a new ComponentData from an existing ComponentData.

Parameters
[in]srcAn existing ComponentData whose data should be moved into the new ComponentData.

Member Function Documentation

template<typename T>
ComponentData& corgi::Component< T >::ComponentData::operator= ( ComponentData &&  src)
inline

Move a referenced ComponentData into this ComponentData.

Move operators are efficient since they allow referenced data to be moved instead of copied.

Parameters
[in]srcA referenced ComponentData to be moved into this ComponentData.

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