CppADCodeGen  HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
c_compiler.hpp
1 #ifndef CPPAD_CG_C_COMPILER_INCLUDED
2 #define CPPAD_CG_C_COMPILER_INCLUDED
3 /* --------------------------------------------------------------------------
4  * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5  * Copyright (C) 2012 Ciengis
6  * Copyright (C) 2018 Joao Leal
7  *
8  * CppADCodeGen is distributed under multiple licenses:
9  *
10  * - Eclipse Public License Version 1.0 (EPL1), and
11  * - GNU General Public License Version 3 (GPL3).
12  *
13  * EPL1 terms and conditions can be found in the file "epl-v10.txt", while
14  * terms and conditions for the GPL3 can be found in the file "gpl3.txt".
15  * ----------------------------------------------------------------------------
16  * Author: Joao Leal
17  */
18 
19 namespace CppAD {
20 namespace cg {
21 
27 template<class Base>
28 class CCompiler {
29 public:
30 
37  virtual const std::string& getTemporaryFolder() const = 0;
38 
45  virtual void setTemporaryFolder(const std::string& tmpFolder) = 0;
46 
47  virtual bool isSaveToDiskFirst() const = 0;
48 
49  virtual void setSaveToDiskFirst(bool saveToDiskFirst) = 0;
50 
57  virtual const std::string& getSourcesFolder() const = 0;
58 
65  virtual void setSourcesFolder(const std::string& srcFolder) = 0;
66 
67  virtual const std::set<std::string>& getObjectFiles() const = 0;
68 
69  virtual const std::set<std::string>& getSourceFiles() const = 0;
70 
71  virtual bool isVerbose() const = 0;
72 
73  virtual void setVerbose(bool verbose) = 0;
74 
82  virtual void compileSources(const std::map<std::string, std::string>& sources,
83  bool posIndepCode,
84  JobTimer* timer = nullptr) = 0;
85 
91  virtual void buildDynamic(const std::string& library,
92  JobTimer* timer = nullptr) = 0;
93 
98  virtual void cleanup() = 0;
99 
100  inline virtual ~CCompiler() = default;
101 
102 };
103 
104 } // END cg namespace
105 } // END CppAD namespace
106 
107 #endif
virtual void compileSources(const std::map< std::string, std::string > &sources, bool posIndepCode, JobTimer *timer=nullptr)=0
virtual const std::string & getTemporaryFolder() const =0
virtual void setTemporaryFolder(const std::string &tmpFolder)=0
virtual void buildDynamic(const std::string &library, JobTimer *timer=nullptr)=0
virtual void setSourcesFolder(const std::string &srcFolder)=0
virtual const std::string & getSourcesFolder() const =0
virtual void cleanup()=0