aether::global_state_base< OctreeTraits > Class Template Referenceabstract

A base type for a global state process implementation. More...

#include <global_state.hh>

Public Types

using octree_traits = OctreeTraits
 
using reader_type = typename detail::find_messaging_type< octree_traits >::message_reader_type
 
using writer_type = message::writer< octree_traits, container::ring_buffer< char >>
 
using subscriber_topic_type = message::subscriber_topic_type
 
using morton_type = typename octree_traits::morton_type
 

Public Member Functions

uint64_t get_tick () const
 
virtual std::unique_ptr< external_storage_ifacebuild_external_storage ()
 Override in order to implement external storage for the global state process. More...
 
virtual std::vector< subscriber_topic_typeget_topics ()
 Override to select which topics will global state listen to. More...
 
virtual void process_messages (reader_type &reader, writer_type &writer)=0
 Main update function of the global state process, called by Aether every tick. More...
 
virtual ~global_state_base ()
 Destroy the global state object. More...
 

Static Public Attributes

static constexpr size_t dimension = morton_type::dimension
 

Friends

template<typename P >
class internal::global_state_process
 

Detailed Description

template<typename OctreeTraits>
class aether::global_state_base< OctreeTraits >

A base type for a global state process implementation.

Initialized through aether::octree_params_default::configure_global_state

See Simulation/Global-State in the documentation for an overview.

Member Typedef Documentation

template<typename OctreeTraits >
using aether::global_state_base< OctreeTraits >::morton_type = typename octree_traits::morton_type
template<typename OctreeTraits >
using aether::global_state_base< OctreeTraits >::octree_traits = OctreeTraits
template<typename OctreeTraits >
using aether::global_state_base< OctreeTraits >::reader_type = typename detail::find_messaging_type<octree_traits>::message_reader_type
template<typename OctreeTraits >
using aether::global_state_base< OctreeTraits >::subscriber_topic_type = message::subscriber_topic_type
template<typename OctreeTraits >
using aether::global_state_base< OctreeTraits >::writer_type = message::writer<octree_traits, container::ring_buffer<char>>

Constructor & Destructor Documentation

template<typename OctreeTraits >
virtual aether::global_state_base< OctreeTraits >::~global_state_base ( )
inlinevirtual

Destroy the global state object.

At the moment not guaranteed to be called on shutdown.

Member Function Documentation

template<typename OctreeTraits >
virtual std::unique_ptr<external_storage_iface> aether::global_state_base< OctreeTraits >::build_external_storage ( )
inlinevirtual

Override in order to implement external storage for the global state process.

See aether::external_storage_base.

template<typename OctreeTraits >
uint64_t aether::global_state_base< OctreeTraits >::get_tick ( ) const
inline
Returns
Current simulation tick
template<typename OctreeTraits >
virtual std::vector<subscriber_topic_type> aether::global_state_base< OctreeTraits >::get_topics ( )
inlinevirtual

Override to select which topics will global state listen to.

Returns
A list of topics in which this global state implementation is interested in, empty by default.

Called every simulation tick.

template<typename OctreeTraits >
virtual void aether::global_state_base< OctreeTraits >::process_messages ( reader_type reader,
writer_type writer 
)
pure virtual

Main update function of the global state process, called by Aether every tick.

Friends And Related Function Documentation

template<typename OctreeTraits >
template<typename P >
friend class internal::global_state_process
friend

Member Data Documentation

template<typename OctreeTraits >
constexpr size_t aether::global_state_base< OctreeTraits >::dimension = morton_type::dimension
static