CBuild
C++ build system with scripts written in c++
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
hash.cpp File Reference
#include "fstream"
#include "iostream"
#include "regex"
#include "sstream"
#include "string"
#include "vector"
#include "../../headers/CBuild_defs.hpp"
#include "../../headers/build_data.hpp"
#include "../../headers/filesystem++.hpp"
#include "../../headers/hash.hpp"
#include "../../headers/map.hpp"
#include "../../headers/optional.hpp"
#include "../../headers/print.hpp"

Go to the source code of this file.

Classes

class  CBuild::types::file
 File structure. More...
 
class  CBuild::types::file_content
 Temporary struct for file content. More...
 

Namespaces

namespace  CBuild
 Filebuffer for CBuild ecosystem.
 
namespace  CBuild::consts
 Constants.
 
namespace  CBuild::types
 
namespace  CBuild::vars
 

Functions

std::regex CBuild::consts::cxx_line_comment ("//.*")
 Regex for stripping c++ line comments from file.
 
std::regex CBuild::consts::c_multiline_comment ("/\\*([\\s\\S]*?)\\*/")
 Regex for stripping c multiline comments from file comtent.
 
std::regex CBuild::consts::doxygen_comment ("/\\*\\*([\\s\\S]*?)\\*/")
 Regex for stripping doxygen comments from file comtent.
 
std::regex CBuild::consts::include_parser ("#include\\s+[\"<]([^\">]+)[\">]")
 Get include directives from file and parse file name in it.
 
std::regex CBuild::consts::check_type ("\\.(cpp|cxx|cc|c)")
 For checking for source file.
 
CBuild::types::file_content CBuild::get_file_data (std::string path, std::string included_from="")
 Get content of file.
 
uint64_t CBuild::hash (std::string str)
 FNV-1a hashing function for std::string.
 
void CBuild::procces_files (std::vector< std::string > files, std::vector< std::string > objects, std::string toolchain_id)
 Procces file data.
 
void CBuild::store_hash (std::string toolchain_id)
 Store new hashes to file.
 
void CBuild::load_hash (std::string toolchain_id)
 Load old hashes.
 

Variables

std::vector< CBuild::types::fileCBuild::vars::filelist
 
lib::map< std::string, uint64_t > CBuild::vars::headers
 
lib::map< std::string, uint64_t > CBuild::vars::old_hashes