diff options
author | Andres Noetzli <noetzli@stanford.edu> | 2017-07-26 17:19:10 -0700 |
---|---|---|
committer | Andres Noetzli <noetzli@stanford.edu> | 2017-07-26 17:55:57 -0700 |
commit | 673ee2e5b8414d3155d83ca4c16269c1a02632ad (patch) | |
tree | faa442d6a7018e075f7f709b3aac2c18a8472a15 /src/preproc/preprocessing_pass_registry.h | |
parent | 7d0ddc953192d34f9924cd1a0565681636627e05 (diff) |
Initial work on PreprocessingPassRegistryrefactor_pp_registry
Diffstat (limited to 'src/preproc/preprocessing_pass_registry.h')
-rw-r--r-- | src/preproc/preprocessing_pass_registry.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/preproc/preprocessing_pass_registry.h b/src/preproc/preprocessing_pass_registry.h new file mode 100644 index 000000000..5bd0b772b --- /dev/null +++ b/src/preproc/preprocessing_pass_registry.h @@ -0,0 +1,32 @@ +#include "cvc4_private.h" + +#ifndef __CVC4__PREPROC__PREPROCESSING_PASS_REGISTRY_H +#define __CVC4__PREPROC__PREPROCESSING_PASS_REGISTRY_H + +#include <memory> +#include <string> +#include <unordered_map> + +namespace CVC4 { +namespace preproc { + +class PreprocessingPass; + +class PreprocessingPassRegistry { + public: + static PreprocessingPassRegistry* getInstance(); + + void registerPass(PreprocessingPass* preprocessingPass); + PreprocessingPass* getPass(const std::string& ppName); + + private: + static std::unique_ptr<PreprocessingPassRegistry> s_instance; + + std::unordered_map<std::string, PreprocessingPass*> + d_stringToPreprocessingPass; +}; + +} // namespace preproc +} // namespace CVC4 + +#endif /* __CVC4__PREPROC__PREPROCESSING_PASS_REGISTRY_H */ |