Crombie Tools
crombie::ObjectStore::ObjectStore< E, T, S, F > Class Template Reference

A generic class for storing a short vector of related particles, including information about the eventual output branche and extra sidecar info. More...

#include <ObjectStore.h>

Classes

struct  Particle
 

Public Types

enum  order { order::eAsc, order::eDesc }
 

Public Member Functions

 ObjectStore (const std::vector< E > sorted_enums, const std::function< F(const T &)> compare, const order which=order::eDesc)
 
 ~ObjectStore ()
 
void check (const T &obj, S extra={})
 

Public Attributes

std::vector< Particlestore
 

Private Attributes

const std::function< F(const T &)> compare
 
unsigned num_filled = 0
 
const unsigned total
 
const order which_order
 

Detailed Description

template<typename E, typename T, typename S = void*, typename F = float>
class crombie::ObjectStore::ObjectStore< E, T, S, F >

A generic class for storing a short vector of related particles, including information about the eventual output branche and extra sidecar info.

Parameters
Eis the enum class used to enumerate branches in the eventual output tree (see crombie maketree) for details.
Tis the type of object pointer to store. This object pointer must also be the input type for the comparison function.
Sis the type of the sidecar information to store. Can be a complicated struct, if you'd like.
Fis the return type of the comparison function.

Definition at line 24 of file ObjectStore.h.


Class Documentation

§ crombie::ObjectStore::ObjectStore::Particle

struct crombie::ObjectStore::ObjectStore::Particle

template<typename E, typename T, typename S = void*, typename F = float>
struct crombie::ObjectStore::ObjectStore< E, T, S, F >::Particle

Definition at line 42 of file ObjectStore.h.

Class Members
const E branch
S extra
const T * particle
F result

Member Enumeration Documentation

§ order

template<typename E , typename T , typename S = void*, typename F = float>
enum crombie::ObjectStore::ObjectStore::order
strong
Enumerator
eAsc 
eDesc 

Definition at line 27 of file ObjectStore.h.

Constructor & Destructor Documentation

§ ObjectStore()

template<typename E , typename T , typename S = void*, typename F = float>
crombie::ObjectStore::ObjectStore< E, T, S, F >::ObjectStore ( const std::vector< E >  sorted_enums,
const std::function< F(const T &)>  compare,
const order  which = order::eDesc 
)
inline

§ ~ObjectStore()

template<typename E , typename T , typename S = void*, typename F = float>
crombie::ObjectStore::ObjectStore< E, T, S, F >::~ObjectStore ( )
inline

Definition at line 40 of file ObjectStore.h.

Member Function Documentation

§ check()

Member Data Documentation

§ compare

template<typename E , typename T , typename S = void*, typename F = float>
const std::function<F(const T&)> crombie::ObjectStore::ObjectStore< E, T, S, F >::compare
private

§ num_filled

template<typename E , typename T , typename S = void*, typename F = float>
unsigned crombie::ObjectStore::ObjectStore< E, T, S, F >::num_filled = 0
private

§ store

template<typename E , typename T , typename S = void*, typename F = float>
std::vector<Particle> crombie::ObjectStore::ObjectStore< E, T, S, F >::store

§ total

template<typename E , typename T , typename S = void*, typename F = float>
const unsigned crombie::ObjectStore::ObjectStore< E, T, S, F >::total
private

§ which_order

template<typename E , typename T , typename S = void*, typename F = float>
const order crombie::ObjectStore::ObjectStore< E, T, S, F >::which_order
private

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