Public Member Functions | Private Attributes
CocoParserErrors< BaseClass, StringClass > Class Template Reference

Templated class to shadow the error handling for Coco/R parsers. More...

Inheritance diagram for CocoParserErrors< BaseClass, StringClass >:
Inheritance graph
[legend]
Collaboration diagram for CocoParserErrors< BaseClass, StringClass >:
Collaboration graph
[legend]

Public Member Functions

 CocoParserErrors (const word &name)
 Construct with given name. More...
 
virtual ~CocoParserErrors ()
 Destructor. More...
 
virtual const wordname () const
 Return the name issued for warnings. More...
 
virtual wordname ()
 Return the name issued for warnings. More...
 
virtual void Warning (const StringClass &msg)
 Handle a general warning 'msg'. More...
 
virtual void Warning (int line, int col, const StringClass &msg)
 Handle a general warning 'msg'. More...
 
virtual void Error (int line, int col, const StringClass &msg)
 Handle general error 'msg' (eg, a semantic error) More...
 
virtual void Error (const StringClass &msg)
 Handle general error 'msg' (eg, a semantic error) More...
 
virtual void Exception (const StringClass &msg)
 Handle a general exception 'msg'. More...
 

Private Attributes

word name_
 The name issued in warnings and errors. More...
 

Detailed Description

template<class BaseClass, class StringClass = std::wstring>
class Foam::CocoParserErrors< BaseClass, StringClass >

Templated class to shadow the error handling for Coco/R parsers.

Definition at line 47 of file CocoParserErrors.H.

Constructor & Destructor Documentation

◆ CocoParserErrors()

CocoParserErrors ( const word name)
inline

Construct with given name.

Definition at line 61 of file CocoParserErrors.H.

◆ ~CocoParserErrors()

virtual ~CocoParserErrors ( )
inlinevirtual

Destructor.

Definition at line 69 of file CocoParserErrors.H.

Member Function Documentation

◆ name() [1/2]

virtual const word& name ( ) const
inlinevirtual

Return the name issued for warnings.

Definition at line 76 of file CocoParserErrors.H.

References CocoParserErrors< BaseClass, StringClass >::name_.

◆ name() [2/2]

virtual word& name ( )
inlinevirtual

Return the name issued for warnings.

Definition at line 82 of file CocoParserErrors.H.

References CocoParserErrors< BaseClass, StringClass >::name_.

◆ Warning() [1/2]

virtual void Warning ( const StringClass &  msg)
inlinevirtual

Handle a general warning 'msg'.

Definition at line 91 of file CocoParserErrors.H.

References Foam::endl(), and WarningInFunction.

Here is the call graph for this function:

◆ Warning() [2/2]

virtual void Warning ( int  line,
int  col,
const StringClass &  msg 
)
inlinevirtual

Handle a general warning 'msg'.

Definition at line 98 of file CocoParserErrors.H.

References Foam::endl(), and WarningInFunction.

Here is the call graph for this function:

◆ Error() [1/2]

virtual void Error ( int  line,
int  col,
const StringClass &  msg 
)
inlinevirtual

Handle general error 'msg' (eg, a semantic error)

Definition at line 106 of file CocoParserErrors.H.

References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Referenced by CocoParserErrors< BaseClass, StringClass >::Exception().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Error() [2/2]

virtual void Error ( const StringClass &  msg)
inlinevirtual

Handle general error 'msg' (eg, a semantic error)

Definition at line 114 of file CocoParserErrors.H.

References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ Exception()

virtual void Exception ( const StringClass &  msg)
inlinevirtual

Handle a general exception 'msg'.

Definition at line 122 of file CocoParserErrors.H.

References CocoParserErrors< BaseClass, StringClass >::Error().

Here is the call graph for this function:

Field Documentation

◆ name_

word name_
private

The name issued in warnings and errors.

Definition at line 54 of file CocoParserErrors.H.

Referenced by CocoParserErrors< BaseClass, StringClass >::name().


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