VIPRA Documentation
Loading...
Searching...
No Matches
VIPRA::Behaviors::AttributeHandling Class Reference

Handles all getting/setting of attributes in Behaviors. More...

#include <attributes.hpp>

Classes

struct  DeferedCleanup
 

Static Public Member Functions

static auto get_value (Target target, Attribute attr, auto pack) -> CAttributeValue
 Returns the specified attribute value of the target.
 
static void set_value (Target target, Attribute attr, Simpack pack, VIPRA::State &state, CAttributeValue value)
 Sets a targets attribute value.
 
static void scale_value (Target target, Attribute attr, Simpack pack, VIPRA::State &state, CAttributeValue value)
 Scales a targets attribute value.
 
static auto is_coord_loc_compare (CAttributeValue value1, CAttributeValue value2) -> bool
 Checks if the values are a coordinate and a value, returns true if so.
 
static auto coord_loc_compare (CAttributeValue value1, CAttributeValue value2, auto pack) -> bool
 Compares a coordinate and location, returns true if the coordinate is in the location.
 
static auto is_equal (CAttributeValue value1, CAttributeValue value2, auto pack) -> bool
 Checks if two AttributeValues are equal.
 
static auto is_not_equal (CAttributeValue value1, CAttributeValue value2, auto pack) -> bool
 Checks if two AttributeValues are not equal.
 
template<typename value_t>
static auto store_value (Type type, value_t &&value) -> CAttributeValue
 Adds an attribute value to the value store, for later use in atoms.
 
static void cleanup ()
 

Detailed Description

Handles all getting/setting of attributes in Behaviors.

Member Function Documentation

◆ coord_loc_compare()

static auto VIPRA::Behaviors::AttributeHandling::coord_loc_compare ( CAttributeValue value1,
CAttributeValue value2,
auto pack ) -> bool
inlinestaticnodiscard

Compares a coordinate and location, returns true if the coordinate is in the location.

Parameters
value1: first value
value2: second value
pack: simulation pack
Returns
true : if coordinate is in location
false : if not

◆ get_value()

static auto VIPRA::Behaviors::AttributeHandling::get_value ( Target target,
Attribute attr,
auto pack ) -> CAttributeValue
inlinestaticnodiscard

Returns the specified attribute value of the target.

Parameters
target: target to get attribute from
attr: attribute type to get
pack: simulation pack
Returns
CAttributeValue

◆ is_coord_loc_compare()

static auto VIPRA::Behaviors::AttributeHandling::is_coord_loc_compare ( CAttributeValue value1,
CAttributeValue value2 ) -> bool
inlinestaticnodiscard

Checks if the values are a coordinate and a value, returns true if so.

Parameters
value1: first value
value2: second value
Returns
true : if one is a coordinate and the other is a location
false : if not

◆ is_equal()

static auto VIPRA::Behaviors::AttributeHandling::is_equal ( CAttributeValue value1,
CAttributeValue value2,
auto pack ) -> bool
inlinestaticnodiscard

Checks if two AttributeValues are equal.

Parameters
value1: first value
value2: second value
Returns
true : if equal
false : if not equal or not same type

◆ is_not_equal()

static auto VIPRA::Behaviors::AttributeHandling::is_not_equal ( CAttributeValue value1,
CAttributeValue value2,
auto pack ) -> bool
inlinestaticnodiscard

Checks if two AttributeValues are not equal.

Parameters
value1: first value
value2: second value
Returns
true : if not equal
false : if equal or not same type

◆ scale_value()

static void VIPRA::Behaviors::AttributeHandling::scale_value ( Target target,
Attribute attr,
Simpack pack,
VIPRA::State & state,
CAttributeValue value )
inlinestatic

Scales a targets attribute value.

Parameters
target: target to scale the attribute of
attr: attribute to scale
pack: simulation pack
state: timestep state
value: value to scale attribute by

◆ set_value()

static void VIPRA::Behaviors::AttributeHandling::set_value ( Target target,
Attribute attr,
Simpack pack,
VIPRA::State & state,
CAttributeValue value )
inlinestatic

Sets a targets attribute value.

Parameters
target: target to set the attribute of
attr: attribute to set
pack: simulation pack
state: timestep state
value: value to set attribute to

◆ store_value()

template<typename value_t>
static auto VIPRA::Behaviors::AttributeHandling::store_value ( Type type,
value_t && value ) -> CAttributeValue
inlinestaticnodiscard

Adds an attribute value to the value store, for later use in atoms.

Template Parameters
T: value type
Parameters
type: attribute type
value: attribute value
Returns
CAttributeValue

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