Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Functions
Parser Namespace Reference

Namespaces

 ShuntingYard
 

Classes

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

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 More...
 
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 More...
 
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 More...
 
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 More...
 

Typedef Documentation

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

Definition at line 43 of file ParseExp.cpp.

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

Definition at line 48 of file ParseExp.h.

Function Documentation

bool Parser::CalculateConstant ( HuginBase::Panorama pano,
const Parser::ParseVar parseVar,
Parser::ConstantMap constants,
std::ostream &  statusStream,
std::ostream &  errorStream 
)
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().

bool Parser::ParseExpression ( const std::string &  expression,
double &  result,
const ConstantMap &  constants,
std::string &  error 
)
void Parser::ParseSingleVar ( ParseVarVec &  varVec,
const std::string &  s,
std::ostream &  errorStream 
)
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 699 of file ParseExp.cpp.

References hugin_utils::SplitString().

Referenced by main().

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(), ParseSingleOptVar(), and ParseSingleVar().

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