Class MessageBruteForce::CDescription
Defined in File MessageBruteForceHost.h
Nested Relationships
This class is a nested type of Class MessageBruteForce.
Inheritance Relationships
Derived Types
public flamegpu::MessageArray2D::CDescription
(Class MessageArray2D::CDescription)public flamegpu::MessageArray3D::CDescription
(Class MessageArray3D::CDescription)public flamegpu::MessageArray::CDescription
(Class MessageArray::CDescription)public flamegpu::MessageBruteForce::Description
(Class MessageBruteForce::Description)public flamegpu::MessageBucket::CDescription
(Class MessageBucket::CDescription)public flamegpu::MessageSpatial2D::CDescription
(Class MessageSpatial2D::CDescription)
Class Documentation
-
class CDescription
Subclassed by flamegpu::MessageArray2D::CDescription, flamegpu::MessageArray3D::CDescription, flamegpu::MessageArray::CDescription, flamegpu::MessageBruteForce::Description, flamegpu::MessageBucket::CDescription, flamegpu::MessageSpatial2D::CDescription
Public Functions
-
Constructor, creates an interface to the MessageData
- Parameters:
data – Data store of this message’s data
-
CDescription(const CDescription &other_agent) = default
Copy constructor Creates a new interface to the same MessageData/ModelData
-
CDescription(CDescription &&other_agent) = default
-
CDescription &operator=(const CDescription &other_agent) = default
Assignment operator Assigns this interface to the same MessageData/ModelData
-
CDescription &operator=(CDescription &&other_agent) = default
-
bool operator==(const CDescription &rhs) const
Equality operator, checks whether message Description 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 messages are the same
-
bool operator!=(const CDescription &rhs) const
Equality operator, checks whether message Description 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 messages are not the same
-
std::string getName() const
Const Accessors
- Returns:
The message’s name
-
bool getPersistent() const
Query if the message list is a persistent message list or not (messages will persist from one iteration to the next)
- Returns:
if the message list is persistent or not
-
const std::type_index &getVariableType(const std::string &variable_name) const
- Parameters:
variable_name – Name used to refer to the desired variable
- Throws:
exception::InvalidMessageVar – If a variable with the name does not exist within the message
- Returns:
The type of the named variable
-
size_t getVariableSize(const std::string &variable_name) const
- Parameters:
variable_name – Name used to refer to the desired variable
- Throws:
exception::InvalidMessageVar – If a variable with the name does not exist within the message
- Returns:
The size of the named variable’s type
-
size_type getVariableLength(const std::string &variable_name) const
- Parameters:
variable_name – Name used to refer to the desired variable
- Throws:
exception::InvalidMessageVar – If a variable with the name does not exist within the agent
- Returns:
The number of elements in the name variable (1 if it isn’t an array)
-
size_type getVariablesCount() const
- Returns:
The total number of variables within the message
-
bool hasVariable(const std::string &variable_name) const
- Parameters:
variable_name – Name of the variable to check
- Returns:
True when a variable with the specified name exists within the message
Protected Functions
-
inline void setPersistent(const bool persistent)
These mutable accessors will only be available via mutable subclasses This solves a multiple inheritance issue Set that the message list should be persistent or not
- Parameters:
persistent – new value for message list persistence
-
template<typename T>
void newVariable(const std::string &variable_name) Adds a new variable to the message
Template implementation
- Parameters:
variable_name – Name of the variable
- Template Parameters:
T – Type of the message variable, this must be an arithmetic type
- Throws:
exception::InvalidMessageVar – If a variable already exists within the message with the same name
-
template<typename T, flamegpu::size_type N>
void newVariable(const std::string &variable_name) Adds a new variable array to the message
- Parameters:
variable_name – Name of the variable array
- Template Parameters:
T – Type of the message variable, this must be an arithmetic type
N – The length of the variable array (1 if not an array, must be greater than 0)
- Throws:
exception::InvalidMessageVar – If a variable already exists within the message with the same name
exception::InvalidMessageVar – If N is <= 0
Protected Attributes
-
std::shared_ptr<Data> message
The class which stores all of the message’s data.
-