aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
gum::ParseError Class Reference

This class is used to represent parsing errors for the different parser implemented in aGrUM. More...

#include <agrum/base/core/errorsContainer.h>

Collaboration diagram for gum::ParseError:

Public Member Functions

Class constructors and destructors
 ParseError (bool is_error, const std::string &msg, Idx line)
 Class constructor.
 ParseError (bool is_error, const std::string &msg, const std::string &filename, Idx line, Idx col=0)
 Class constructor.
 ParseError (bool is_error, const std::string &msg, const std::string &filename, const std::string &code, Idx line, Idx col=0)
 Class constructor.
 ParseError (const ParseError &cont)
 Copy constructor.

Class operator

bool is_error
 If false, this gum::ParseError is a warning.
Idx line
 The line of this gum::ParseError.
Idx column
 The column of this gum::ParseError, default is 0.
std::string msg
 The gum::ParseError message.
std::string filename
 The file of this gum::ParseError, default is "".
std::string code
 The code of this gum::ParseError, default is "".
ParseError operator= (const ParseError &cont)
 Copy operator.
std::string toString () const
 Return a std::string representation of this gum::ParseError.
std::string toElegantString () const
 Return an elegant std::string representation of this gum::ParseError.

Detailed Description

This class is used to represent parsing errors for the different parser implemented in aGrUM.

Definition at line 69 of file errorsContainer.h.

Constructor & Destructor Documentation

◆ ParseError() [1/4]

gum::ParseError::ParseError ( bool is_error,
const std::string & msg,
Idx line )

Class constructor.

Parameters
is_errorTrue if this is an error.
msgThe parsing error message.
lineThe line where the parsing error occured.

References is_error, line, and msg.

Referenced by ParseError(), and operator=().

Here is the caller graph for this function:

◆ ParseError() [2/4]

gum::ParseError::ParseError ( bool is_error,
const std::string & msg,
const std::string & filename,
Idx line,
Idx col = 0 )

Class constructor.

Parameters
is_errorIf false, then this ParseError is a warning.
msgThe parsing error message.
filenameThe file where the parsing error occured.
lineThe line where the parsing error occured.
colThe column where the parsing error occured.

References filename, is_error, line, and msg.

◆ ParseError() [3/4]

gum::ParseError::ParseError ( bool is_error,
const std::string & msg,
const std::string & filename,
const std::string & code,
Idx line,
Idx col = 0 )

Class constructor.

Parameters
is_errorIf false, then this ParseError is a warning.
msgThe parsing error message.
filenameThe file where the parsing error occured.
codeThe code of the parsing error.
lineThe line where the parsing error occured.
colThe column where the parsing error occured.

References code, filename, is_error, line, and msg.

◆ ParseError() [4/4]

gum::ParseError::ParseError ( const ParseError & cont)

Copy constructor.

Parameters
contThe gum::ParseError to copy.

References ParseError().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

ParseError gum::ParseError::operator= ( const ParseError & cont)

Copy operator.

Parameters
contThe gum::ParseError to copy.
Returns
Returns this gum::ParseError.

References ParseError().

Here is the call graph for this function:

◆ toElegantString()

std::string gum::ParseError::toElegantString ( ) const

Return an elegant std::string representation of this gum::ParseError.

Returns
Return an elegant std::string representation of this gum::ParseError.

◆ toString()

std::string gum::ParseError::toString ( ) const

Return a std::string representation of this gum::ParseError.

Returns
Return a std::string representation of this gum::ParseError.

Member Data Documentation

◆ code

std::string gum::ParseError::code
mutable

The code of this gum::ParseError, default is "".

Definition at line 155 of file errorsContainer.h.

Referenced by ParseError().

◆ column

Idx gum::ParseError::column

The column of this gum::ParseError, default is 0.

Definition at line 146 of file errorsContainer.h.

◆ filename

std::string gum::ParseError::filename

The file of this gum::ParseError, default is "".

Definition at line 152 of file errorsContainer.h.

Referenced by ParseError(), and ParseError().

◆ is_error

bool gum::ParseError::is_error

◆ line

Idx gum::ParseError::line

The line of this gum::ParseError.

Definition at line 143 of file errorsContainer.h.

Referenced by ParseError(), ParseError(), and ParseError().

◆ msg

std::string gum::ParseError::msg

The gum::ParseError message.

Definition at line 149 of file errorsContainer.h.

Referenced by ParseError(), ParseError(), and ParseError().


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