PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::CSourceInfo Class Reference

#include <Puma/CSourceInfo.h>

Description

Source file information for an entity.

Stores the file information and start token of the entity in the source file.

Public Member Functions

 CSourceInfo ()
 Constructor.
 
 ~CSourceInfo ()
 Destructor.
 
bool operator== (const CSourceInfo &si) const
 Check if the source file locations are equal.
 
bool operator!= (const CSourceInfo &si) const
 Check if the source file locations are not equal.
 
bool operator< (const CSourceInfo &si) const
 Check if this source file location is before the given location.
 
bool operator> (const CSourceInfo &si) const
 Check if this source file location is behind the given location.
 
bool operator<= (const CSourceInfo &si) const
 Check if this source file location equals or is before the given location.
 
bool operator>= (const CSourceInfo &si) const
 Check if this source file location equals or is behind the given location.
 
bool operator== (const CT_Token *token) const
 Check if the source file locations are equal.
 
bool operator!= (const CT_Token *token) const
 Check if the source file locations are not equal.
 
bool operator< (const CT_Token *token) const
 Check if this source file location is before the given location.
 
bool operator> (const CT_Token *token) const
 Check if this source file location is behind the given location.
 
bool operator<= (const CT_Token *token) const
 Check if this source file location equals or is before the given location.
 
bool operator>= (const CT_Token *token) const
 Check if this source file location equals or is behind the given location.
 
bool operator== (const Token *token) const
 Check if the source file locations are equal.
 
CFileInfoFileInfo () const
 Get the source file information.
 
CT_TokenStartToken () const
 Get the start token of the entity in the source file.
 
const char * FileName () const
 Get name of the source file.
 
int Line () const
 Get the line number of the entity in the source file.
 
int Column () const
 Get the column number of the entity in the source file.
 
UnitSrcUnit () const
 Get the token unit of the source file.
 
void FileInfo (CFileInfo *file)
 Set the source file information.
 
void StartToken (CT_Token *token)
 Set the start token of the entity in the source file.
 

Constructor & Destructor Documentation

◆ CSourceInfo()

Puma::CSourceInfo::CSourceInfo ( )
inline

Constructor.

◆ ~CSourceInfo()

Puma::CSourceInfo::~CSourceInfo ( )
inline

Destructor.

Member Function Documentation

◆ Column()

int Puma::CSourceInfo::Column ( ) const

Get the column number of the entity in the source file.

◆ FileInfo() [1/2]

CFileInfo * Puma::CSourceInfo::FileInfo ( ) const
inline

Get the source file information.

◆ FileInfo() [2/2]

void Puma::CSourceInfo::FileInfo ( CFileInfo * file)
inline

Set the source file information.

Parameters
fileThe source file.

◆ FileName()

const char * Puma::CSourceInfo::FileName ( ) const

Get name of the source file.

◆ Line()

int Puma::CSourceInfo::Line ( ) const

Get the line number of the entity in the source file.

◆ operator!=() [1/2]

bool Puma::CSourceInfo::operator!= ( const CSourceInfo & si) const
inline

Check if the source file locations are not equal.

Parameters
siThe source file location to compare with.

◆ operator!=() [2/2]

bool Puma::CSourceInfo::operator!= ( const CT_Token * token) const
inline

Check if the source file locations are not equal.

Parameters
tokenThe token in the source file to compare with.

◆ operator<() [1/2]

bool Puma::CSourceInfo::operator< ( const CSourceInfo & si) const

Check if this source file location is before the given location.

Parameters
siThe source file location to compare with.

◆ operator<() [2/2]

bool Puma::CSourceInfo::operator< ( const CT_Token * token) const

Check if this source file location is before the given location.

Parameters
tokenThe token in the source file to compare with.

◆ operator<=() [1/2]

bool Puma::CSourceInfo::operator<= ( const CSourceInfo & si) const
inline

Check if this source file location equals or is before the given location.

Parameters
siThe source file location to compare with.

◆ operator<=() [2/2]

bool Puma::CSourceInfo::operator<= ( const CT_Token * token) const
inline

Check if this source file location equals or is before the given location.

Parameters
tokenThe token in the source file to compare with.

◆ operator==() [1/3]

bool Puma::CSourceInfo::operator== ( const CSourceInfo & si) const

Check if the source file locations are equal.

Parameters
siThe source file location to compare with.

◆ operator==() [2/3]

bool Puma::CSourceInfo::operator== ( const CT_Token * token) const

Check if the source file locations are equal.

Parameters
tokenThe token in the source file to compare with.

◆ operator==() [3/3]

bool Puma::CSourceInfo::operator== ( const Token * token) const

Check if the source file locations are equal.

Parameters
tokenThe token in the source file to compare with.

◆ operator>() [1/2]

bool Puma::CSourceInfo::operator> ( const CSourceInfo & si) const

Check if this source file location is behind the given location.

Parameters
siThe source file location to compare with.

◆ operator>() [2/2]

bool Puma::CSourceInfo::operator> ( const CT_Token * token) const

Check if this source file location is behind the given location.

Parameters
tokenThe token in the source file to compare with.

◆ operator>=() [1/2]

bool Puma::CSourceInfo::operator>= ( const CSourceInfo & si) const
inline

Check if this source file location equals or is behind the given location.

Parameters
siThe source file location to compare with.

◆ operator>=() [2/2]

bool Puma::CSourceInfo::operator>= ( const CT_Token * token) const
inline

Check if this source file location equals or is behind the given location.

Parameters
tokenThe token in the source file to compare with.

◆ SrcUnit()

Unit * Puma::CSourceInfo::SrcUnit ( ) const

Get the token unit of the source file.

◆ StartToken() [1/2]

CT_Token * Puma::CSourceInfo::StartToken ( ) const
inline

Get the start token of the entity in the source file.

◆ StartToken() [2/2]

void Puma::CSourceInfo::StartToken ( CT_Token * token)
inline

Set the start token of the entity in the source file.

Parameters
tokenThe start token.