Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_ParameterXMLFileReader.cpp
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 #include "Teuchos_ParameterXMLFileReader.hpp"
12 #include "Teuchos_Assert.hpp"
13 
14 
15 namespace Teuchos {
16 
17 
19  : fis_(filename)
20 {;}
21 
22 
23 ParameterList ParameterXMLFileReader::getParameters() const
24 {
25  XMLParameterListReader paramReader;
26  XMLObject xml = fis_.getObject();
27 
28  return paramReader.toParameterList(xml);
29 }
30 
31 
32 } // namespace Teuchos
Writes an XML object to a parameter list.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
XMLObject getObject() const
Get an object by invoking the TreeBuildingXMLHandler on the input data.
ParameterXMLFileReader(const std::string &filename)
Constructor.
RCP< ParameterList > toParameterList(const XMLObject &xml, RCP< DependencySheet > depSheet) const
A list of parameters of arbitrary type.
Writes an XML object to a parameter list.