Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
parameterlist
src
Teuchos_XMLInputStream.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
10
#include "
Teuchos_XMLInputStream.hpp
"
11
#include "
Teuchos_Assert.hpp
"
12
13
using namespace
Teuchos;
14
15
16
unsigned
int
XMLInputStream::curPos
()
const
17
{
18
// NOTE (mfh 15 Sep 2014): Most compilers have figured out that the
19
// return statement below is unreachable. Some older compilers
20
// might not realize this. That's why the return statement was put
21
// there, so that those compilers don't warn that this function
22
// doesn't return a value. If it's a choice between one warning and
23
// another, I would prefer the choice that produces less code and
24
// doesn't have unreachable code (which never gets tested).
25
26
TEUCHOS_TEST_FOR_EXCEPTION
(
true
, std::logic_error,
27
"XMLInputStream::curPos() should never be called. It exists only for "
28
"compatibility with Xerces."
);
29
// return 0; // unreachable
30
}
TEUCHOS_TEST_FOR_EXCEPTION
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
Definition:
Teuchos_TestForException.hpp:146
Teuchos_XMLInputStream.hpp
A base class for defining a XML input stream.
Teuchos_Assert.hpp
Teuchos::XMLInputStream::curPos
virtual unsigned int curPos() const
Identify current position.
Definition:
Teuchos_XMLInputStream.cpp:16
Generated on Fri Dec 20 2024 09:21:23 for Teuchos Package Browser (Single Doxygen Collection) by
1.8.5