Implementation of SelectableObject using sets (see "AllSet.h") as selection attributes.
AllSetSelectableObject is an implementation of SelectableObject that stores objects of type T which are attached with selection attributes of type AllSet<U>
. For information on which objects are selected given a certain set as selection request see the documentation of the function "select".
#include <AllSetSelectableObject.h>
Classes | |
struct | Compare |
Private Member Functions | |
virtual void | select (std::vector< size_t > &index, const AllSet< U > &selector) const |
Given a certain selection request 'R' (= "selector" [set of objects of type U]), this function returns the index 'i' of every attribute set 'A_i' (A_0 <=> attributes_[0], A_1 <=> attributes_[1], etc.) that matches the request 'R'. More... | |
Additional Inherited Members | |
Public Member Functions inherited from walberla::selectable::SelectableObject< T, AllSet< U >, AllSet< U > > | |
virtual | ~SelectableObject ()=default |
void | add (const T &object, const AllSet< U > &attributes, const std::string &identifier=std::string()) |
This function is used to add an object together with its selection attributes stored in "attributes". More... | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
size_t | getNumberOfMatching (const AllSet< U > &selector) const |
Returns the number of objects matching the specified "selector". More... | |
size_t | get (T &object, const AllSet< U > &selector) const |
This function can be used to retrieve the one object whose attributes match with "selector". More... | |
void | get (std::vector< T > &object, const AllSet< U > &selector) const |
This function can be used to retrieve all objects whose attributes match with the selector "selector". More... | |
size_t | get (T &object, std::string &identifier, const AllSet< U > &selector) const |
This function can be used to retrieve the one object whose attributes match with "selector". More... | |
void | get (std::vector< T > &object, std::vector< std::string > &identifier, const AllSet< U > &selector) const |
This function can be used to retrieve all objects whose attributes match with the selector "selector". More... | |
T * | getUnique (const AllSet< U > &selector) |
Non-const version of getUnique(). More... | |
const T * | getUnique (const AllSet< U > &selector) const |
This function can be used to retrieve a pointer (!) to the object whose attributes match with "selector". More... | |
T * | getUnique (const AllSet< U > &selector, std::string &identifierOut) |
Non-const version of getUnique(const S&, std::string& ). More... | |
const T * | getUnique (const AllSet< U > &selector, std::string &identifierOut) const |
This function is similar to getUnique(const S &selector) but takes an additional output parameter identifier, which is set to the string identifier of the selected object, if a non-zero pointer is returned, otherwise the identifier string is not changed. More... | |
void | toStream (std::ostream &os) const |
std::string | toString () const |
size_t | size () const |
bool | empty () const |
Protected Attributes inherited from walberla::selectable::SelectableObject< T, AllSet< U >, AllSet< U > > | |
std::vector< AllSet< U > > | attributes_ |
|
privatevirtual |
Given a certain selection request 'R' (= "selector" [set of objects of type U]), this function returns the index 'i' of every attribute set 'A_i' (A_0 <=> attributes_[0], A_1 <=> attributes_[1], etc.) that matches the request 'R'.
Possible candidates are:
Implements walberla::selectable::SelectableObject< T, AllSet< U >, AllSet< U > >.