Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_StringInputSource.cpp
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 
12 
13 using namespace Teuchos;
14 
15 
16 StringInputSource::StringInputSource(const std::string& text)
17  : XMLInputSource(), text_(text)
18 {;}
19 
21 {
22  return rcp(new StringInputStream(text_), true);
23 }
24 
XMLInputSource represents a source of XML input that can be parsed to produce an XMLObject.
Instantiation of XMLInputStream for reading an entire document from a std::string.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
virtual RCP< XMLInputStream > stream() const
Create a StringInputStream.
StringInputSource(const std::string &text)
Constructor.
Definition of XMLInputSource derived class for reading XML from a std::string.
Definition of XMLInputStream derived class for reading XML from a std::string.
Smart reference counting pointer class for automatic garbage collection.