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