Hymn to Beauty
C++ 3D Engine
Component::SuperComponent Class Referenceabstract

Component which all components inherit. More...

#include <SuperComponent.hpp>

Inheritance diagram for Component::SuperComponent:
Component::Camera Component::DirectionalLight Component::Listener Component::Material Component::Mesh Component::PointLight Component::RigidBody Component::Script Component::Shape Component::SoundSource Component::SpotLight Component::Sprite Component::Trigger

Public Member Functions

 SuperComponent ()
 Create new SuperComponent. More...
 
virtual ~SuperComponent ()
 Destructor. More...
 
void Kill ()
 Kill the component, will be removed at the end of the frame. More...
 
bool IsKilled () const
 Get whether component has been killed. More...
 
virtual void Serialize (Json::Value &node, bool load)=0
 Save or load component values to/from JSON. More...
 

Public Attributes

Entityentity = nullptr
 Pointer to which entity this component corresponds. More...
 

Detailed Description

Component which all components inherit.

Constructor & Destructor Documentation

◆ SuperComponent()

SuperComponent::SuperComponent ( )

Create new SuperComponent.

◆ ~SuperComponent()

SuperComponent::~SuperComponent ( )
virtual

Destructor.

Member Function Documentation

◆ IsKilled()

bool SuperComponent::IsKilled ( ) const

Get whether component has been killed.

Returns
Whether component has been killed.

◆ Kill()

void SuperComponent::Kill ( )

Kill the component, will be removed at the end of the frame.

◆ Serialize()

virtual void Component::SuperComponent::Serialize ( Json::Value &  node,
bool  load 
)
pure virtual

Save or load component values to/from JSON.

Parameters
nodeThe JSON node to save to or load from.
loadWhether to load (otherwise saves).

Implemented in Component::Camera, Component::DirectionalLight, Component::Listener, Component::Material, Component::Mesh, Component::PointLight, Component::RigidBody, Component::Script, Component::Shape, Component::SoundSource, Component::SpotLight, Component::Sprite, and Component::Trigger.

Member Data Documentation

◆ entity

Entity* Component::SuperComponent::entity = nullptr

Pointer to which entity this component corresponds.


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