Struct NewAgentStorage

Struct Documentation

struct NewAgentStorage

This struct provides a compact memory store for storing generic variables in a single struct

Public Functions

inline explicit NewAgentStorage(const VarOffsetStruct &v, id_t id)
NewAgentStorage(const NewAgentStorage &other) = delete

New agent storage cannot be copied, as it requires a unique ID

inline NewAgentStorage(NewAgentStorage &&other) noexcept

New agent storage can be moved

inline NewAgentStorage &operator=(const NewAgentStorage &hna)

Assigning new agent storage copies all items except for internal members (variables that begin with _, such as _id)

inline ~NewAgentStorage()
template<typename T>
inline void setVariable(const std::string &var_name, const T val)
template<typename T, unsigned int N = 0>
inline void setVariable(const std::string &var_name, const unsigned int index, const T val)
template<typename T, unsigned int N>
inline void setVariable(const std::string &var_name, const std::array<T, N> &val)
template<typename T>
inline T getVariable(const std::string &var_name) const
template<typename T, unsigned int N = 0>
inline T getVariable(const std::string &var_name, const unsigned int index)
template<typename T, unsigned int N>
inline std::array<T, N> getVariable(const std::string &var_name)

Friends

friend class CUDASimulation
friend class DeviceAgentVector_impl