Polyphase Game Engine
Loading...
Searching...
No Matches
NodeGraphAsset Class Reference

#include <NodeGraphAsset.h>

Inheritance diagram for NodeGraphAsset:
Asset Object

Public Member Functions

 DECLARE_ASSET (NodeGraphAsset, Asset)
 
 NodeGraphAsset ()
 
 ~NodeGraphAsset ()
 
virtual void LoadStream (Stream &stream, Platform platform) override
 
virtual void SaveStream (Stream &stream, Platform platform) override
 
virtual void Create () override
 
virtual void Destroy () override
 
virtual void GatherProperties (std::vector< Property > &outProps) override
 
virtual glm::vec4 GetTypeColor () override
 
virtual const char * GetTypeName () override
 
NodeGraphGetGraph ()
 
const NodeGraphGetGraph () const
 
NodeGraphAddFunctionGraph (const std::string &name)
 
void RemoveFunctionGraph (uint32_t index)
 
NodeGraphFindFunctionGraph (const std::string &name) const
 
uint32_t GetNumFunctionGraphs () const
 
NodeGraphGetFunctionGraph (uint32_t index)
 
const std::vector< NodeGraph * > & GetFunctionGraphs () const
 
void RenameFunctionGraph (uint32_t index, const std::string &newName)
 
void ResolveFunctionCallNodes ()
 
void ResolveVariableNodes ()
 
int32_t AddVariable (const std::string &name, DatumType type)
 
void RemoveVariable (uint32_t index)
 
void RenameVariable (uint32_t index, const std::string &newName)
 
int32_t FindVariableIndex (const std::string &name) const
 
GraphVariableGetVariable (uint32_t index)
 
const GraphVariableGetVariable (uint32_t index) const
 
uint32_t GetNumVariables () const
 
const std::vector< GraphVariable > & GetVariables () const
 
std::vector< GraphVariable > & GetVariables ()
 
void ResetVariablesToDefaults ()
 
- Public Member Functions inherited from Asset
 DECLARE_FACTORY_MANAGER (Asset)
 
 DECLARE_FACTORY (Asset, Asset)
 
 DECLARE_OBJECT (Asset, Object)
 
 Asset ()
 
virtual ~Asset ()
 
virtual void Copy (Asset *srcAsset)
 
const std::string & GetName () const
 
bool IsLoaded () const
 
bool IsRefCounted () const
 
int32_t GetRefCount () const
 
bool IsEmbedded () const
 
void SetEmbedded (bool embed)
 
bool IsEngineAsset () const
 
void SetEngineAsset (bool engineAsset)
 
void SetName (const std::string &name)
 
void IncrementRefCount ()
 
void DecrementRefCount ()
 
void LoadFile (const char *path, AsyncLoadRequest *request=nullptr)
 
void LoadEmbedded (const EmbeddedFile *embeddedAsset, AsyncLoadRequest *request=nullptr)
 
void SaveFile (const char *path, Platform platform)
 
virtual bool Import (const std::string &path, ImportOptions *options=nullptr)
 
virtual const char * GetTypeImportExt ()
 
virtual bool ShouldSnapshotForPie () const
 
bool IsTransient () const
 
void SetTransient (bool transient)
 
uint64_t GetUuid () const
 
void SetUuid (uint64_t uuid)
 
void EnsureUuid ()
 
void WriteHeader (Stream &stream)
 
- Public Member Functions inherited from Object
virtual ~Object ()=default
 
virtual const char * RuntimeName () const =0
 
virtual const char * RuntimeParentName () const =0
 
virtual RuntimeId InstanceRuntimeId () const =0
 
virtual ObjectQueryInterface (RuntimeId id) const
 
virtual bool Is (RuntimeId id) const
 
virtual bool Is (const char *name) const
 
virtual bool DrawCustomProperty (Property &prop)
 
template<typename T >
T * As () const
 
virtual bool Equals (const Object *rhs) const
 

Static Public Member Functions

static bool HandlePropChange (Datum *datum, uint32_t index, const void *newValue)
 
- Static Public Member Functions inherited from Asset
static AssetHeader ReadHeader (Stream &stream)
 
static std::string GetNameFromPath (const std::string &path)
 
static std::string GetDirectoryFromPath (const std::string &path)
 
static const char * GetNameFromTypeId (TypeId id)
 
static TypeId GetTypeIdFromName (const char *name)
 
- Static Public Member Functions inherited from Object
static const char * ClassRuntimeName ()
 

Protected Attributes

NodeGraph mGraph
 
std::vector< NodeGraph * > mFunctionGraphs
 
std::vector< GraphVariablemVariables
 
int32_t mDomainIndex = 0
 
- Protected Attributes inherited from Asset
uint32_t mVersion = 0
 
TypeId mType = INVALID_TYPE_ID
 
uint64_t mUuid = 0
 
bool mEmbedded = false
 
bool mLoaded = false
 
bool mEnableRefCount = true
 
bool mEngineAsset = false
 
bool mTransient = false
 
std::string mName = "Asset"
 
int32_t mRefCount = 0
 

Constructor & Destructor Documentation

◆ NodeGraphAsset()

NodeGraphAsset::NodeGraphAsset ( )

◆ ~NodeGraphAsset()

NodeGraphAsset::~NodeGraphAsset ( )

Member Function Documentation

◆ AddFunctionGraph()

NodeGraph * NodeGraphAsset::AddFunctionGraph ( const std::string &  name)

◆ AddVariable()

int32_t NodeGraphAsset::AddVariable ( const std::string &  name,
DatumType  type 
)

◆ Create()

void NodeGraphAsset::Create ( )
overridevirtual

Reimplemented from Asset.

◆ DECLARE_ASSET()

NodeGraphAsset::DECLARE_ASSET ( NodeGraphAsset  ,
Asset   
)

◆ Destroy()

void NodeGraphAsset::Destroy ( )
overridevirtual

Reimplemented from Asset.

◆ FindFunctionGraph()

NodeGraph * NodeGraphAsset::FindFunctionGraph ( const std::string &  name) const

◆ FindVariableIndex()

int32_t NodeGraphAsset::FindVariableIndex ( const std::string &  name) const

◆ GatherProperties()

void NodeGraphAsset::GatherProperties ( std::vector< Property > &  outProps)
overridevirtual

Reimplemented from Asset.

◆ GetFunctionGraph()

NodeGraph * NodeGraphAsset::GetFunctionGraph ( uint32_t  index)

◆ GetFunctionGraphs()

const std::vector< NodeGraph * > & NodeGraphAsset::GetFunctionGraphs ( ) const
inline

◆ GetGraph() [1/2]

NodeGraph & NodeGraphAsset::GetGraph ( )
inline

◆ GetGraph() [2/2]

const NodeGraph & NodeGraphAsset::GetGraph ( ) const
inline

◆ GetNumFunctionGraphs()

uint32_t NodeGraphAsset::GetNumFunctionGraphs ( ) const
inline

◆ GetNumVariables()

uint32_t NodeGraphAsset::GetNumVariables ( ) const
inline

◆ GetTypeColor()

glm::vec4 NodeGraphAsset::GetTypeColor ( )
overridevirtual

Reimplemented from Asset.

◆ GetTypeName()

const char * NodeGraphAsset::GetTypeName ( )
overridevirtual

Reimplemented from Asset.

◆ GetVariable() [1/2]

GraphVariable * NodeGraphAsset::GetVariable ( uint32_t  index)

◆ GetVariable() [2/2]

const GraphVariable * NodeGraphAsset::GetVariable ( uint32_t  index) const

◆ GetVariables() [1/2]

std::vector< GraphVariable > & NodeGraphAsset::GetVariables ( )
inline

◆ GetVariables() [2/2]

const std::vector< GraphVariable > & NodeGraphAsset::GetVariables ( ) const
inline

◆ HandlePropChange()

bool NodeGraphAsset::HandlePropChange ( Datum datum,
uint32_t  index,
const void *  newValue 
)
static

◆ LoadStream()

void NodeGraphAsset::LoadStream ( Stream stream,
Platform  platform 
)
overridevirtual

Reimplemented from Asset.

◆ RemoveFunctionGraph()

void NodeGraphAsset::RemoveFunctionGraph ( uint32_t  index)

◆ RemoveVariable()

void NodeGraphAsset::RemoveVariable ( uint32_t  index)

◆ RenameFunctionGraph()

void NodeGraphAsset::RenameFunctionGraph ( uint32_t  index,
const std::string &  newName 
)

◆ RenameVariable()

void NodeGraphAsset::RenameVariable ( uint32_t  index,
const std::string &  newName 
)

◆ ResetVariablesToDefaults()

void NodeGraphAsset::ResetVariablesToDefaults ( )

◆ ResolveFunctionCallNodes()

void NodeGraphAsset::ResolveFunctionCallNodes ( )

◆ ResolveVariableNodes()

void NodeGraphAsset::ResolveVariableNodes ( )

◆ SaveStream()

void NodeGraphAsset::SaveStream ( Stream stream,
Platform  platform 
)
overridevirtual

Reimplemented from Asset.

Member Data Documentation

◆ mDomainIndex

int32_t NodeGraphAsset::mDomainIndex = 0
protected

◆ mFunctionGraphs

std::vector<NodeGraph*> NodeGraphAsset::mFunctionGraphs
protected

◆ mGraph

NodeGraph NodeGraphAsset::mGraph
protected

◆ mVariables

std::vector<GraphVariable> NodeGraphAsset::mVariables
protected

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