Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
numerics
src
Teuchos_Object.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
// Kris
11
// 07.08.03 -- Move into Teuchos package/namespace
12
13
#ifndef _TEUCHOS_OBJECT_HPP_
14
#define _TEUCHOS_OBJECT_HPP_
15
19
20
#include "
Teuchos_ConfigDefs.hpp
"
21
#include "
Teuchos_DataAccess.hpp
"
22
23
// 2007/11/26: rabartl: This class has to change from using 'char*' to
24
// std::string!
25
33
34
namespace
Teuchos
{
35
36
class
TEUCHOSNUMERICS_LIB_DLL_EXPORT
Object
{
37
public
:
39
40
51
Object
(
int
tracebackModeIn = -1);
52
54
58
Object
(
const
char
*
label
,
int
tracebackModeIn = -1);
59
62
Object
(
const
std::string&
label
,
int
tracebackModeIn = -1);
63
65
virtual
~Object
() {}
66
68
70
71
// LEGACY; REPLACE "const char*" with std::string.
72
virtual
void
setLabel (
const
char
* theLabel);
73
86
static
void
setTracebackMode (
int
tracebackModeValue);
87
89
91
93
virtual
const
char
* label ()
const
;
94
96
static
int
getTracebackMode();
97
99
101
103
virtual
void
print (std::ostream& os)
const
;
104
106
108
110
virtual
int
reportError (
const
std::string message,
int
errorCode)
const
;
111
113
114
static
int
tracebackMode;
115
116
private
:
118
std::string label_;
119
};
120
123
std::ostream& operator<< (std::ostream& os,
const
Teuchos::Object
& obj);
124
125
}
// namespace Teuchos
126
127
#endif
/* _TEUCHOS_OBJECT_HPP_ */
Teuchos_ConfigDefs.hpp
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Teuchos_DataAccess.hpp
Teuchos::DataAccess Mode enumerable type.
Teuchos::Object
The base Teuchos class.
Definition
Teuchos_Object.hpp:36
Teuchos::Object::~Object
virtual ~Object()
Destructor (virtual, for safety of derived classes).
Definition
Teuchos_Object.hpp:65
Teuchos::Object::label
virtual const char * label() const
Access the object's label (LEGACY; return std::string instead).
Definition
Teuchos_Object.cpp:94
Teuchos::Object::Object
Object(int tracebackModeIn=-1)
Default Constructor.
Definition
Teuchos_Object.cpp:20
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0