igor::iUserDataComponent Class Reference

#include <iUserDataComponent.h>

Inherits igor::iEntityComponent.

Public Member Functions

 iUserDataComponent ()
 
std::vector< iaStringgetInfo () const override
 
template<typename T >
getValue (const iaString &key, const T &defaultValue=T()) const
 
bool hasValue (const iaString &key) const
 
void setValue (const iaString &key, const std::any value)
 
iParametersgetData ()
 
- Public Member Functions inherited from igor::iEntityComponent
 iEntityComponent ()
 
virtual ~iEntityComponent ()=default
 
const iEntityComponentIDgetID () const
 
iEntityComponentState getState () const
 
virtual std::vector< iaStringgetInfo () const
 
void increaseVersion ()
 
uint16 getVersion () const
 

Static Public Member Functions

static iEntityComponentPtr createInstance ()
 
static const iaStringgetTypeName ()
 

Additional Inherited Members

- Protected Member Functions inherited from igor::iEntityComponent
virtual bool onLoad (iEntityPtr entity, bool &asyncLoad)
 
virtual void onActivate (iEntityPtr entity)
 
virtual void onDeactivate (iEntityPtr entity)
 
virtual void onUnLoad (iEntityPtr entity)
 
virtual iEntityComponentPtr getCopy ()=0
 
iEntityPtr getEntity () const
 

Detailed Description

mime data component

Constructor & Destructor Documentation

◆ iUserDataComponent()

igor::iUserDataComponent::iUserDataComponent ( )

ctor

Member Function Documentation

◆ createInstance()

iEntityComponentPtr igor::iUserDataComponent::createInstance ( )
static

creates instance of this component type

◆ getData()

iParameters & igor::iUserDataComponent::getData ( )
Returns
data

◆ getInfo()

std::vector< iaString > igor::iUserDataComponent::getInfo ( ) const
overridevirtual
Returns
a set of info strings

Reimplemented from igor::iEntityComponent.

◆ getTypeName()

const iaString & igor::iUserDataComponent::getTypeName ( )
static
Returns
type name of component

◆ getValue()

template<typename T >
T igor::iUserDataComponent::getValue ( const iaString key,
const T &  defaultValue = T() 
) const
inline
Returns
value for given key

key "name" is a reserved key. Every item has a name

Parameters
keythe given key

◆ hasValue()

bool igor::iUserDataComponent::hasValue ( const iaString key) const
Returns
true if there is a value for given key

◆ setValue()

void igor::iUserDataComponent::setValue ( const iaString key,
const std::any  value 
)
inline

set value for given key

key "name" is a reserved key. Every item has a name

Parameters
keyto set
valueto set

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