Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::NodeGraphManager Class Reference

NodeGraphManager - Manages multiple node graphs Allows opening multiple behavior trees/FSMs simultaneously. More...

#include <BTNodeGraphManager.h>

Public Member Functions

void Initialize ()
 
void Shutdown ()
 
int CreateGraph (const std::string &name, const std::string &type)
 
bool CloseGraph (int graphId)
 
NodeGraphGetGraph (int graphId)
 
const NodeGraphGetGraph (int graphId) const
 
void SetActiveGraph (int graphId)
 
int GetActiveGraphId () const
 
NodeGraphGetActiveGraph ()
 
const NodeGraphGetActiveGraph () const
 
std::vector< intGetAllGraphIds () const
 
std::string GetGraphName (int graphId) const
 
void SetGraphOrder (const std::vector< int > &newOrder)
 
bool SaveGraph (int graphId, const std::string &filepath)
 
int LoadGraph (const std::string &filepath)
 
bool IsInitialized () const
 
bool IsGraphDirty (int graphId) const
 
bool HasUnsavedChanges () const
 

Static Public Member Functions

static NodeGraphManagerInstance ()
 
static NodeGraphManagerGet ()
 

Private Member Functions

 NodeGraphManager ()
 
 ~NodeGraphManager ()
 
 NodeGraphManager (const NodeGraphManager &)=delete
 
NodeGraphManageroperator= (const NodeGraphManager &)=delete
 

Private Attributes

bool m_Initialized = false
 
int m_ActiveGraphId = -1
 
int m_LastActiveGraphId = -1
 
int m_NextGraphId = 1
 
std::map< int, std::unique_ptr< NodeGraph > > m_Graphs
 
std::vector< intm_GraphOrder
 

Detailed Description

NodeGraphManager - Manages multiple node graphs Allows opening multiple behavior trees/FSMs simultaneously.

Definition at line 409 of file BTNodeGraphManager.h.

Constructor & Destructor Documentation

◆ NodeGraphManager() [1/2]

Olympe::NodeGraphManager::NodeGraphManager ( )
private

Definition at line 753 of file BTNodeGraphManager.cpp.

◆ ~NodeGraphManager()

Olympe::NodeGraphManager::~NodeGraphManager ( )
private

Definition at line 757 of file BTNodeGraphManager.cpp.

References Shutdown().

+ Here is the call graph for this function:

◆ NodeGraphManager() [2/2]

Olympe::NodeGraphManager::NodeGraphManager ( const NodeGraphManager )
privatedelete

Member Function Documentation

◆ CloseGraph()

bool Olympe::NodeGraphManager::CloseGraph ( int  graphId)

◆ CreateGraph()

int Olympe::NodeGraphManager::CreateGraph ( const std::string &  name,
const std::string &  type 
)

◆ Get()

static NodeGraphManager & Olympe::NodeGraphManager::Get ( )
inlinestatic

Definition at line 413 of file BTNodeGraphManager.h.

References Instance().

Referenced by Olympe::BehaviorTreeRenderer::AcceptNodeDrop(), Olympe::BehaviorTreeRenderer::CreateNew(), Olympe::NodeGraphPanel::CreateNewNode(), Olympe::Blueprint::CreateNodeCommand::Execute(), Olympe::Blueprint::DeleteNodeCommand::Execute(), Olympe::Blueprint::MoveNodeCommand::Execute(), Olympe::Blueprint::LinkNodesCommand::Execute(), Olympe::Blueprint::UnlinkNodesCommand::Execute(), Olympe::Blueprint::SetParameterCommand::Execute(), Olympe::Blueprint::DuplicateNodeCommand::Execute(), Olympe::Blueprint::EditNodeCommand::Execute(), Olympe::NodeGraphShared::BTGraphDocumentConverter::FromBehaviorTree(), Olympe::BehaviorTreeRenderer::HandleKeyboardShortcuts(), Olympe::NodeGraphPanel::HandleKeyboardShortcuts(), Olympe::NodeGraphPanel::HandleNodeInteractions(), Olympe::BlueprintEditor::Initialize(), Olympe::BehaviorTreeRenderer::IsDirty(), Olympe::BehaviorTreeRenderer::Load(), Olympe::BehaviorTreeRenderer::OnRunGraphClicked(), Olympe::BlueprintEditor::OpenGraphInEditor(), Olympe::BTNodePropertyPanel::Render(), Olympe::BehaviorTreeRenderer::Render(), Olympe::NodeGraphPanel::RenderContent(), Olympe::NodeGraphPanel::RenderContextMenu(), Olympe::NodeGraphPanel::RenderGraph(), Olympe::NodeGraphPanel::RenderGraphTabs(), Olympe::BTNodePropertyPanel::RenderNodeBasicInfo(), Olympe::NodeGraphPanel::RenderNodeEditModal(), Olympe::BehaviorTreeDebugWindow::RenderNodeGraphDebugPanel(), Olympe::NodeGraphPanel::RenderNodePinsAndContent(), Olympe::BehaviorTreeRenderer::Save(), Olympe::BTNodePropertyPanel::SetSelectedNode(), Olympe::BlueprintEditor::Shutdown(), Olympe::BehaviorTreeDebugWindow::ShutdownNodeGraphDebugMode(), Olympe::NodeGraphPanel::SyncNodePositionsFromImNodes(), Olympe::Blueprint::CreateNodeCommand::Undo(), Olympe::Blueprint::DeleteNodeCommand::Undo(), Olympe::Blueprint::MoveNodeCommand::Undo(), Olympe::Blueprint::LinkNodesCommand::Undo(), Olympe::Blueprint::UnlinkNodesCommand::Undo(), Olympe::Blueprint::SetParameterCommand::Undo(), Olympe::Blueprint::DuplicateNodeCommand::Undo(), Olympe::Blueprint::EditNodeCommand::Undo(), Olympe::ValidationPanel::ValidateActiveGraph(), and Olympe::BehaviorTreeRenderer::~BehaviorTreeRenderer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetActiveGraph() [1/2]

NodeGraph * Olympe::NodeGraphManager::GetActiveGraph ( )

◆ GetActiveGraph() [2/2]

const NodeGraph * Olympe::NodeGraphManager::GetActiveGraph ( ) const

Definition at line 880 of file BTNodeGraphManager.cpp.

References GetGraph(), and m_ActiveGraphId.

+ Here is the call graph for this function:

◆ GetActiveGraphId()

int Olympe::NodeGraphManager::GetActiveGraphId ( ) const
inline

◆ GetAllGraphIds()

std::vector< int > Olympe::NodeGraphManager::GetAllGraphIds ( ) const

Definition at line 885 of file BTNodeGraphManager.cpp.

References m_GraphOrder.

Referenced by Olympe::NodeGraphPanel::RenderGraphTabs().

+ Here is the caller graph for this function:

◆ GetGraph() [1/2]

NodeGraph * Olympe::NodeGraphManager::GetGraph ( int  graphId)

Definition at line 850 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static(), and m_Graphs.

Referenced by Olympe::BehaviorTreeRenderer::AcceptNodeDrop(), Olympe::Blueprint::CreateNodeCommand::Execute(), Olympe::Blueprint::DeleteNodeCommand::Execute(), Olympe::Blueprint::MoveNodeCommand::Execute(), Olympe::Blueprint::LinkNodesCommand::Execute(), Olympe::Blueprint::UnlinkNodesCommand::Execute(), Olympe::Blueprint::SetParameterCommand::Execute(), Olympe::Blueprint::DuplicateNodeCommand::Execute(), Olympe::Blueprint::EditNodeCommand::Execute(), Olympe::NodeGraphShared::BTGraphDocumentConverter::FromBehaviorTree(), GetActiveGraph(), GetActiveGraph(), GetGraphName(), Olympe::BehaviorTreeRenderer::HandleKeyboardShortcuts(), Olympe::BehaviorTreeRenderer::IsDirty(), IsGraphDirty(), Olympe::BehaviorTreeRenderer::OnRunGraphClicked(), Olympe::BTNodePropertyPanel::Render(), Olympe::NodeGraphPanel::RenderGraph(), Olympe::NodeGraphPanel::RenderGraphTabs(), Olympe::BTNodePropertyPanel::RenderNodeBasicInfo(), Olympe::BehaviorTreeDebugWindow::RenderNodeGraphDebugPanel(), SaveGraph(), Olympe::BTNodePropertyPanel::SetSelectedNode(), Olympe::NodeGraphPanel::SyncNodePositionsFromImNodes(), Olympe::Blueprint::CreateNodeCommand::Undo(), Olympe::Blueprint::DeleteNodeCommand::Undo(), Olympe::Blueprint::MoveNodeCommand::Undo(), Olympe::Blueprint::LinkNodesCommand::Undo(), Olympe::Blueprint::UnlinkNodesCommand::Undo(), Olympe::Blueprint::SetParameterCommand::Undo(), Olympe::Blueprint::DuplicateNodeCommand::Undo(), and Olympe::Blueprint::EditNodeCommand::Undo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGraph() [2/2]

const NodeGraph * Olympe::NodeGraphManager::GetGraph ( int  graphId) const

Definition at line 858 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static(), and m_Graphs.

+ Here is the call graph for this function:

◆ GetGraphName()

std::string Olympe::NodeGraphManager::GetGraphName ( int  graphId) const

Definition at line 891 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static(), and GetGraph().

Referenced by Olympe::NodeGraphPanel::RenderGraphTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasUnsavedChanges()

bool Olympe::NodeGraphManager::HasUnsavedChanges ( ) const

Definition at line 1163 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static(), and m_Graphs.

+ Here is the call graph for this function:

◆ Initialize()

void Olympe::NodeGraphManager::Initialize ( )

Definition at line 762 of file BTNodeGraphManager.cpp.

References m_Initialized.

Referenced by Olympe::BlueprintEditor::Initialize().

+ Here is the caller graph for this function:

◆ Instance()

NodeGraphManager & Olympe::NodeGraphManager::Instance ( )
static

Definition at line 747 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static().

Referenced by Get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsGraphDirty()

bool Olympe::NodeGraphManager::IsGraphDirty ( int  graphId) const

Definition at line 1157 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static(), and GetGraph().

+ Here is the call graph for this function:

◆ IsInitialized()

bool Olympe::NodeGraphManager::IsInitialized ( ) const
inline

Definition at line 441 of file BTNodeGraphManager.h.

References m_Initialized.

◆ LoadGraph()

int Olympe::NodeGraphManager::LoadGraph ( const std::string &  filepath)

◆ operator=()

NodeGraphManager & Olympe::NodeGraphManager::operator= ( const NodeGraphManager )
privatedelete

◆ SaveGraph()

bool Olympe::NodeGraphManager::SaveGraph ( int  graphId,
const std::string &  filepath 
)

Definition at line 914 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static(), and GetGraph().

Referenced by Olympe::BehaviorTreeRenderer::Save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetActiveGraph()

void Olympe::NodeGraphManager::SetActiveGraph ( int  graphId)

◆ SetGraphOrder()

void Olympe::NodeGraphManager::SetGraphOrder ( const std::vector< int > &  newOrder)

Definition at line 897 of file BTNodeGraphManager.cpp.

References GetComponentTypeID_Static(), m_GraphOrder, and m_Graphs.

+ Here is the call graph for this function:

◆ Shutdown()

void Olympe::NodeGraphManager::Shutdown ( )

Definition at line 771 of file BTNodeGraphManager.cpp.

References m_ActiveGraphId, m_Graphs, and m_Initialized.

Referenced by Olympe::BlueprintEditor::Shutdown(), and ~NodeGraphManager().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ActiveGraphId

int Olympe::NodeGraphManager::m_ActiveGraphId = -1
private

◆ m_GraphOrder

std::vector<int> Olympe::NodeGraphManager::m_GraphOrder
private

◆ m_Graphs

std::map<int, std::unique_ptr<NodeGraph> > Olympe::NodeGraphManager::m_Graphs
private

◆ m_Initialized

bool Olympe::NodeGraphManager::m_Initialized = false
private

Definition at line 455 of file BTNodeGraphManager.h.

Referenced by Initialize(), IsInitialized(), and Shutdown().

◆ m_LastActiveGraphId

int Olympe::NodeGraphManager::m_LastActiveGraphId = -1
private

Definition at line 457 of file BTNodeGraphManager.h.

Referenced by CloseGraph(), CreateGraph(), LoadGraph(), and SetActiveGraph().

◆ m_NextGraphId

int Olympe::NodeGraphManager::m_NextGraphId = 1
private

Definition at line 458 of file BTNodeGraphManager.h.

Referenced by CreateGraph(), and LoadGraph().


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