std::vector containing the sequence of Action to be done. More...
#include <ActionSet.h>
Public Member Functions | |
ActionSet (PlumedMain &p) | |
~ActionSet () | |
void | clearDelete () |
Clear and deletes all the included pointers. More... | |
template<class T > | |
std::vector< T > | select () const |
Extract pointers to all Action's of type T To extract all Colvar , use select<Colvar*>();. More... | |
template<class T > | |
std::vector< Action * > | selectNot () const |
Extract pointers to all Action's which are not of type T E.g., to extract all noncolvars, use selectNot<Colvar*>();. More... | |
template<class T > | |
T | selectWithLabel (const std::string &s) const |
Extract pointer to an action labeled s, only if it is of type T. More... | |
std::string | getLabelList () const |
get the labels in the list of actions in form of a string (useful to debug) More... | |
std::vector< std::string > | getLabelVector () const |
get the labels in the form of a vector of strings More... | |
Public Attributes | |
T | elements |
STL member. More... | |
Private Attributes | |
PlumedMain & | plumed |
std::vector containing the sequence of Action to be done.
It is a vector of Action*, and as such it has the entire std::vector interface. Moreover, it implements methods to extract Acion* of a given type (select<T>()), NOT of a given type (selectNot<T>()) or to find an Action with a given label (selectWithLabel()) Finally, since it holds pointers, there is a clearDelete() function which deletes the pointers before deleting the vector
Definition at line 38 of file ActionSet.h.
PLMD::ActionSet::ActionSet | ( | PlumedMain & | p | ) |
Definition at line 27 of file ActionSet.cpp.
PLMD::ActionSet::~ActionSet | ( | ) |
Definition at line 32 of file ActionSet.cpp.
void PLMD::ActionSet::clearDelete | ( | ) |
Clear and deletes all the included pointers.
Definition at line 37 of file ActionSet.cpp.
std::string PLMD::ActionSet::getLabelList | ( | ) | const |
get the labels in the list of actions in form of a string (useful to debug)
Definition at line 43 of file ActionSet.cpp.
std::vector< std::string > PLMD::ActionSet::getLabelVector | ( | ) | const |
get the labels in the form of a vector of strings
Definition at line 51 of file ActionSet.cpp.
std::vector< T > PLMD::ActionSet::select | ( | ) | const |
Extract pointers to all Action's of type T To extract all Colvar , use select<Colvar*>();.
Definition at line 73 of file ActionSet.h.
std::vector< Action * > PLMD::ActionSet::selectNot | ( | ) | const |
Extract pointers to all Action's which are not of type T E.g., to extract all noncolvars, use selectNot<Colvar*>();.
Definition at line 92 of file ActionSet.h.
T PLMD::ActionSet::selectWithLabel | ( | const std::string & | s | ) | const |
Extract pointer to an action labeled s, only if it is of type T.
E.g., to extract an action labeled "pippo", use selectWithLabel<Action*>("pippo") If you want it to be a Colvar, use selectWithLabel<Colvar*>(pippo). If it is not found, it returns NULL
Definition at line 83 of file ActionSet.h.
|
inherited |
STL member.
|
private |
Definition at line 41 of file ActionSet.h.
Hosted by GitHub
![]() |
![]() |