OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CSMTools::ScriptCheckStage Class Reference

VerifyStage: make sure that scripts compile. More...

#include <scriptcheck.hpp>

Inheritance diagram for CSMTools::ScriptCheckStage:
Collaboration diagram for CSMTools::ScriptCheckStage:

Public Member Functions

 ScriptCheckStage (const CSMDoc::Document &document)
 
virtual int setup ()
 
virtual void perform (int stage, CSMDoc::Messages &messages)
 Messages resulting from this tage will be appended to messages. More...
 
- Public Member Functions inherited from CSMDoc::Stage
virtual ~Stage ()
 

Private Types

enum  WarningMode { Mode_Ignore, Mode_Normal, Mode_Strict }
 
- Private Types inherited from Compiler::ErrorHandler
enum  Type { WarningMessage, ErrorMessage }
 

Private Member Functions

CSMDoc::Message::Severity getSeverity (Type type)
 
virtual void report (const std::string &message, const Compiler::TokenLoc &loc, Type type)
 Report error to the user. More...
 
virtual void report (const std::string &message, Type type)
 Report a file related error. More...
 
- Private Member Functions inherited from Compiler::ErrorHandler
 ErrorHandler ()
 constructor More...
 
virtual ~ErrorHandler ()
 destructor More...
 
bool isGood () const
 Was compiling successful? More...
 
int countErrors () const
 Return number of errors. More...
 
int countWarnings () const
 Return number of warnings. More...
 
void warning (const std::string &message, const TokenLoc &loc)
 Generate a warning message. More...
 
void error (const std::string &message, const TokenLoc &loc)
 Generate an error message. More...
 
void endOfFile ()
 Generate an error message for an unexpected EOF. More...
 
virtual void reset ()
 Remove all previous error/warning events. More...
 
void setWarningsMode (int mode)
 // 0 ignore, 1 rate as warning, 2 rate as error More...
 
void downgradeErrors (bool downgrade)
 Treat errors as warnings. More...
 

Private Attributes

const CSMDoc::DocumentmDocument
 
Compiler::Extensions mExtensions
 
CSMWorld::ScriptContext mContext
 
std::string mId
 
std::string mFile
 
CSMDoc::MessagesmMessages
 
WarningMode mWarningMode
 

Detailed Description

VerifyStage: make sure that scripts compile.

Member Enumeration Documentation

Enumerator
Mode_Ignore 
Mode_Normal 
Mode_Strict 

Constructor & Destructor Documentation

CSMTools::ScriptCheckStage::ScriptCheckStage ( const CSMDoc::Document document)
Todo:
add an option to configure warning mode

Here is the call graph for this function:

Member Function Documentation

CSMDoc::Message::Severity CSMTools::ScriptCheckStage::getSeverity ( Type  type)
private
void CSMTools::ScriptCheckStage::perform ( int  stage,
CSMDoc::Messages messages 
)
virtual

Messages resulting from this tage will be appended to messages.

Implements CSMDoc::Stage.

Here is the call graph for this function:

void CSMTools::ScriptCheckStage::report ( const std::string &  message,
const Compiler::TokenLoc loc,
Type  type 
)
privatevirtual

Report error to the user.

Implements Compiler::ErrorHandler.

Here is the call graph for this function:

void CSMTools::ScriptCheckStage::report ( const std::string &  message,
Type  type 
)
privatevirtual

Report a file related error.

Implements Compiler::ErrorHandler.

Here is the call graph for this function:

int CSMTools::ScriptCheckStage::setup ( )
virtual
Returns
number of steps

Implements CSMDoc::Stage.

Here is the call graph for this function:

Member Data Documentation

CSMWorld::ScriptContext CSMTools::ScriptCheckStage::mContext
private
const CSMDoc::Document& CSMTools::ScriptCheckStage::mDocument
private
Compiler::Extensions CSMTools::ScriptCheckStage::mExtensions
private
std::string CSMTools::ScriptCheckStage::mFile
private
std::string CSMTools::ScriptCheckStage::mId
private
CSMDoc::Messages* CSMTools::ScriptCheckStage::mMessages
private
WarningMode CSMTools::ScriptCheckStage::mWarningMode
private

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