Logo Search packages:      
Sourcecode: ccbuild version File versions

bneijt::MD5Info Class Reference

#include <MD5Info.hh>

List of all members.

Detailed Description

MD5Sum information singleton. Keeps an in memory list of current and last MD5Hashes.

MD5Info is an interface to the .md5 files in the o directory. The hash filenames are not to be used by other parts of the program. Instead, the filename of the source file (the hash is about) is used and internally translated to the right .md5 filename.

The .md5 files contain a list of hashes which is a concatination of the hashes of the file and all it's dependencies. This means that if the file changes, the first 32 characters will change. Whenever a dependecy changes, characters in the latter part of the line will change.

Definition at line 42 of file MD5Info.hh.

Public Member Functions

std::string const & contentHash (std::string const &filename)
 Return the current hex hash string for the given file.
std::string const & old (std::string const &filename)
 Return the old, cached information for the given file. This will return the string placed in the configuration file with save.
void save (std::string const &filename, std::string const &hash)
 Save the hash information for the given file on disk now.

Static Public Member Functions

static void destroy ()
 Delete the instance.
static MD5InfogetInstance ()
 Get the instance.
static std::string hashFilenameFor (std::string const &filename)
 Returns the path to the hash file of a given filename This function should not be used very often. Currently it's only use is the cleaning part of the program.

Private Member Functions

void load (std::string const &filename)
 Load the hash for the given file from the default place.
 MD5Info (MD5Info const &other)
 Not implemented.
MD5Infooperator= (MD5Info const &other)
 Not implemented.
 ~MD5Info ()
 Destory the cache, saving any memory data to disk.

Private Attributes

std::map< std::string,
std::string > 
 The cached content hash of the file on disk.
std::map< std::string,
std::string > 
 A map of filename-hashstring for the new md5sum information.
std::map< std::string,
std::string > 
 A map of filename-hashstring for containing cached information.

Static Private Attributes

static MD5Infos_instance
 Static pointer to the instance.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index