![]() |
QMCPACK
|
Inheritance diagram for OhmmsParameter< T >:
Collaboration diagram for OhmmsParameter< T >:Public Member Functions | |
| OhmmsParameter (T &a, const std::string &aname, std::vector< T > &&candidate_values={}, TagStatus status=TagStatus::OPTIONAL) | |
| bool | get (std::ostream &os) const override |
| print to an std::ostream More... | |
| bool | put (xmlNodePtr cur) override |
| bool | put (std::istream &is) override |
| read from std::istream, used by OhmmsAttributeSet 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 | setValue (T x) |
| 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 Member Functions | |
| void | checkValues () |
Private Attributes | |
| T & | ref_ |
| reference to a value of type T More... | |
| std::vector< T > | 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... | |
Definition at line 78 of file OhmmsParameter.h.
|
inline |
| a | the value to be referenced |
| aname | the name of this object |
| candidate_values | candidate values to be checked against, the first element is the default value. It can be left empty for backward compatibility or unbounded input. |
| status | Tag status, See TagStatus enum. |
Definition at line 113 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 163 of file OhmmsParameter.h.
References getContent(), OhmmsElementBase::myName, OhmmsParameter< T >::node_, and OhmmsParameter< T >::ref_.
|
inlineprivate |
Definition at line 91 of file OhmmsParameter.h.
References OhmmsParameter< T >::candidate_values_, OhmmsElementBase::myName, and OhmmsParameter< T >::ref_.
Referenced by OhmmsParameter< T >::put().
|
inlineoverridevirtual |
print to an std::ostream
Implements OhmmsElementBase.
Definition at line 129 of file OhmmsParameter.h.
References OhmmsElementBase::myName, and OhmmsParameter< T >::ref_.
|
inlineoverridevirtual |
inline bool put(xmlNodePtr cur), used by ParameterSet
| cur | the current xmlNode whose content is assigned to ref_ |
Implements OhmmsElementBase.
Definition at line 138 of file OhmmsParameter.h.
References checkTagStatus(), OhmmsParameter< T >::checkValues(), OhmmsElementBase::myName, OhmmsParameter< T >::node_, putContent(), OhmmsParameter< T >::ref_, and OhmmsParameter< T >::tag_staus_.
Referenced by OhmmsParameter< bool >::put().
|
inlineoverridevirtual |
read from std::istream, used by OhmmsAttributeSet
Implements OhmmsElementBase.
Definition at line 149 of file OhmmsParameter.h.
References checkTagStatus(), OhmmsParameter< T >::checkValues(), OhmmsElementBase::myName, OhmmsParameter< T >::ref_, and OhmmsParameter< T >::tag_staus_.
|
inlineoverridevirtual |
reset member data
Implements OhmmsElementBase.
Definition at line 177 of file OhmmsParameter.h.
References getContent(), OhmmsParameter< T >::node_, and OhmmsParameter< T >::ref_.
|
inline |
|
private |
valid candidate values, if not empty, the first one is the default.
Definition at line 84 of file OhmmsParameter.h.
Referenced by OhmmsParameter< T >::checkValues().
|
private |
pointer to the corresponding xmlNode
Definition at line 86 of file OhmmsParameter.h.
Referenced by OhmmsParameter< T >::add(), OhmmsParameter< bool >::add(), OhmmsParameter< T >::put(), OhmmsParameter< bool >::put(), OhmmsParameter< T >::reset(), and OhmmsParameter< bool >::reset().
|
private |
reference to a value of type T
Definition at line 82 of file OhmmsParameter.h.
Referenced by OhmmsParameter< T >::add(), OhmmsParameter< bool >::add(), OhmmsParameter< T >::checkValues(), OhmmsParameter< T >::get(), OhmmsParameter< bool >::get(), OhmmsParameter< T >::put(), OhmmsParameter< bool >::put(), OhmmsParameter< T >::reset(), OhmmsParameter< bool >::reset(), OhmmsParameter< T >::setValue(), and OhmmsParameter< bool >::setValue().
|
private |
The status of the tag.
Definition at line 88 of file OhmmsParameter.h.
Referenced by OhmmsParameter< T >::put(), and OhmmsParameter< bool >::put().