#include <artifact.hpp>
Public Member Functions | |
artifact () | |
Default constructor. | |
artifact (std::string const &name) | |
artifact (artifact const &a) | |
~artifact () | |
Destructor decrements the reference count. | |
artifact & | operator= (artifact const &a) |
std::string const & | name () const |
Returns the artifact name. | |
std::time_t | mod_time () const |
Returns the modification time. | |
std::string | expand (std::string str) const |
void | build () |
"Build" the artifact. | |
std::time_t | get_mod_time () |
void | store_variable (std::string const &name, std::string const &value) |
Definition at line 14 of file artifact.hpp.
artifact::artifact | ( | ) |
Default constructor.
Listing 60-6. Implementing the artifact Class
Definition at line 6 of file artifact.cpp.
artifact::artifact | ( | std::string const & | name | ) |
Construct an artifact with the given name
name | the artifact name |
Definition at line 8 of file artifact.cpp.
artifact::artifact | ( | artifact const & | a | ) |
Copy constructor. Increments the reference count.
Definition at line 12 of file artifact.cpp.
References artifact_impl::add_ref().
Assignment operator. Increments the refernece count
Definition at line 23 of file artifact.cpp.
References artifact_impl::add_ref(), artifact_impl::delete_ref(), and pimpl_.
std::string artifact::expand | ( | std::string | str | ) | const |
Expands variables in a string.
str | The string to expand |
Definition at line 43 of file artifact.cpp.
References artifact_impl::expand().
Referenced by parse_graph().
std::time_t artifact::get_mod_time | ( | ) |
Return the modification time of the artifact. In real life, this would probably check the file's modification time.
Definition at line 54 of file artifact.cpp.
References artifact_impl::get_mod_time().
void artifact::store_variable | ( | std::string const & | name, | |
std::string const & | value | |||
) |
Store a variable in the local map.
name | the variable name | |
value | the replacement value of the variable |
Definition at line 59 of file artifact.cpp.
References artifact_impl::store_variable().
Referenced by parse_graph().