CppADCodeGen  HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
system.hpp
1 #ifndef CPPAD_CG_SYSTEM_INCLUDED
2 #define CPPAD_CG_SYSTEM_INCLUDED
3 /* --------------------------------------------------------------------------
4  * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5  * Copyright (C) 2012 Ciengis
6  *
7  * CppADCodeGen is distributed under multiple licenses:
8  *
9  * - Eclipse Public License Version 1.0 (EPL1), and
10  * - GNU General Public License Version 3 (GPL3).
11  *
12  * EPL1 terms and conditions can be found in the file "epl-v10.txt", while
13  * terms and conditions for the GPL3 can be found in the file "gpl3.txt".
14  * ----------------------------------------------------------------------------
15  * Author: Joao Leal
16  */
17 
18 namespace CppAD {
19 namespace cg {
20 
24 namespace system {
25 
26 template<class T = int >
27 class SystemInfo {
28 public:
29  static const std::string DYNAMIC_LIB_EXTENSION;
30  static const std::string STATIC_LIB_EXTENSION;
31 };
32 
33 inline std::string getWorkingDirectory();
34 
41 inline void createFolder(const std::string& folder);
42 
50 inline std::string createPath(const std::string& baseFolder,
51  const std::string& file);
52 
60 inline std::string createPath(std::initializer_list<std::string> folders,
61  const std::string& file);
62 
69 inline std::string escapePath(const std::string& path);
70 
71 inline std::string filenameFromPath(const std::string& path);
72 
73 inline std::string directoryFromPath(const std::string& path);
74 
81 inline bool isAbsolutePath(const std::string& path);
82 
89 inline bool isDirectory(const std::string& path);
90 
97 inline bool isFile(const std::string& path);
98 
110 inline void callExecutable(const std::string& executable,
111  const std::vector<std::string>& args,
112  std::string* stdOutErrMessage = nullptr,
113  const std::string* stdInMessage = nullptr);
114 
115 }
116 
117 } // END cg namespace
118 } // END CppAD namespace
119 
120 #endif
void callExecutable(const std::string &executable, const std::vector< std::string > &args, std::string *stdOutErrMessage=nullptr, const std::string *stdInMessage=nullptr)
std::string createPath(const std::string &baseFolder, const std::string &file)
bool isDirectory(const std::string &path)
std::string escapePath(const std::string &path)
bool isAbsolutePath(const std::string &path)
void createFolder(const std::string &folder)
bool isFile(const std::string &path)