Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_XMLParser.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TEUCHOS_XMLPARSER_H
11#define TEUCHOS_XMLPARSER_H
12
19#include "Teuchos_XMLObject.hpp"
21
22namespace Teuchos
23{
38 class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT XMLParser
39 {
40 public:
41
43 XMLParser(RCP<XMLInputStream> is) : _is(is), _lineNo(1) {;}
44
47
49 XMLObject parse();
50 private:
51//use pragmas to disable some false-positive warnings for windows sharedlibs export
52#ifdef _MSC_VER
53#pragma warning(push)
54#pragma warning(disable:4251)
55#endif
58 long _lineNo;
59#ifdef _MSC_VER
60#pragma warning(pop)
61#endif
62
64 inline static bool isLetter(unsigned char c);
66 inline static bool isNameChar(unsigned char c);
68 inline static bool isChar(unsigned char c);
70 inline static bool isSpace(unsigned char c);
71
78 void getETag(std::string &tag);
79
96 void getSTag(unsigned char lookahead, std::string &tag, Teuchos::map<std::string,string> &attrs, bool &emptytag);
97
101 void getComment(long startLine);
102
110 int getSpace(unsigned char &lookahead);
111
118 void getReference(std::string &refstr);
119
122 void ignoreXMLDeclaration();
123
132 int assertChar(unsigned char cexp);
133 };
134}
135
136#endif
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
A base class for defining a XML input stream.
An object representation of a subset of XML data.
Smart reference counting pointer class for automatic garbage collection.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
XMLParser consumes characters from an XMLInputStream object, parsing the XML and using a TreeBuilding...
XMLParser(RCP< XMLInputStream > is)
Constructor.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...