/*
- 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;
};
}