ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Public Attributes | List of all members
etiss::SourceCodeLocation Class Reference

simple class that store source location information. More...

#include <Misc.h>

Inheritance diagram for etiss::SourceCodeLocation:
Inheritance graph
[legend]
Collaboration diagram for etiss::SourceCodeLocation:
Collaboration graph
[legend]

Public Member Functions

 SourceCodeLocation (const std::string &file, size_t line)
 
std::string toString () const
 
- Public Member Functions inherited from etiss::ToString
 ToString ()
 
virtual ~ToString ()
 

Public Attributes

const std::string file_
 
const size_t line_
 

Detailed Description

simple class that store source location information.

This class is required to pass location information to etiss::log(). Use the macro ETISS_SRCLOC to create a SourceCodeLocation object for the current location in the source code.

E.g.:

#define ETISS_SRCLOC
Definition: Misc.h:239
@ ERROR
Definition: Misc.h:127
void log(Verbosity level, std::string msg)
write log message at the given level.
Definition: Misc.cpp:125

Definition at line 227 of file Misc.h.

Constructor & Destructor Documentation

◆ SourceCodeLocation()

etiss::SourceCodeLocation::SourceCodeLocation ( const std::string &  file,
size_t  line 
)
inline

Definition at line 230 of file Misc.h.

Member Function Documentation

◆ toString()

std::string etiss::SourceCodeLocation::toString ( ) const
inline

Definition at line 231 of file Misc.h.

References file_, line_, and etiss::toString().

Here is the call graph for this function:

Member Data Documentation

◆ file_

const std::string etiss::SourceCodeLocation::file_

Definition at line 235 of file Misc.h.

Referenced by toString().

◆ line_

const size_t etiss::SourceCodeLocation::line_

Definition at line 236 of file Misc.h.

Referenced by toString().


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