Class CEnvironmentDirectedGraphDescription

Inheritance Relationships

Derived Type

Class Documentation

class CEnvironmentDirectedGraphDescription

Description class for directed graphs stored within the environment.

Allows properties to be attached to the vertices and edges of a directed graph stored within the environment. Properties can be any arithmetic or enum type.

Subclassed by flamegpu::EnvironmentDirectedGraphDescription

Public Functions

explicit CEnvironmentDirectedGraphDescription(std::shared_ptr<EnvironmentDirectedGraphData> data)

Constructor, creates an interface to the EnvironmentDirectedGraphData

Parameters:

data – Data store of this directed graphs’s data

explicit CEnvironmentDirectedGraphDescription(std::shared_ptr<const EnvironmentDirectedGraphData> data)
CEnvironmentDirectedGraphDescription(const CEnvironmentDirectedGraphDescription &other_graph) = default

Copy constructor Creates a new interface to the same EnvironmentDirectedGraphData/ModelData

CEnvironmentDirectedGraphDescription(CEnvironmentDirectedGraphDescription &&other_graph) = default
CEnvironmentDirectedGraphDescription &operator=(const CEnvironmentDirectedGraphDescription &other_graph) = default

Assignment operator Assigns this interface to the same EnvironmentDirectedGraphData/ModelData

CEnvironmentDirectedGraphDescription &operator=(CEnvironmentDirectedGraphDescription &&other_graph) = default
bool operator==(const CEnvironmentDirectedGraphDescription &rhs) const

Equality operator, checks whether EnvironmentDirectedGraphDescription hierarchies are functionally the same

Note

Instead compare pointers if you wish to check that they are the same instance

Parameters:

rhs – right hand side

Returns:

True when directed graphs are the same

bool operator!=(const CEnvironmentDirectedGraphDescription &rhs) const

Equality operator, checks whether EnvironmentDirectedGraphDescription hierarchies are functionally different

Note

Instead compare pointers if you wish to check that they are not the same instance

Parameters:

rhs – right hand side

Returns:

True when directed graphs are not the same

std::string getName() const

Const Accessors

Returns:

The graph’s name

const std::type_index &getVertexPropertyType(const std::string &property_name) const
Parameters:

property_name – Name used to refer to the desired property

Throws:

exception::InvalidGraphProperty – If a property with the name does not exist within the graph

Returns:

The type of the named property

const std::type_index &getEdgePropertyType(const std::string &property_name) const
size_t getVertexPropertySize(const std::string &property_name) const
Parameters:

property_name – Name used to refer to the desired property

Throws:

exception::InvalidGraphProperty – If a property with the name does not exist within the graph

Returns:

The size of the named property’s type

size_t getEdgePropertySize(const std::string &property_name) const
flamegpu::size_type getVertexPropertyLength(const std::string &property_name) const
Parameters:

property_name – Name used to refer to the desired property

Throws:

exception::InvalidGraphProperty – If a property with the name does not exist within the graph

Returns:

The number of elements in the name property (1 if it isn’t an array)

flamegpu::size_type getEdgePropertyLength(const std::string &property_name) const
flamegpu::size_type geVertexPropertiesCount() const

Get the total number of propertys this graph has

Note

This count includes internal properties used to track things such as ID

Returns:

The total number of properties within the graph

flamegpu::size_type getEdgePropertiesCount() const
bool hasVertexProperty(const std::string &property_name) const
Parameters:

property_name – Name of the property to check

Returns:

True when a property with the specified name exists within the graph

bool hasEdgeProperty(const std::string &property_name) const

Protected Attributes

std::shared_ptr<EnvironmentDirectedGraphData> graph

The class which stores all of the layer’s data.