SourceLocation Class Reference

#include <memoryallocationbase.h>

Public Types

using SourceLocationMarker = Int
 

Public Member Functions

 SourceLocation ()=default
 
constexpr SourceLocation (const Char *f, Int l, const Char *objectName=nullptr)
 
const CharGetFile () const
 
Int GetLine () const
 
Bool HasFrameInfo () const
 
Bool operator== (const SourceLocation &b) const
 
Bool operator< (const SourceLocation &b) const
 
 MAXON_OPERATOR_COMPARISON (SourceLocation)
 
HashInt GetHashCode () const
 

Static Public Member Functions

static MAXON_ATTRIBUTE_FORCE_INLINE const SourceLocationNullValue ()
 

Public Attributes

const Charfile
 
Int lineAndFlags
 
const Charname
 

Static Public Attributes

static const Int FRAME_INFO_FLAG
 
static const Int LINE_NUMBER_MASK
 

Member Typedef Documentation

◆ SourceLocationMarker

Constructor & Destructor Documentation

◆ SourceLocation() [1/2]

SourceLocation ( )
default

◆ SourceLocation() [2/2]

constexpr SourceLocation ( const Char f,
Int  l,
const Char objectName = nullptr 
)
constexpr

Member Function Documentation

◆ GetFile()

const Char* GetFile ( ) const

Returns the source file as C string (or a nullptr).

◆ GetLine()

Int GetLine ( ) const

Returns the source file line number (or 0).

◆ HasFrameInfo()

Bool HasFrameInfo ( ) const

◆ NullValue()

static MAXON_ATTRIBUTE_FORCE_INLINE const SourceLocation& NullValue ( )
static

◆ operator==()

Bool operator== ( const SourceLocation b) const

◆ operator<()

Bool operator< ( const SourceLocation b) const

◆ MAXON_OPERATOR_COMPARISON()

MAXON_OPERATOR_COMPARISON ( SourceLocation  )

◆ GetHashCode()

HashInt GetHashCode ( ) const

Member Data Documentation

◆ file

const Char* file

◆ lineAndFlags

Int lineAndFlags

◆ name

const Char* name

◆ FRAME_INFO_FLAG

const Int FRAME_INFO_FLAG
static

◆ LINE_NUMBER_MASK

const Int LINE_NUMBER_MASK
static