BioDynaMo  v1.05.120-25dc9790
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
bdm::GetDataMemberForVis< TReturn, TClass, TDataMember > Struct Template Reference

#include <mapped_data_array.h>

Public Types

enum  DataType { kDefault, kArray, kAgentUid, kSoPointer }
 
using TempValueType = typename std::remove_pointer< TReturn >::type
 

Public Member Functions

 GetDataMemberForVis ()
 
void Update ()
 
template<typename TTDataMember = TDataMember>
std::enable_if< GetDataType< TTDataMember >)==DataType::kDefault, TReturn >::type operator() (Agent *agent) const
 
template<typename TTDataMember = TDataMember>
std::enable_if< GetDataType< TTDataMember >)==DataType::kArray, TReturn >::type operator() (Agent *agent) const
 
template<typename TTDataMember = TDataMember>
std::enable_if< GetDataType< TTDataMember >)==DataType::kAgentUid, TReturn >::type operator() (Agent *agent) const
 
template<typename TTDataMember = TDataMember>
std::enable_if< GetDataType< TTDataMember >)==DataType::kSoPointer, TReturn >::type operator() (Agent *agent) const
 

Static Public Member Functions

template<typename T >
static constexpr DataType GetDataType ()
 

Public Attributes

uint64_t dm_offset_
 
std::vector< std::array< TempValueType, 64/sizeof(TempValueType)> > temp_values_
 Thread local storage for temporary values. More...
 

Detailed Description

template<typename TReturn, typename TClass, typename TDataMember>
struct bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >

Extract the data member value of an Agent given its concrete type, type of the data member, and data member offset from its concrete pointer.

Definition at line 39 of file mapped_data_array.h.

Member Typedef Documentation

◆ TempValueType

template<typename TReturn , typename TClass , typename TDataMember >
using bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::TempValueType = typename std::remove_pointer<TReturn>::type

Definition at line 41 of file mapped_data_array.h.

Member Enumeration Documentation

◆ DataType

template<typename TReturn , typename TClass , typename TDataMember >
enum bdm::GetDataMemberForVis::DataType
Enumerator
kDefault 
kArray 
kAgentUid 
kSoPointer 

Definition at line 55 of file mapped_data_array.h.

Constructor & Destructor Documentation

◆ GetDataMemberForVis()

template<typename TReturn , typename TClass , typename TDataMember >
bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::GetDataMemberForVis ( )
inline

Definition at line 46 of file mapped_data_array.h.

Member Function Documentation

◆ GetDataType()

template<typename TReturn , typename TClass , typename TDataMember >
template<typename T >
static constexpr DataType bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::GetDataType ( )
inlinestaticconstexpr

Definition at line 58 of file mapped_data_array.h.

◆ operator()() [1/4]

template<typename TReturn , typename TClass , typename TDataMember >
template<typename TTDataMember = TDataMember>
std::enable_if<GetDataType<TTDataMember>) == DataType::kDefault, TReturn>::type bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::operator() ( Agent agent) const
inline

Definition at line 72 of file mapped_data_array.h.

◆ operator()() [2/4]

template<typename TReturn , typename TClass , typename TDataMember >
template<typename TTDataMember = TDataMember>
std::enable_if<GetDataType<TTDataMember>) == DataType::kArray, TReturn>::type bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::operator() ( Agent agent) const
inline

Definition at line 81 of file mapped_data_array.h.

◆ operator()() [3/4]

template<typename TReturn , typename TClass , typename TDataMember >
template<typename TTDataMember = TDataMember>
std::enable_if<GetDataType<TTDataMember>) == DataType::kAgentUid, TReturn>::type bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::operator() ( Agent agent) const
inline

Definition at line 92 of file mapped_data_array.h.

◆ operator()() [4/4]

template<typename TReturn , typename TClass , typename TDataMember >
template<typename TTDataMember = TDataMember>
std::enable_if<GetDataType<TTDataMember>) == DataType::kSoPointer, TReturn>::type bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::operator() ( Agent agent) const
inline

Definition at line 106 of file mapped_data_array.h.

◆ Update()

template<typename TReturn , typename TClass , typename TDataMember >
void bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::Update ( )
inline

Definition at line 48 of file mapped_data_array.h.

Member Data Documentation

◆ dm_offset_

template<typename TReturn , typename TClass , typename TDataMember >
uint64_t bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::dm_offset_

Definition at line 40 of file mapped_data_array.h.

◆ temp_values_

template<typename TReturn , typename TClass , typename TDataMember >
std::vector<std::array<TempValueType, 64 / sizeof(TempValueType)> > bdm::GetDataMemberForVis< TReturn, TClass, TDataMember >::temp_values_
mutable

Thread local storage for temporary values.

Definition at line 44 of file mapped_data_array.h.


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