BuildCache
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
bcache::direct_mode_manifest_t Class Reference

A direct mode cache manifest. More...

#include <direct_mode_manifest.hpp>

Public Member Functions

 direct_mode_manifest_t ()
 Construct an empty/invalid manifest.
 
 direct_mode_manifest_t (const std::string &hash, const std::map< std::string, std::string > &files_with_hashes)
 Construct a valid manifest. More...
 
 operator bool () const
 
std::string serialize () const
 Serialize a manifest. More...
 
const std::string & hash () const
 
const std::map< std::string, std::string > & files_width_hashes () const
 

Static Public Member Functions

static direct_mode_manifest_t deserialize (const std::string &data)
 Deserialize a manifest. More...
 

Private Attributes

std::string m_hash
 
std::map< std::string, std::string > m_files_width_hashes
 
bool m_valid = false
 

Detailed Description

A direct mode cache manifest.

Constructor & Destructor Documentation

◆ direct_mode_manifest_t()

bcache::direct_mode_manifest_t::direct_mode_manifest_t ( const std::string &  hash,
const std::map< std::string, std::string > &  files_with_hashes 
)

Construct a valid manifest.

Parameters
hashThe preprocessor mode cache entry hash.
files_with_hashesPaths to implicit input files (key) and their hashes (value).

Member Function Documentation

◆ deserialize()

direct_mode_manifest_t bcache::direct_mode_manifest_t::deserialize ( const std::string &  data)
static

Deserialize a manifest.

Parameters
dataThe serialized data.
Returns
the deserialized manifest.

◆ files_width_hashes()

const std::map<std::string, std::string>& bcache::direct_mode_manifest_t::files_width_hashes ( ) const
inline
Returns
a mapping from file paths to their hashes.

◆ hash()

const std::string& bcache::direct_mode_manifest_t::hash ( ) const
inline
Returns
the preprocessor mode cache entry hash.

◆ operator bool()

bcache::direct_mode_manifest_t::operator bool ( ) const
inline
Returns
true if this object represents a valid manifest. E.g. for a cache miss, the return value is false.

◆ serialize()

std::string bcache::direct_mode_manifest_t::serialize ( ) const

Serialize a manifest.

Returns
a serialized data as a string object.

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