Class DependencyNode

Inheritance Relationships

Derived Types

Class Documentation

class DependencyNode

Node of DependencyGraph

Subclassed by flamegpu::CAgentFunctionDescription, flamegpu::CSubModelDescription, flamegpu::HostFunctionDescription

Public Functions

virtual ~DependencyNode()

Constructors

template<typename A>
inline void dependsOn(A &dep)

Specifies that this agent function depends on the completion of all of the provided functions

Parameters:

dep – The host functions, agent functions and submodels which this depends on

Template Parameters:

A – function description object (e.g. AgentFunctionDescription, HostFunctionDescriotion)

template<typename A, typename ...Args>
inline void dependsOn(A &dep, Args&... dependencyList)

Varadic version of DependencyNode::dependsOn(A& dep) for specifying multiple dependencies of the same DependencyNode in a single statement Specifies that this agent function depends on the completion of all of the provided functions

Parameters:
  • dep – The host functions, agent functions and submodels which this depends on

  • dependencyList – More arguments suitable for dep

Template Parameters:

Protected Functions

void addDependent(DependencyNode &dependent)

Adds an agent function to this agent function’s list of dependents

void dependsOnImpl(DependencyNode &dependency)

Auxillary function for dependency construction

void setMinimumLayerDepth(const int minLayerDepth)

Sets the minimum layer depth for this agent function

Dependency functions

bool hasDependents() const

Accessors

Returns:

Whether this agent function has any dependents

const std::vector<DependencyNode*> getDependents() const
Returns:

Immutable vector of the dependents of this agent function

bool hasDependencies() const
Returns:

Whether this agent function has any dependencies

const std::vector<DependencyNode*> getDependencies() const
Returns:

The vector of the dependencies of this agent function

int getMinimumLayerDepth()
Returns:

The minimum layer depth for this agent function

Protected Attributes

std::vector<DependencyNode*> dependents

Vector storing the ‘children’ of this agent function in the dependency tree, i.e. those functions which depend on the completion of this one

std::vector<DependencyNode*> dependencies

Vector storing the ‘parents’ of this agent function in the dependency tree, i.e. those functions which must be completed before this one may begin

int minLayerDepth = 0

This functions minimum layer depth in the execution graph

Friends

friend class DependencyGraph