|
Crombie Tools
|
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< Particle > | store |
Private Attributes | |
| const std::function< F(const T &)> | compare |
| unsigned | num_filled = 0 |
| const unsigned | total |
| const order | which_order |
A generic class for storing a short vector of related particles, including information about the eventual output branche and extra sidecar info.
| E | is the enum class used to enumerate branches in the eventual output tree (see crombie maketree) for details. |
| T | is the type of object pointer to store. This object pointer must also be the input type for the comparison function. |
| S | is the type of the sidecar information to store. Can be a complicated struct, if you'd like. |
| F | is the return type of the comparison function. |
Definition at line 24 of file ObjectStore.h.
| struct crombie::ObjectStore::ObjectStore::Particle |
Definition at line 42 of file ObjectStore.h.
| Class Members | ||
|---|---|---|
| const E | branch | |
| S | extra | |
| const T * | particle | |
| F | result | |
|
strong |
| Enumerator | |
|---|---|
| eAsc | |
| eDesc | |
Definition at line 27 of file ObjectStore.h.
|
inline |
Definition at line 32 of file ObjectStore.h.
References crombie::ObjectStore::ObjectStore< E, T, S, F >::store.
|
inline |
Definition at line 40 of file ObjectStore.h.
|
inline |
Definition at line 51 of file ObjectStore.h.
References crombie::ObjectStore::ObjectStore< E, T, S, F >::compare, crombie::ObjectStore::ObjectStore< E, T, S, F >::eDesc, crombie::ObjectStore::ObjectStore< E, T, S, F >::num_filled, crombie::ObjectStore::ObjectStore< E, T, S, F >::total, and crombie::ObjectStore::ObjectStore< E, T, S, F >::which_order.
|
private |
Definition at line 74 of file ObjectStore.h.
Referenced by crombie::ObjectStore::ObjectStore< E, T, S, F >::check().
|
private |
Definition at line 78 of file ObjectStore.h.
Referenced by crombie::ObjectStore::ObjectStore< E, T, S, F >::check().
| std::vector<Particle> crombie::ObjectStore::ObjectStore< E, T, S, F >::store |
Definition at line 49 of file ObjectStore.h.
Referenced by crombie::ObjectStore::ObjectStore< E, T, S, F >::ObjectStore().
|
private |
Definition at line 77 of file ObjectStore.h.
Referenced by crombie::ObjectStore::ObjectStore< E, T, S, F >::check().
|
private |
Definition at line 75 of file ObjectStore.h.
Referenced by crombie::ObjectStore::ObjectStore< E, T, S, F >::check().