|
Hugin trunk 0.1
|
Namespaces | |
| namespace | 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< ParseVar > | ParseVarVec |
Functions | |
| bool | ParseExpression (const std::string &expression, double &result, const ConstantMap &constants, std::string &error) |
| parse complete expression in 2 steps | |
| bool | ParseVarNumber (const std::string &s, Parser::ParseVar &var) |
| parse string s and store result in ParseVar var | |
| 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) |
| 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 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.
| bool Parser::CalculateConstant | ( | HuginBase::Panorama & | pano, |
| const Parser::ParseVar & | parseVar, | ||
| Parser::ConstantMap & | constants, | ||
| std::ostream & | statusStream, | ||
| std::ostream & | errorStream | ||
| ) |
Definition at line 740 of file ParseExp.cpp.
References HuginBase::Panorama::getImage(), ParseExpression(), and threshold().
Referenced by PanoParseExpression().
| IMPEX void Parser::PanoParseExpression | ( | HuginBase::Panorama & | pano, |
| const std::string & | expression, | ||
| std::ostream & | statusStream, | ||
| std::ostream & | errorStream | ||
| ) |
parses the given expression and apply the changes to the Panorama
Definition at line 768 of file ParseExp.cpp.
References CalculateConstant(), Parser::ShuntingYard::CleanUpParser(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), ParseSingleVar(), ParseVariableString(), set_contains(), hugin_utils::SplitString(), hugin_utils::StrTrim(), threshold(), and UpdateSingleVar().
Referenced by main(), ImageVariablesExpressionDialog::OnTest(), and PanoCommand::UpdateVariablesByParseExpression::processPanorama().
| bool Parser::ParseExpression | ( | const std::string & | expression, |
| double & | result, | ||
| const ConstantMap & | constants, | ||
| std::string & | error | ||
| ) |
parse complete expression in 2 steps
Definition at line 580 of file ParseExp.cpp.
References Parser::ShuntingYard::ClearQueue(), Parser::ShuntingYard::ConvertToRPN(), Parser::ShuntingYard::EvaluateRPN(), M_PI, Parser::ShuntingYard::RemoveWhiteSpaces(), threshold(), and hugin_utils::tolower().
Referenced by CalculateConstant(), and UpdateSingleVar().
| void Parser::ParseSingleVar | ( | ParseVarVec & | varVec, |
| const std::string & | s, | ||
| std::ostream & | errorStream | ||
| ) |
Definition at line 657 of file ParseExp.cpp.
References Parser::ParseVar::expression, Parser::ParseVar::flag, ParseVarNumber(), hugin_utils::StrTrim(), and threshold().
Referenced by PanoParseExpression().
| 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(), and threshold().
Referenced by main(), and PanoParseExpression().
| IMPEX bool Parser::ParseVarNumber | ( | const std::string & | s, |
| Parser::ParseVar & | var | ||
| ) |
parse string s and store result in ParseVar var
Definition at line 626 of file ParseExp.cpp.
References Parser::ParseVar::imgNr, hugin_utils::stringToInt(), threshold(), and Parser::ParseVar::varname.
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 | ||
| ) |
Definition at line 709 of file ParseExp.cpp.
References HuginBase::Panorama::getImage(), HuginBase::SrcPanoImage::getVar(), ParseExpression(), threshold(), and HuginBase::Panorama::updateVariable().
Referenced by PanoParseExpression().