Merge branch 'master' into audioengine
[ardour.git] / libs / pbd / pbd / epa.h
index 39773313ecee74f38e76bdce2df9fef7bf999943..477d7f9678ef926025e5a47f210bce9f8b81de59 100644 (file)
@@ -27,18 +27,23 @@ namespace PBD {
 
 class EnvironmentalProtectionAgency {
   public:
-    EnvironmentalProtectionAgency ();
-    ~EnvironmentalProtectionAgency ();
-
-    void restore ();
-    void save ();
-
-    static EnvironmentalProtectionAgency* get_global_epa () { return _global_epa; }
-    static void set_global_epa (EnvironmentalProtectionAgency* epa) { _global_epa = epa; }
-
+        EnvironmentalProtectionAgency (bool arm = true, const std::string& envname = std::string());
+        ~EnvironmentalProtectionAgency ();
+        
+        void arm ();
+        void save ();
+        void restore () const;
+        
+        static EnvironmentalProtectionAgency* get_global_epa () { return _global_epa; }
+        static void set_global_epa (EnvironmentalProtectionAgency* epa) { _global_epa = epa; }
+        
   private:
-    std::map<std::string,std::string> e;
-    static EnvironmentalProtectionAgency* _global_epa;
+        void clear () const;
+               
+        bool _armed;
+        std::string _envname;
+        std::map<std::string,std::string> e;
+        static EnvironmentalProtectionAgency* _global_epa;
 };
 
 }