Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Attributes | Private Attributes | Related Functions | List of all members
Teuchos::Object Class Reference

The base Teuchos class. More...

#include <Teuchos_Object.hpp>

Inheritance diagram for Teuchos::Object:
Inheritance graph
[legend]

Static Public Attributes

static int tracebackMode = -1
 

Private Attributes

std::string label_
 The Object's current label. 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...
 

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...
 

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...
 

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...
 

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 68 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 52 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 57 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 63 of file Teuchos_Object.cpp.

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

Destructor (virtual, for safety of derived classes).

Definition at line 97 of file Teuchos_Object.hpp.

Member Function Documentation

void Teuchos::Object::setLabel ( const char *  theLabel)
virtual

Definition at line 69 of file Teuchos_Object.cpp.

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 73 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 126 of file Teuchos_Object.cpp.

int Teuchos::Object::getTracebackMode ( )
static

Get the value of the Object error traceback report mode.

Definition at line 81 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 90 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 95 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 131 of file Teuchos_Object.cpp.

Member Data Documentation

int Teuchos::Object::tracebackMode = -1
static

Definition at line 146 of file Teuchos_Object.hpp.

std::string Teuchos::Object::label_
private

The Object's current label.

Definition at line 150 of file Teuchos_Object.hpp.


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