Puma Reference Manual Puma: Puma::CSourceInfo Class Reference



Puma::CSourceInfo Class Reference

Source file information for an entity. More...

#include <Puma/CSourceInfo.h>

List of all members.

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.

Detailed Description

Source file information for an entity.

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


Constructor & Destructor Documentation

Puma::CSourceInfo::CSourceInfo ( ) [inline]

Constructor.

Puma::CSourceInfo::~CSourceInfo ( ) [inline]

Destructor.


Member Function Documentation

int Puma::CSourceInfo::Column ( ) const

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

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

Get the source file information.

void Puma::CSourceInfo::FileInfo ( CFileInfo file) [inline]

Set the source file information.

Parameters:
fileThe source file.
const char* Puma::CSourceInfo::FileName ( ) const

Get name of the source file.

int Puma::CSourceInfo::Line ( ) const

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

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.
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.
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.
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.
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.
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.
bool Puma::CSourceInfo::operator== ( const CSourceInfo si) const

Check if the source file locations are equal.

Parameters:
siThe source file location to compare with.
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.
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.
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.
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.
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.
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.
Unit* Puma::CSourceInfo::SrcUnit ( ) const

Get the token unit of the source file.

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

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

void Puma::CSourceInfo::StartToken ( CT_Token token) [inline]

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

Parameters:
tokenThe start token.