ParseExp.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00002 
00011 /*  This program is free software; you can redistribute it and/or
00012  *  modify it under the terms of the GNU General Public
00013  *  License as published by the Free Software Foundation; either
00014  *  version 2 of the License, or (at your option) any later version.
00015  *
00016  *  This software is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  *  General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU General Public
00022  *  License along with this software. If not, see
00023  *  <http://www.gnu.org/licenses/>.
00024  *
00025  */
00026 
00027 #ifndef PARSEEXP_H
00028 #define PARSEEXP_H
00029 #include <string>
00030 #include <vector>
00031 #include <iostream>
00032 #include <hugin_shared.h>
00033 #include "hugin_config.h"
00034 #include "panodata/Panorama.h"
00035 
00036 namespace Parser
00037 {
00039 struct IMPEX ParseVar
00040 {
00041     std::string varname;
00042     // contains image number or -1 if it applies to all images
00043     int imgNr;
00044     std::string expression;
00045     bool flag;
00046     ParseVar();
00047 };
00048 typedef std::vector<ParseVar> ParseVarVec;
00049 
00052 IMPEX bool ParseVarNumber(const std::string&s, Parser::ParseVar& var);
00054 IMPEX void ParseVariableString(ParseVarVec& parseVec, const std::string& input, std::ostream& errorStream, void(*func)(ParseVarVec&, const std::string&, std::ostream&));
00055 
00057 IMPEX void PanoParseExpression(HuginBase::Panorama& pano, const std::string& expression, std::ostream& statusStream = std::cout, std::ostream& errorStream = std::cerr);
00058 };
00059 
00060 #endif

Generated on 11 Dec 2017 for Hugintrunk by  doxygen 1.4.7