00001 00003 #ifndef ARTIFACT_IMPL_HPP_ 00004 #define ARTIFACT_IMPL_HPP_ 00005 00006 #include <cstdlib> 00007 #include <ctime> 00008 #include <string> 00009 00010 #include "variables.hpp" 00011 00015 class artifact_impl 00016 { 00017 public: 00019 artifact_impl(); 00021 artifact_impl(std::string const& name); 00023 ~artifact_impl(); 00024 00026 void add_ref(); 00029 void delete_ref(); 00030 00032 std::string const& name() const; 00034 std::time_t mod_time() const; 00035 00041 std::string expand(std::string str) const; 00042 00044 void build(); 00047 std::time_t get_mod_time(); 00051 void store_variable(std::string const& name, std::string const& value); 00052 private: 00053 std::size_t ref_count_; 00054 std::string name_; 00055 std::time_t mod_time_; 00056 variable_map* variables_; 00057 }; 00058 00059 #endif // ARTIFACT_IMPL_HPP_