Emulate 'log1p()' and 'expm1()' using 'log()' and 'exp()'
[ardour.git] / libs / pbd / pbd / epa.h
index b2708fbd4cc9617ef90b63784fed329d343fe4b6..8727fad08e115931475485fa5c0b65ce4e0031fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2010 Paul Davis 
+    Copyright (C) 2010 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #include <map>
 #include <string>
 
+#include "pbd/libpbd_visibility.h"
+
 namespace PBD {
 
-class EnvironmentalProtectionAgency {
+class LIBPBD_API EnvironmentalProtectionAgency {
   public:
-    EnvironmentalProtectionAgency (bool arm=true);
-    ~EnvironmentalProtectionAgency ();
+        EnvironmentalProtectionAgency (bool arm = true, const std::string& envname = std::string());
+        ~EnvironmentalProtectionAgency ();
 
-    void arm ();
-    void save ();
-    void restore () const;
+        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; }
+        static EnvironmentalProtectionAgency* get_global_epa () { return _global_epa; }
+        static void set_global_epa (EnvironmentalProtectionAgency* epa) { _global_epa = epa; }
 
   private:
-    bool _armed;
-    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;
 };
 
 }