45 #ifndef _TEUCHOS_OBJECT_HPP_ 46 #define _TEUCHOS_OBJECT_HPP_ 69 class TEUCHOSNUMERICS_LIB_DLL_EXPORT
Object 79 Object(
int tracebackModeIn = -1);
84 Object(
const char* label,
int tracebackModeIn = -1);
104 virtual void setLabel(
const char* label);
119 static void setTracebackMode(
int tracebackModeValue);
129 virtual char* label()
const;
132 static int getTracebackMode();
140 virtual void print(std::ostream& os)
const;
147 virtual int reportError(
const std::string message,
int errorCode)
const 152 if ( (tracebackMode==1) && (errorCode < 0) )
154 std::cerr << std::endl <<
"Error in Teuchos Object with label: " << label_ << std::endl
155 <<
"Teuchos Error: " << message.c_str() <<
" Error Code: " << errorCode << std::endl;
158 if ( (tracebackMode==2) && (errorCode != 0 ) )
160 std::cerr << std::endl <<
"Error in Teuchos Object with label: " << label_ << std::endl
161 <<
"Teuchos Error: " << message.c_str() <<
" Error Code: " << errorCode << std::endl;
169 static int tracebackMode;
184 os << Obj.
label() << std::endl;
std::ostream & operator<<(std::ostream &os, const Teuchos::Object &Obj)
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
virtual void print(std::ostream &os) const
Print method for placing the object in an output stream.
virtual char * label() const
Access the object label.
virtual int reportError(const std::string message, int errorCode) const
Method for reporting errors with Teuchos objects.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.
Teuchos::DataAccess Mode enumerable type.