OpenASIP  2.0
Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
OperationGlobals Class Reference

#include <OperationGlobals.hh>

Collaboration diagram for OperationGlobals:
Collaboration graph

Static Public Member Functions

static std::ostream & outputStream ()
 
static void setOutputStream (std::ostream &newOutputStream)
 
static void runtimeError (const char *message, const char *file, int line, const Operation &parent)
 

Private Member Functions

 OperationGlobals ()
 Instantiation not allowed. More...
 
 OperationGlobals (const OperationGlobals &)
 Copying not allowed. More...
 
OperationGlobalsoperator= (const OperationGlobals &)
 Assignment not allowed. More...
 

Static Private Attributes

static std::ostream * outputStream_ = &std::cout
 The global output stream, defaults to std::cout. More...
 

Detailed Description

Definition at line 40 of file OperationGlobals.hh.

Constructor & Destructor Documentation

◆ OperationGlobals() [1/2]

OperationGlobals::OperationGlobals ( )
private

Instantiation not allowed.

◆ OperationGlobals() [2/2]

OperationGlobals::OperationGlobals ( const OperationGlobals )
private

Copying not allowed.

Member Function Documentation

◆ operator=()

OperationGlobals& OperationGlobals::operator= ( const OperationGlobals )
private

Assignment not allowed.

◆ outputStream()

std::ostream & OperationGlobals::outputStream ( )
static

Returns the current output stream

Returns
the current output stream

Definition at line 49 of file OperationGlobals.cc.

49  {
50  return *outputStream_;
51 }

References outputStream_.

Referenced by OperationBehavior::writeOutput().

◆ runtimeError()

void OperationGlobals::runtimeError ( const char *  message,
const char *  file,
int  line,
const Operation parent 
)
static

Throws an exception with a message

Parameters
messageMessage
fileFILE
lineLINE
parentparent operation
Exceptions
SimulationExecutionErrorthrown always.

Definition at line 73 of file OperationGlobals.cc.

77  {
78  throw SimulationExecutionError(std::string(file), line,
79  parent.name(), std::string(" ") + parent.name() + ": " + message);
80 }

References Operation::name().

Here is the call graph for this function:

◆ setOutputStream()

void OperationGlobals::setOutputStream ( std::ostream &  newOutputStream)
static

Sets a new output stream for operation globals

Parameters
newOutputStreamnew output stream to set

Definition at line 59 of file OperationGlobals.cc.

59  {
60  outputStream_ = &newOutputStream;
61 }

References outputStream_.

Referenced by DesignSpaceExplorer::DesignSpaceExplorer(), and ProximLineReader::initialize().

Member Data Documentation

◆ outputStream_

std::ostream * OperationGlobals::outputStream_ = &std::cout
staticprivate

The global output stream, defaults to std::cout.

Definition at line 59 of file OperationGlobals.hh.

Referenced by outputStream(), and setOutputStream().


The documentation for this class was generated from the following files:
SimulationExecutionError
Definition: Exception.hh:951
Operation::name
virtual TCEString name() const
Definition: Operation.cc:93
OperationGlobals::outputStream_
static std::ostream * outputStream_
The global output stream, defaults to std::cout.
Definition: OperationGlobals.hh:59