Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Related Functions | List of all members
Teuchos::Object Class Reference

The base Teuchos class. More...

#include <Teuchos_Object.hpp>

Inheritance diagram for Teuchos::Object:
Teuchos::SerialBandDenseSolver< OrdinalType, ScalarType > Teuchos::SerialDenseSolver< OrdinalType, ScalarType > Teuchos::SerialQRDenseSolver< OrdinalType, ScalarType > Teuchos::SerialSpdDenseSolver< OrdinalType, ScalarType > Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >

Public Member Functions

Constructors/Destructor.
 Object (int tracebackModeIn=-1)
 Default Constructor. More...
 
 Object (const char *label, int tracebackModeIn=-1)
 Labeling Constructor. More...
 
 Object (const std::string &label, int tracebackModeIn=-1)
 Create an Object with the given label, and optionally, with the given traceback mode. More...
 
virtual ~Object ()
 Destructor (virtual, for safety of derived classes). More...
 
I/O method.
virtual void print (std::ostream &os) const
 Print the object to the given output stream. More...
 
Error reporting method.
virtual int reportError (const std::string message, int errorCode) const
 Report an error with this Object. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, const Teuchos::Object &obj)
 Print the given Object to the given output stream. More...
 

Set methods.

virtual void setLabel (const char *theLabel)
 
static void setTracebackMode (int tracebackModeValue)
 Set the value of the Object error traceback report mode. More...
 

Accessor methods.

virtual const char * label () const
 Access the object's label (LEGACY; return std::string instead). More...
 
static int getTracebackMode ()
 Get the value of the Object error traceback report mode. More...
 

Detailed Description

The base Teuchos class.

The Object class provides capabilities common to all Teuchos objects, such as a label that identifies an object instance, constant definitions, enum types.

Definition at line 36 of file Teuchos_Object.hpp.

Constructor & Destructor Documentation

Teuchos::Object::Object ( int  tracebackModeIn = -1)

Default Constructor.

Object is the primary base class in Teuchos. All Teuchos class [sic] are derived from it, directly or indirectly. This class is seldom used explictly.

Warning
(mfh 23 Nov 2014) Pretty much just ignore the above description of this class. Very few classes in Teuchos inherit from Object. Such inheritance should be treated as deprecated legacy behavior. It's not 1990 and C++ is not Java 1.0; we don't need a common base class for everything.

Definition at line 20 of file Teuchos_Object.cpp.

Teuchos::Object::Object ( const char *  label,
int  tracebackModeIn = -1 
)

Labeling Constructor.

Creates an Object with the given label.

LEGACY; DEPRECATE.

Definition at line 25 of file Teuchos_Object.cpp.

Teuchos::Object::Object ( const std::string &  label,
int  tracebackModeIn = -1 
)

Create an Object with the given label, and optionally, with the given traceback mode.

Definition at line 31 of file Teuchos_Object.cpp.

virtual Teuchos::Object::~Object ( )
inlinevirtual

Destructor (virtual, for safety of derived classes).

Definition at line 65 of file Teuchos_Object.hpp.

Member Function Documentation

void Teuchos::Object::setTracebackMode ( int  tracebackModeValue)
static

Set the value of the Object error traceback report mode.

TracebackMode controls whether or not traceback information is printed when run time integer errors are detected:

<= 0 - No information report

= 1 - Fatal (negative) values are reported

>= 2 - All values (except zero) reported.

Note
Default is set to -1 when object is constructed.

Definition at line 41 of file Teuchos_Object.cpp.

const char * Teuchos::Object::label ( ) const
virtual

Access the object's label (LEGACY; return std::string instead).

Definition at line 94 of file Teuchos_Object.cpp.

int Teuchos::Object::getTracebackMode ( )
static

Get the value of the Object error traceback report mode.

Definition at line 49 of file Teuchos_Object.cpp.

void Teuchos::Object::print ( std::ostream &  os) const
virtual

Print the object to the given output stream.

Reimplemented in Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >.

Definition at line 58 of file Teuchos_Object.cpp.

int Teuchos::Object::reportError ( const std::string  message,
int  errorCode 
) const
virtual

Report an error with this Object.

Definition at line 63 of file Teuchos_Object.cpp.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  os,
const Teuchos::Object obj 
)
related

Print the given Object to the given output stream.

Definition at line 99 of file Teuchos_Object.cpp.


The documentation for this class was generated from the following files: