Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::SGNComponent Class Reference

#include <SGNComponent.h>

+ Inheritance diagram for Divide::SGNComponent:

Public Member Functions

 SGNComponent (Key key, ComponentType type, SceneGraphNode *parentSGN, PlatformContext &context)
 
virtual void OnData (const ECS::CustomEvent &data)
 
virtual void saveToXML (boost::property_tree::ptree &pt) const
 
virtual void loadFromXML (const boost::property_tree::ptree &pt)
 
virtual bool saveCache (ByteBuffer &outputBuffer) const
 
virtual bool loadCache (ByteBuffer &inputBuffer)
 
U64 uniqueID () const
 
virtual bool enabled () const
 
virtual void enabled (bool state)
 
EditorComponenteditorComponent () noexcept
 
 POINTER_R_IW (SceneGraphNode, parentSGN, nullptr)
 
 PROPERTY_R_IW (ComponentType, type, ComponentType::COUNT)
 
 PROPERTY_R (EditorComponent, editorComponent)
 

Protected Attributes

std::atomic_bool _enabled {true}
 
std::atomic_bool _hasChanged {false}
 
- Protected Attributes inherited from Divide::PlatformContextComponent
PlatformContext_context
 
- Protected Attributes inherited from Divide::Factory< SGNComponent >
friend Base
 

Friends

class EditorComponent
 

Additional Inherited Members

- Public Types inherited from Divide::Factory< SGNComponent >
using ConstructFunc = DELEGATE_STD< void, SceneGraphNode *, Args... >
 
using DestructFunc = DELEGATE_STD< void, SceneGraphNode * >
 
using FactoryContainerConstruct = ska::bytell_hash_map< ComponentType, ConstructFunc >
 
using FactoryContainerDestruct = ska::bytell_hash_map< ComponentType, DestructFunc >
 
- Static Public Member Functions inherited from Divide::Factory< SGNComponent >
static void construct (ComponentType type, SceneGraphNode *node, ConstructArgs &&... args)
 
static void destruct (const ComponentType type, SceneGraphNode *node)
 
- Public Attributes inherited from Divide::Factory< SGNComponent >
friend Base
 
- Protected Types inherited from Divide::Factory< SGNComponent >
using ConstructFunc = DELEGATE_STD< void, SceneGraphNode *, Args... >
 
using DestructFunc = DELEGATE_STD< void, SceneGraphNode * >
 
using FactoryContainerConstruct = ska::bytell_hash_map< ComponentType, ConstructFunc >
 
using FactoryContainerDestruct = ska::bytell_hash_map< ComponentType, DestructFunc >
 
- Protected Member Functions inherited from Divide::PlatformContextComponent
 PlatformContextComponent (PlatformContext &context) noexcept
 
virtual ~PlatformContextComponent ()=default
 
PlatformContextcontext () noexcept
 
const PlatformContextcontext () const noexcept
 
- Protected Member Functions inherited from Divide::NonCopyable
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (NonCopyable &&)=default
 
- Static Protected Member Functions inherited from Divide::Factory< SGNComponent >
static void construct (ComponentType type, SceneGraphNode *node, ConstructArgs &&... args)
 
static void destruct (const ComponentType type, SceneGraphNode *node)
 

Detailed Description

Definition at line 174 of file SGNComponent.h.

Constructor & Destructor Documentation

◆ SGNComponent()

Divide::SGNComponent::SGNComponent ( Key  key,
ComponentType  type,
SceneGraphNode parentSGN,
PlatformContext context 
)
explicit

Definition at line 15 of file SGNComponent.cpp.

Member Function Documentation

◆ editorComponent()

EditorComponent & Divide::SGNComponent::editorComponent ( )
inlinenoexcept

Definition at line 193 of file SGNComponent.h.

◆ enabled() [1/2]

bool Divide::SGNComponent::enabled ( ) const
virtual

Definition at line 66 of file SGNComponent.cpp.

◆ enabled() [2/2]

void Divide::SGNComponent::enabled ( bool  state)
virtual

Definition at line 71 of file SGNComponent.cpp.

◆ loadCache()

bool Divide::SGNComponent::loadCache ( ByteBuffer inputBuffer)
virtual

Definition at line 30 of file SGNComponent.cpp.

◆ loadFromXML()

void Divide::SGNComponent::loadFromXML ( const boost::property_tree::ptree &  pt)
virtual

Definition at line 56 of file SGNComponent.cpp.

◆ OnData()

void Divide::SGNComponent::OnData ( const ECS::CustomEvent data)
virtual

Definition at line 76 of file SGNComponent.cpp.

◆ POINTER_R_IW()

Divide::SGNComponent::POINTER_R_IW ( SceneGraphNode  ,
parentSGN  ,
nullptr   
)

◆ PROPERTY_R()

Divide::SGNComponent::PROPERTY_R ( EditorComponent  ,
editorComponent   
)

◆ PROPERTY_R_IW()

Divide::SGNComponent::PROPERTY_R_IW ( ComponentType  ,
type  ,
ComponentType::COUNT   
)

◆ saveCache()

bool Divide::SGNComponent::saveCache ( ByteBuffer outputBuffer) const
virtual

Definition at line 23 of file SGNComponent.cpp.

◆ saveToXML()

void Divide::SGNComponent::saveToXML ( boost::property_tree::ptree &  pt) const
virtual

Definition at line 51 of file SGNComponent.cpp.

◆ uniqueID()

U64 Divide::SGNComponent::uniqueID ( ) const

Definition at line 61 of file SGNComponent.cpp.

Friends And Related Function Documentation

◆ EditorComponent

friend class EditorComponent
friend

Definition at line 200 of file SGNComponent.h.

Member Data Documentation

◆ _enabled

std::atomic_bool Divide::SGNComponent::_enabled {true}
protected

Definition at line 202 of file SGNComponent.h.

◆ _hasChanged

std::atomic_bool Divide::SGNComponent::_hasChanged {false}
mutableprotected

Definition at line 203 of file SGNComponent.h.


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