Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
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
22
23// 2007/11/26: rabartl: This class has to change from using 'char*' to
24// std::string!
25
34namespace Teuchos {
35
36class TEUCHOSNUMERICS_LIB_DLL_EXPORT Object {
37public:
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
116private:
118 std::string label_;
119};
120
123std::ostream& operator<< (std::ostream& os, const Teuchos::Object& obj);
124
125} // namespace Teuchos
126
127#endif /* _TEUCHOS_OBJECT_HPP_ */
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Teuchos::DataAccess Mode enumerable type.
The base Teuchos class.
virtual ~Object()
Destructor (virtual, for safety of derived classes).
Smart reference counting pointer class for automatic garbage collection.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...