Parser Namespace Reference


Classes

struct  ParseVar
 struct to save parsed variables and optional image numbers More...

Namespaces

namespace  ShuntingYard

Typedefs

typedef std::map< std::string,
double > 
ConstantMap
typedef std::vector< ParseVarParseVarVec

Functions

bool ParseExpression (const std::string &expression, double &result, const ConstantMap &constants, std::string &error)
 parse complete expression in 2 steps
void ParseSingleVar (ParseVarVec &varVec, const std::string &s, std::ostream &errorStream)
void ParseVariableString (ParseVarVec &parseVec, const std::string &input, std::ostream &errorStream, void(*func)(ParseVarVec &, const std::string &, std::ostream &))
 parse complete variables string
bool UpdateSingleVar (HuginBase::Panorama &pano, const Parser::ParseVar &parseVar, const Parser::ConstantMap &constants, size_t imgNr, std::ostream &statusStream, std::ostream &errorStream)
bool CalculateConstant (HuginBase::Panorama &pano, const Parser::ParseVar &parseVar, Parser::ConstantMap &constants, std::ostream &statusStream, std::ostream &errorStream)
IMPEX bool ParseVarNumber (const std::string &s, Parser::ParseVar &var)
 parse string s and store result in ParseVar var
IMPEX void PanoParseExpression (HuginBase::Panorama &pano, const std::string &expression, std::ostream &statusStream=std::cout, std::ostream &errorStream=std::cerr)
 parses the given expression and apply the changes to the Panorama


Typedef Documentation

typedef std::map<std::string, double> Parser::ConstantMap

Definition at line 44 of file ParseExp.cpp.

typedef std::vector<ParseVar> Parser::ParseVarVec

Definition at line 48 of file ParseExp.h.


Function Documentation

bool Parser::ParseExpression ( const std::string expression,
double &  result,
const ConstantMap constants,
std::string error 
)

parse complete expression in 2 steps

Definition at line 581 of file ParseExp.cpp.

References Parser::ShuntingYard::ClearQueue(), Parser::ShuntingYard::ConvertToRPN(), Parser::ShuntingYard::EvaluateRPN(), M_PI, Parser::ShuntingYard::RemoveWhiteSpaces(), and hugin_utils::tolower().

void Parser::ParseSingleVar ( ParseVarVec varVec,
const std::string s,
std::ostream errorStream 
)

Definition at line 819 of file ParseExp.cpp.

IMPEX void Parser::ParseVariableString ( ParseVarVec parseVec,
const std::string input,
std::ostream errorStream,
void(*)(ParseVarVec &, const std::string &, std::ostream &)  func 
)

parse complete variables string

Definition at line 861 of file ParseExp.cpp.

Referenced by main().

bool Parser::UpdateSingleVar ( HuginBase::Panorama pano,
const Parser::ParseVar parseVar,
const Parser::ConstantMap constants,
size_t  imgNr,
std::ostream statusStream,
std::ostream errorStream 
)

Definition at line 871 of file ParseExp.cpp.

bool Parser::CalculateConstant ( HuginBase::Panorama pano,
const Parser::ParseVar parseVar,
Parser::ConstantMap constants,
std::ostream statusStream,
std::ostream errorStream 
)

Definition at line 902 of file ParseExp.cpp.

IMPEX bool Parser::ParseVarNumber ( const std::string s,
Parser::ParseVar var 
)

parse string s and store result in ParseVar var

Returns:
true, if a valid image variable was given

Referenced by ParseSingleLinkVar(), and ParseSingleOptVar().

IMPEX void Parser::PanoParseExpression ( HuginBase::Panorama pano,
const std::string expression,
std::ostream statusStream = std::cout,
std::ostream errorStream = std::cerr 
)

parses the given expression and apply the changes to the Panorama

Referenced by main(), ImageVariablesExpressionDialog::OnTest(), and PanoCommand::UpdateVariablesByParseExpression::processPanorama().


Generated on 17 Nov 2017 for Hugintrunk by  doxygen 1.4.7