pelib  2.0.0
include/pelib/Cpp.hpp
Go to the documentation of this file.
00001 /*
00002  Copyright 2015 Nicolas Melot
00003 
00004  This file is part of Pelib.
00005 
00006  Pelib is free software: you can redistribute it and/or modify
00007  it under the terms of the GNU General Public License as published by
00008  the Free Software Foundation, either version 3 of the License, or
00009  (at your option) any later version.
00010 
00011  Pelib is distributed in the hope that it will be useful,
00012  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  GNU General Public License for more details.
00015 
00016  You should have received a copy of the GNU General Public License
00017  along with Pelib. If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00020 
00021 #include <iostream>
00022 #include <cstdlib>
00023 #include <fstream>
00024 #include <string>
00025 #include <boost/regex.hpp>
00026 #include <iomanip>
00027 
00028 #include <pelib/AlgebraParser.hpp>
00029 #include <pelib/AlgebraOutput.hpp>
00030 #include <pelib/CppDataOutput.hpp>
00031 #include <pelib/CppData.hpp>
00032 
00033 #ifndef PELIB_CPP
00034 #define PELIB_CPP
00035 
00036 namespace pelib
00037 {
00039         class Cpp: public AlgebraOutput
00040         {
00041                 public:
00045                         Cpp(std::vector<CppData*> outputs);
00047                         Cpp(const Cpp &src);
00049                         Cpp();
00053                         Cpp(const std::string& name);
00054 
00056                         virtual
00057                         ~Cpp();
00058 
00060                         virtual
00061                         void
00062                         setName(const std::string &name);
00063 
00065                         virtual
00066                         std::string
00067                         getName() const;
00068                         
00070                         virtual
00071                         void
00072                         dump(std::ostream& o, const Algebra &record) const;
00073 
00075                         virtual
00076                         void
00077                         dump(std::ostream& o, const AlgebraData *data) const;
00078 
00080                         virtual
00081                         Cpp&
00082                         operator=(const Cpp &rhs);
00083 
00084                 protected:
00085                         //std::vector<CppParser*> outputs;
00086                         std::vector<CppData*> outputs;
00087                         std::string name;
00088 
00089                         void
00090                         deleteOutputs();
00091 
00092                         void
00093                         addOutputs();
00094                         
00095                 private:
00096         };
00097 }
00098 
00099 #endif