Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_StringInputStream.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_STRINGINPUTSTREAM_H
11#define TEUCHOS_STRINGINPUTSTREAM_H
12
19
20
21namespace Teuchos
22{
23 using std::string;
24
33 {
34 public:
35
37 StringInputStream(const std::string& text)
38 : XMLInputStream(), text_(text), pos_(0) {;}
39
41 virtual ~StringInputStream() {;}
42
44 virtual unsigned int readBytes(unsigned char* const toFill,
45 const unsigned int maxToRead);
46
47 private:
48 std::string text_;
49 unsigned int pos_;
50 };
51
52}
53#endif
54
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
A base class for defining a XML input stream.
Smart reference counting pointer class for automatic garbage collection.
Instantiation of XMLInputStream for reading an entire document from a std::string.
StringInputStream(const std::string &text)
Construct with the std::string from which data will be read.
virtual unsigned int readBytes(unsigned char *const toFill, const unsigned int maxToRead)
Read up to maxToRead bytes.
XMLInputStream represents an XML input stream that can be used by a XMLInputSource.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...