artifact Class Reference

#include <artifact.hpp>

List of all members.

Public Member Functions

 artifact ()
 Default constructor.
 artifact (std::string const &name)
 artifact (artifact const &a)
 ~artifact ()
 Destructor decrements the reference count.
artifactoperator= (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)


Detailed Description

Pimpl wrapper for artifacts.

Definition at line 14 of file artifact.hpp.


Constructor & Destructor Documentation

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

Parameters:
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().


Member Function Documentation

artifact & artifact::operator= ( artifact const &  a  ) 

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.

Parameters:
str The string to expand
Returns:
a copy of the string after expanding variables.

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.

Parameters:
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().


The documentation for this class was generated from the following files:
Generated on Sun Nov 30 09:53:23 2008 for Exploring C++ - Final Forms of Key Examples by  doxygen 1.5.3