|
OOFEM 3.0
|
#include <xmlinputrecord.h>
Public Member Functions | |
| std::string | _attr_traced_read (const char *name) |
| std::tuple< std::string, pugi::xml_node > | _attr_traced_read_with_node (const char *name) |
| XMLInputRecord (XMLDataReader *reader_, const pugi::xml_node &node_) | |
| std::shared_ptr< InputRecord > | clone () const override |
| void | finish (bool wrn=true) override |
| Terminates the current record session and if the flag is true, warning is printed for unscanned tokens. | |
| std::string | loc () const |
| std::string | loc (const pugi::xml_node &node) const |
| int | setRecId (int lastRecId) |
| void | giveRecordKeywordField (std ::string &answer, int &value) override |
| Reads the record id field (type of record) and its corresponding number. | |
| void | giveRecordKeywordField (std ::string &answer) override |
| Reads the record id field (type of record). | |
| void | giveField (int &answer, InputFieldType id) override |
| Reads the integer field value. | |
| void | giveField (double &answer, InputFieldType id) override |
| Reads the double field value. | |
| void | giveField (bool &answer, InputFieldType id) override |
| Reads the bool field value. | |
| void | giveField (std ::string &answer, InputFieldType id) override |
| Reads the string field value. | |
| void | giveField (FloatArray &answer, InputFieldType id) override |
| Reads the FloatArray field value. | |
| void | giveField (IntArray &answer, InputFieldType id) override |
| Reads the IntArray field value. | |
| void | giveField (FloatMatrix &answer, InputFieldType id) override |
| Reads the FloatMatrix field value. | |
| void | giveField (std ::vector< std ::string > &answer, InputFieldType id) override |
| Reads the vector of strings. | |
| void | giveField (Dictionary &answer, InputFieldType id) override |
| Reads the Dictionary field value. | |
| void | giveField (std ::list< Range > &answer, InputFieldType id) override |
| Reads the std::list<Range> field value. | |
| void | giveField (ScalarFunction &answer, InputFieldType id) override |
| Reads the ScalarFunction field value. | |
| int | giveGroupCount (InputFieldType id, const std::string &name, bool optional) override |
| bool | hasChild (InputFieldType id, const std::string &name, bool optional) override |
| bool | hasField (InputFieldType id) override |
| Returns true if record contains field identified by idString keyword. | |
| void | printYourself () override |
| Print input record. | |
| std::string | giveRecordAsString () const override |
| Returns string representation of record in OOFEMs text format. | |
| std::string | giveRecordInTXTFormat () const override |
| std::string | giveLocation () const override |
| Public Member Functions inherited from oofem::InputRecord | |
| InputRecord () | |
| InputRecord (DataReader *reader_) | |
| virtual | ~InputRecord ()=default |
| Destructor. | |
| std::shared_ptr< InputRecord > | ptr () |
| template<typename T> | |
| void | giveOptionalField (T &answer, InputFieldType id) |
| DataReader * | giveReader () const |
| template<typename AnEnum> | |
| void | giveField (AnEnum &answer, InputFieldType id) |
| Reads enumeration (must be defined via enum-impl.hpp) directly. | |
| void | traceField (InputFieldType id, const char *type) const |
Static Public Member Functions | |
| static bool | node_seen_get (const pugi::xml_node &n) |
| static void | node_seen_set (pugi::xml_node &n, bool seen) |
| static std::string | error_msg_with_hints (const std::string &val, const std::map< int, std::vector< std::string > > &v2nn) |
| static int | giveLevenshteinDist (const std::string &word1, const std::string &word2) |
Static Public Attributes | |
| static constexpr char | SeenMark [] ="__seen" |
Private Member Functions | |
| XMLDataReader * | _reader () const |
Static Private Member Functions | |
| static std::string | xmlizeAttrName (const std::string &s) |
Private Attributes | |
| pugi::xml_node | node |
| friend | XMLDataReader |
| std::set< std::string > | attrQueried |
| std::set< std::string > | attrRead |
| int | recId =-1 |
Class representing the Input Record for OOFEM XML input file format. It is represented as XML node with attributes, nested nodes, but without text.
Definition at line 55 of file xmlinputrecord.h.
| oofem::XMLInputRecord::XMLInputRecord | ( | XMLDataReader * | reader_, |
| const pugi::xml_node & | node_ ) |
Definition at line 144 of file xmlinputrecord.C.
References _XML_DEBUG, oofem::InputRecord::InputRecord(), loc(), node, node_seen_set(), and XMLDataReader.
|
inline |
Definition at line 65 of file xmlinputrecord.h.
References _attr_traced_read_with_node().
Referenced by giveRecordKeywordField().
| std::tuple< std::string, pugi::xml_node > oofem::XMLInputRecord::_attr_traced_read_with_node | ( | const char * | name | ) |
Definition at line 208 of file xmlinputrecord.C.
References attrRead, loc(), node, OOFEM_ERROR, and xmlizeAttrName().
Referenced by _attr_traced_read(), giveField(), giveField(), giveField(), giveField(), giveField(), and oofem::Tokens::Tokens().
|
inlineprivate |
Definition at line 62 of file xmlinputrecord.h.
References oofem::InputRecord::giveReader(), and XMLDataReader.
Referenced by giveGroupCount(), hasChild(), and loc().
|
inlineoverridevirtual |
Creates a newly allocated copy of the receiver
Implements oofem::InputRecord.
Definition at line 69 of file xmlinputrecord.h.
|
overridevirtual |
Terminates the current record session and if the flag is true, warning is printed for unscanned tokens.
Implements oofem::InputRecord.
Definition at line 229 of file xmlinputrecord.C.
References _XML_DEBUG, attrQueried, attrRead, loc(), node, OOFEM_WARNING, and SeenMark.
|
overridevirtual |
Reads the bool field value.
Implements oofem::InputRecord.
Definition at line 303 of file xmlinputrecord.C.
References _attr_traced_read_with_node(), hasField(), loc(), and oofem::string_to().
|
overridevirtual |
Reads the Dictionary field value.
Implements oofem::InputRecord.
Definition at line 321 of file xmlinputrecord.C.
References _attr_traced_read_with_node(), oofem::Dictionary::add(), loc(), oofem::Tokens::node, OOFEM_ERROR, and oofem::Tokens::toks.
|
overridevirtual |
Reads the double field value.
Implements oofem::InputRecord.
Definition at line 293 of file xmlinputrecord.C.
References _attr_traced_read_with_node(), loc(), and oofem::string_to().
|
overridevirtual |
Reads the FloatArray field value.
Implements oofem::InputRecord.
Definition at line 268 of file xmlinputrecord.C.
References _XML_DEBUG, oofem::Tokens::as(), oofem::Tokens::loc, oofem::FloatArray::resize(), and oofem::Tokens::size().
|
overridevirtual |
Reads the FloatMatrix field value.
Implements oofem::InputRecord.
Definition at line 275 of file xmlinputrecord.C.
References _XML_DEBUG, oofem::Tokens::as(), oofem::FloatMatrix::cols(), loc(), OOFEM_ERROR, oofem::FloatMatrix::resize(), oofem::Tokens::size(), and oofem::Tokens::toks.
|
overridevirtual |
Reads the integer field value.
Implements oofem::InputRecord.
Definition at line 298 of file xmlinputrecord.C.
References _attr_traced_read_with_node(), loc(), and oofem::string_to().
Referenced by giveField(), giveField(), and giveRecordKeywordField().
|
overridevirtual |
Reads the IntArray field value.
Implements oofem::InputRecord.
Definition at line 286 of file xmlinputrecord.C.
References _XML_DEBUG, oofem::Tokens::as(), oofem::Tokens::loc, oofem::IntArray::resize(), and oofem::Tokens::size().
|
overridevirtual |
Reads the ScalarFunction field value.
Implements oofem::InputRecord.
Definition at line 313 of file xmlinputrecord.C.
References _attr_traced_read_with_node(), loc(), oofem::ScalarFunction::setReference(), oofem::ScalarFunction::setSimpleExpression(), oofem::ScalarFunction::setValue(), and oofem::string_to().
|
overridevirtual |
Reads the std::list<Range> field value.
Implements oofem::InputRecord.
References giveField(), giveGroupCount(), hasChild(), and hasField().
|
overridevirtual |
|
inlineoverridevirtual |
Reads the vector of strings.
Implements oofem::InputRecord.
Definition at line 87 of file xmlinputrecord.h.
References _XML_NI.
|
overridevirtual |
Implements oofem::InputRecord.
Definition at line 156 of file xmlinputrecord.C.
References _reader(), _XML_DEBUG, oofem::XMLDataReader::giveNamedChild(), loc(), node, node_seen_set(), and OOFEM_ERROR.
Referenced by giveField().
|
inlineoverridevirtual |
|
overridevirtual |
Returns string representation of record in OOFEMs text format.
Implements oofem::InputRecord.
Definition at line 249 of file xmlinputrecord.C.
|
overridevirtual |
Implements oofem::InputRecord.
Definition at line 259 of file xmlinputrecord.C.
References OOFEM_ERROR.
|
overridevirtual |
Reads the record id field (type of record).
Implements oofem::InputRecord.
Definition at line 177 of file xmlinputrecord.C.
References _attr_traced_read(), _XML_DEBUG, and node.
|
overridevirtual |
Reads the record id field (type of record) and its corresponding number.
Implements oofem::InputRecord.
References giveField(), and giveRecordKeywordField().
Referenced by giveRecordKeywordField().
|
overridevirtual |
Implements oofem::InputRecord.
Definition at line 170 of file xmlinputrecord.C.
References _reader(), oofem::XMLDataReader::giveNamedChild(), loc(), node, and OOFEM_ERROR.
Referenced by giveField().
|
overridevirtual |
Returns true if record contains field identified by idString keyword.
Implements oofem::InputRecord.
Definition at line 188 of file xmlinputrecord.C.
References attrQueried, node, and xmlizeAttrName().
Referenced by giveField(), and giveField().
|
inline |
Definition at line 73 of file xmlinputrecord.h.
Referenced by _attr_traced_read_with_node(), finish(), giveField(), giveField(), giveField(), giveField(), giveField(), giveField(), giveGroupCount(), giveLocation(), hasChild(), loc(), setRecId(), oofem::Tokens::Tokens(), and XMLInputRecord().
| std::string oofem::XMLInputRecord::loc | ( | const pugi::xml_node & | node | ) | const |
Definition at line 74 of file xmlinputrecord.C.
References _reader(), oofem::XMLDataReader::loc(), and node.
|
static |
Definition at line 67 of file xmlinputrecord.C.
References SeenMark.
Referenced by oofem::XMLDataReader::finish(), and oofem::XMLDataReader::giveInputRecord().
|
static |
Definition at line 69 of file xmlinputrecord.C.
References SeenMark.
Referenced by oofem::XMLDataReader::enterGroup(), giveGroupCount(), oofem::XMLDataReader::loadXml(), oofem::XMLDataReader::XMLDataReader(), and XMLInputRecord().
|
inlineoverridevirtual |
Print input record.
Implements oofem::InputRecord.
Definition at line 96 of file xmlinputrecord.h.
References _XML_NI.
| int oofem::XMLInputRecord::setRecId | ( | int | lastRecId | ) |
Definition at line 149 of file xmlinputrecord.C.
References oofem::InputRecord::giveOptionalField(), loc(), OOFEM_WARNING, and recId.
|
staticprivate |
Definition at line 202 of file xmlinputrecord.C.
Referenced by _attr_traced_read_with_node(), and hasField().
|
private |
Definition at line 59 of file xmlinputrecord.h.
Referenced by finish(), and hasField().
|
private |
Definition at line 60 of file xmlinputrecord.h.
Referenced by _attr_traced_read_with_node(), and finish().
|
private |
Definition at line 57 of file xmlinputrecord.h.
Referenced by _attr_traced_read_with_node(), oofem::XMLDataReader::enterRecord(), finish(), giveGroupCount(), giveRecordAsString(), giveRecordKeywordField(), hasChild(), hasField(), oofem::XMLDataReader::leaveRecord(), loc(), loc(), and XMLInputRecord().
|
private |
Definition at line 61 of file xmlinputrecord.h.
Referenced by setRecId().
|
staticconstexpr |
Definition at line 105 of file xmlinputrecord.h.
Referenced by finish(), giveRecordAsString(), node_seen_get(), and node_seen_set().
|
private |
Definition at line 58 of file xmlinputrecord.h.
Referenced by _reader(), and XMLInputRecord().