votca 2024.2-dev
|
This class handles a set of arrays which can be identified by name tags. More...
#include <datacollection.h>
Classes | |
class | array |
The array class, extends vector by a name tag. More... | |
class | selection |
class for array selection More... | |
Public Types | |
using | iterator = typename std::vector<array *>::iterator |
using | const_iterator = typename std::vector<array *>::const_iterator |
Public Member Functions | |
DataCollection ()=default | |
constructor | |
~DataCollection () | |
destructor | |
void | clear () |
clears the data collection | |
Index | size () const |
bool | empty () const |
array & | operator[] (Index i) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
array * | CreateArray (std::string name) |
create a new array | |
std::vector< array * > & | Data () |
access the data container | |
const std::vector< array * > & | Data () const |
array * | ArrayByName (std::string name) |
access an array by name | |
selection * | select (std::string strselection, selection *sel_append=nullptr) |
select a set of arrays | |
Private Attributes | |
std::vector< array * > | data_ |
std::map< std::string, array * > | array_by_name_ |
This class handles a set of arrays which can be identified by name tags.
This class is a Container of arrays. The arrays can be accessed by specifying a name or wildcard.
Definition at line 43 of file datacollection.h.
using votca::tools::DataCollection< T >::const_iterator = typename std::vector<array *>::const_iterator |
Definition at line 58 of file datacollection.h.
using votca::tools::DataCollection< T >::iterator = typename std::vector<array *>::iterator |
Definition at line 57 of file datacollection.h.
|
default |
constructor
|
inline |
destructor
Definition at line 97 of file datacollection.h.
DataCollection< T >::array * votca::tools::DataCollection< T >::ArrayByName | ( | std::string | name | ) |
access an array by name
Definition at line 169 of file datacollection.h.
|
inline |
Definition at line 112 of file datacollection.h.
|
inline |
Definition at line 114 of file datacollection.h.
void votca::tools::DataCollection< T >::clear | ( | ) |
clears the data collection
Definition at line 149 of file datacollection.h.
DataCollection< T >::array * votca::tools::DataCollection< T >::CreateArray | ( | std::string | name | ) |
create a new array
Definition at line 158 of file datacollection.h.
|
inline |
access the data container
Definition at line 125 of file datacollection.h.
|
inline |
Definition at line 126 of file datacollection.h.
|
inline |
Definition at line 107 of file datacollection.h.
|
inline |
Definition at line 113 of file datacollection.h.
|
inline |
Definition at line 115 of file datacollection.h.
|
inline |
Definition at line 108 of file datacollection.h.
DataCollection< T >::selection * votca::tools::DataCollection< T >::select | ( | std::string | strselection, |
selection * | sel_append = nullptr ) |
select a set of arrays
WARNING If attempting to append to an existing selection you must be careful if there exist more than one array with the same name the first array name that matches 'strselection' will be appended.
Definition at line 180 of file datacollection.h.
|
inline |
\ brief returns the number of arrays
Definition at line 106 of file datacollection.h.
|
private |
Definition at line 145 of file datacollection.h.
|
private |
Definition at line 143 of file datacollection.h.