32 for(std::map<std::string,creator_pointer>::iterator p=
m.begin();p!=
m.end();++p) names+=p->first+
" ";
33 std::cerr<<
"WARNING: Vessel "+ names +
" has not been properly unregistered. This might lead to memory leak!!\n";
43 for(std::map<std::string,creator_pointer>::iterator p=
m.begin();p!=
m.end();++p){
51 plumed_massert(
m.count(keyword)==0,
"keyword has already been registered");
52 m.insert(std::pair<std::string,creator_pointer>(keyword,f));
57 mk.insert(std::pair<std::string,keyword_pointer>(keyword,ik));
61 if(
m.count(key)>0 )
return true;
bool check(std::string keyname)
Verify if a distribution keyword is present in the register.
void remove(creator_pointer f)
Remove a distribution function from the register of distribution functions.
Vessel * create(std::string keyword, const VesselOptions &da)
Create a distribution function of the specified type.
void destroyData()
Clear everything from the keywords object.
Keywords keywords
A vector of function pointers - this is used to create the documentation.
void add(std::string keyword, creator_pointer, keyword_pointer k, keyword_pointer ik)
Add a new distribution function option to the register of distribution functions. ...
~VesselRegister()
The destructor.
This class holds the keywords and their documentation.
VesselRegister & vesselRegister()
This class is used to pass the input to Vessels.
std::map< std::string, keyword_pointer > mk
Map action to a function which documents the related object.
Keywords getKeywords()
Return the keywords.
std::map< std::string, creator_pointer > m
The set of possible distribution functions we can work with.