BuildCache
Namespaces | Classes | Typedefs | Functions
bcache Namespace Reference

The top level namespace. More...

Namespaces

 comp
 Compression functions.
 
 config
 BuildCachce configuration options.
 
 debug
 Debug logging functions.
 
 file
 File utility functions and classes.
 
 perf
 Performance profiling functions.
 
 serialize
 Data (de)serialization functions.
 
 sys
 System utility functions.
 
 time
 Portable file time types and functions.
 

Classes

class  cache_entry_t
 Meta data for a single cache entry. More...
 
class  cache_stats_t
 
class  cache_t
 An interface to the different caches. More...
 
class  ccc_analyzer_wrapper_t
 This is a wrapper for the scan-build ccc-analyzer (a Clang-based static analyzer). More...
 
class  clang_cl_wrapper_t
 The clang-cl wrapper is almost identical to the MSVC wrapper. More...
 
class  data_store_t
 Provide access to a local key/value store. More...
 
class  direct_mode_manifest_t
 A direct mode cache manifest. More...
 
class  env_var_t
 A helper class for reading and parsing environment variables. More...
 
class  expected_file_t
 A description of an output file that is expected to be produced by a program. More...
 
class  gcc_wrapper_t
 A program wrapper for GCC and GCC-like C/C++ compilers. More...
 
class  ghs_wrapper_t
 This is a wrapper for the Green Hills Software C/C++ compiler. More...
 
class  hasher_t
 A class for hashing data. More...
 
class  http_cache_provider_t
 
class  local_cache_t
 
class  lua_wrapper_t
 A program wrapper that wraps Lua scripts. More...
 
class  msvc_wrapper_t
 A program wrapper MS Visual Studio. More...
 
class  program_wrapper_t
 The base class for all program wrappers. More...
 
class  qcc_wrapper_t
 This is a wrapper for the QNX C/C++ compiler, QCC. More...
 
class  redis_cache_provider_t
 
class  remote_cache_provider_t
 
class  remote_cache_t
 
class  s3_cache_provider_t
 
class  scoped_set_env_t
 A class for temporarily modifying an environment variable. More...
 
class  scoped_unset_env_t
 A class for temporarily clearing an environment variable. More...
 
class  string_list_t
 A convenient vector of strings container with support functions for program argument handling. More...
 
class  ti_arm_cgt_wrapper_t
 A program wrapper for the TI ARM CGT compiler. More...
 
class  ti_arp32_wrapper_t
 A program wrapper for the TI ARP32 compiler. More...
 
class  ti_c6x_wrapper_t
 A program wrapper for the TI C6x compiler. More...
 
class  ti_common_wrapper_t
 A base wrapper for the TI compilers. More...
 

Typedefs

using JSONPtr = std::unique_ptr< cJSON, JSON_Deleter >
 

Functions

bool env_defined (const std::string &env_var)
 Check if the named environment variable is defined. More...
 
std::string get_env (const std::string &env_var)
 Get the named environment variable for this process. More...
 
void set_env (const std::string &env_var, const std::string &value)
 Set the named environment variable for this process. More...
 
void unset_env (const std::string &env_var)
 Unset the named environment variable for this process. More...
 
std::string sha1_hmac (const std::string &key, const std::string &data)
 Generate the SHA1 HMAC hash for a string. More...
 
std::string ucs2_to_utf8 (const std::wstring &str16)
 Convert a UCS-2 string to a UTF-8 string. More...
 
std::string ucs2_to_utf8 (const wchar_t *begin, const wchar_t *end)
 Convert a UCS-2 string to a UTF-8 string. More...
 
std::wstring utf8_to_ucs2 (const std::string &str8)
 Convert a UTF-8 string to a UCS-2 string. More...
 
int lower_case (const int code)
 Convert the character to lower case. More...
 
int upper_case (const int code)
 Convert the character to upper case. More...
 
std::string lower_case (const std::string &str)
 Convert the string to lower case. More...
 
std::string upper_case (const std::string &str)
 Convert the string to upper case. More...
 
std::string lstrip (const std::string &str)
 Strip leading white space characters. More...
 
std::string rstrip (const std::string &str)
 Strip trailing white space characters. More...
 
std::string strip (const std::string &str)
 Strip leading and trailing white space characters. More...
 
std::string get_date_rfc2616_gmt ()
 

Detailed Description

The top level namespace.

All BuildCache functionality lives in the bcache namespace or one of its decendant namespaces.

Function Documentation

◆ env_defined()

bool bcache::env_defined ( const std::string &  env_var)

Check if the named environment variable is defined.

Parameters
env_varName of the environment variable.
Returns
true if the environment variable was defined, otherwise false.

◆ get_env()

std::string bcache::get_env ( const std::string &  env_var)

Get the named environment variable for this process.

Parameters
env_varName of the environment variable.
Returns
the value as a string, or an empty string if the environment variable was not defined.
Note
Use env_defined to check if an environment variable is defined.

◆ lower_case() [1/2]

int bcache::lower_case ( const int  code)

Convert the character to lower case.

Parameters
codeThe character to convert.
Returns
a lower case version of the input character.
Note
This function currently only works on the ASCII subset of Unicode.

◆ lower_case() [2/2]

std::string bcache::lower_case ( const std::string &  str)

Convert the string to lower case.

Parameters
strThe string to convert.
Returns
a lower case version of the input string.
Note
This function currently only works on the ASCII subset of Unicode.

◆ lstrip()

std::string bcache::lstrip ( const std::string &  str)

Strip leading white space characters.

Parameters
strThe string to strip.
Returns
a string without leading white space characters.

◆ rstrip()

std::string bcache::rstrip ( const std::string &  str)

Strip trailing white space characters.

Parameters
strThe string to strip.
Returns
a string without trailing white space characters.

◆ set_env()

void bcache::set_env ( const std::string &  env_var,
const std::string &  value 
)

Set the named environment variable for this process.

Parameters
env_varName of the environment variable.
valueValue of the environment variable.

◆ sha1_hmac()

std::string bcache::sha1_hmac ( const std::string &  key,
const std::string &  data 
)

Generate the SHA1 HMAC hash for a string.

Parameters
keyThe secret key.
dataThe data to hash.
Returns
the digest as a binary string (20 bytes long).

◆ strip()

std::string bcache::strip ( const std::string &  str)

Strip leading and trailing white space characters.

Parameters
strThe string to strip.
Returns
a string without leading or trailing white space characters.

◆ ucs2_to_utf8() [1/2]

std::string bcache::ucs2_to_utf8 ( const std::wstring &  str16)

Convert a UCS-2 string to a UTF-8 string.

Parameters
str16The UCS-2 encoded wide character string.
Returns
a UTF-8 encoded string.

◆ ucs2_to_utf8() [2/2]

std::string bcache::ucs2_to_utf8 ( const wchar_t *  begin,
const wchar_t *  end 
)

Convert a UCS-2 string to a UTF-8 string.

Parameters
beginThe begin of the UCS-2 encoded wide character string.
endThe end of the UCS-2 encoded wide character string.
Returns
a UTF-8 encoded string.

◆ unset_env()

void bcache::unset_env ( const std::string &  env_var)

Unset the named environment variable for this process.

Parameters
env_varName of the environment variable.

◆ upper_case() [1/2]

int bcache::upper_case ( const int  code)

Convert the character to upper case.

Parameters
codeThe character to convert.
Returns
an upper case version of the input character.
Note
This function currently only works on the ASCII subset of Unicode.

◆ upper_case() [2/2]

std::string bcache::upper_case ( const std::string &  str)

Convert the string to upper case.

Parameters
strThe string to convert.
Returns
an upper case version of the input string.
Note
This function currently only works on the ASCII subset of Unicode.

◆ utf8_to_ucs2()

std::wstring bcache::utf8_to_ucs2 ( const std::string &  str8)

Convert a UTF-8 string to a UCS-2 string.

Parameters
str8The UTF-8 encoded string.
Returns
a UCS-2 encoded wide charater string.