summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/Preprocessor.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/Slice/Preprocessor.h')
-rw-r--r--cpp/include/Slice/Preprocessor.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h
index 1f6333cc8c5..f83c42bc30b 100644
--- a/cpp/include/Slice/Preprocessor.h
+++ b/cpp/include/Slice/Preprocessor.h
@@ -10,13 +10,13 @@
#ifndef PREPROCESSOR_H
#define PREPROCESSOR_H
-#include <IceUtil/Config.h>
+#include <IceUtil/Shared.h>
+#include <IceUtil/Handle.h>
#include <vector>
#ifdef __BCPLUSPLUS__
# include <stdio.h>
#endif
-
#ifndef SLICE_API
# ifdef SLICE_API_EXPORTS
# define SLICE_API ICE_DECLSPEC_EXPORT
@@ -28,27 +28,33 @@
namespace Slice
{
-class SLICE_API Preprocessor
+class Preprocessor;
+typedef IceUtil::Handle<Preprocessor> PreprocessorPtr;
+
+class SLICE_API Preprocessor : public IceUtil::SimpleShared
{
public:
- Preprocessor(const std::string&, const std::string&, const std::vector<std::string>&);
+ static PreprocessorPtr create(const std::string&, const std::string&, const std::vector<std::string>&);
+
~Preprocessor();
-
+
FILE* preprocess(bool);
bool close();
- enum Language { CPlusPlus, Java, JavaXML, CSharp, VisualBasic };
+ enum Language { CPlusPlus, Java, JavaXML, CSharp };
bool printMakefileDependencies(Language, const std::vector<std::string>&, const std::string& = "cpp");
-
+
std::string getBaseName();
static std::string addQuotes(const std::string&);
static std::string normalizeIncludePath(const std::string&);
private:
-
+
+ Preprocessor(const std::string&, const std::string&, const std::vector<std::string>&);
+
bool checkInputFile();
const std::string _path;