![]() |
QMCPACK
|
A specialization of OhmmsParameter<T> for T = boolean. More...
Inheritance diagram for OhmmsParameter< bool >:
Collaboration diagram for OhmmsParameter< bool >:Public Member Functions | |
| OhmmsParameter (bool &a, const std::string &aname, std::vector< bool > &&candidate_values={}, TagStatus status=TagStatus::OPTIONAL) | |
| bool | get (std::ostream &os) const override |
| print to an std::ostream More... | |
| bool | put (xmlNodePtr cur) override |
| If the content is empty, the negation of the current value is taken. Example is <parameter name="force"> to turn on the force-evaluation flag of NoPropagator. More... | |
| void | setValue (bool x) |
| bool | put (std::istream &is) override |
| read from std::istream More... | |
| bool | add (xmlNodePtr parent) override |
| This function is used by the users to add a xmlNode, when the input file does not contain the corresponding <parameter>. The content of the new xmlNode is the current value of ref_. More... | |
| void | reset () override |
| reset member data More... | |
Public Member Functions inherited from OhmmsElementBase | |
| OhmmsElementBase (const char *aname="none") | |
| constructor with a name More... | |
| virtual | ~OhmmsElementBase () |
| destructor More... | |
| const std::string & | getName () const |
| return the name More... | |
| void | setName (const std::string &aname) |
| set name More... | |
| void | setIOMode (int imode) |
| set iomode More... | |
| void | put (const std::string &s) |
| read from string More... | |
| virtual void | begin_node (std::ostream &os) const |
| write the start of a node More... | |
| virtual void | end_node (std::ostream &os) const |
| write the end of a node More... | |
Private Attributes | |
| bool & | ref_ |
| reference to a value of type T More... | |
| std::vector< bool > | candidate_values_ |
| valid candidate values, if not empty, the first one is the default. More... | |
| xmlNodePtr | node_ |
| pointer to the corresponding xmlNode More... | |
| TagStatus | tag_staus_ |
| The status of the tag. More... | |
Additional Inherited Members | |
Public Types inherited from OhmmsElementBase | |
| enum | { useLIBXML = 0, useLIBXMLPP, usePLAIN } |
| enumeration to choose the xml parser More... | |
Protected Attributes inherited from OhmmsElementBase | |
| int | myIOMode |
| the type of IO mode: default is useLIBXML More... | |
| std::string | myName |
| the name of the node, corresponds to the xml tag More... | |
A specialization of OhmmsParameter<T> for T = boolean.
Definition at line 184 of file OhmmsParameter.h.
|
inline |
| a | the boolean to be referenced. |
| aname | the name of this object |
| candidate_values | valid input values |
Definition at line 203 of file OhmmsParameter.h.
|
inlineoverridevirtual |
This function is used by the users to add a xmlNode, when the input file does not contain the corresponding <parameter>. The content of the new xmlNode is the current value of ref_.
| parent | the parent node to which a xmlNode for this object is appended. |
Reimplemented from OhmmsElementBase.
Definition at line 273 of file OhmmsParameter.h.
References getContent(), OhmmsElementBase::myName, OhmmsParameter< T >::node_, and OhmmsParameter< T >::ref_.
|
inlineoverridevirtual |
print to an std::ostream
Implements OhmmsElementBase.
Definition at line 219 of file OhmmsParameter.h.
References OhmmsElementBase::myName, and OhmmsParameter< T >::ref_.
|
inlineoverridevirtual |
If the content is empty, the negation of the current value is taken. Example is <parameter name="force"> to turn on the force-evaluation flag of NoPropagator.
inline bool put(xmlNodePtr cur)
| cur | the current xmlNode whose content is assigned to ref_ |
Implements OhmmsElementBase.
Definition at line 231 of file OhmmsParameter.h.
References checkTagStatus(), OhmmsElementBase::myName, OhmmsParameter< T >::node_, OhmmsParameter< T >::put(), and OhmmsParameter< T >::tag_staus_.
|
inlineoverridevirtual |
read from std::istream
Implements OhmmsElementBase.
Definition at line 243 of file OhmmsParameter.h.
References checkTagStatus(), qmcplusplus::lowerCase(), OhmmsElementBase::myName, OhmmsParameter< T >::ref_, and OhmmsParameter< T >::tag_staus_.
|
inlineoverridevirtual |
reset member data
Implements OhmmsElementBase.
Definition at line 285 of file OhmmsParameter.h.
References getContent(), OhmmsParameter< T >::node_, and OhmmsParameter< T >::ref_.
|
inline |
Definition at line 240 of file OhmmsParameter.h.
References OhmmsParameter< T >::ref_.
|
private |
valid candidate values, if not empty, the first one is the default.
Definition at line 190 of file OhmmsParameter.h.
|
private |
pointer to the corresponding xmlNode
Definition at line 192 of file OhmmsParameter.h.
|
private |
reference to a value of type T
Definition at line 188 of file OhmmsParameter.h.
|
private |
The status of the tag.
Definition at line 194 of file OhmmsParameter.h.