mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
Major refactor and API changes
- Updated `.gitignore` file - Updated `CMakeLists.txt` to build static exectuable - Changed some `Doxyfile` configurations to build more robust and complete documentation (WIP) - Changed how `remote` works to better reflect `git`'s API (WIP) - Changed how error handling works - Improved `bin/compile.sh` script - Improved `bin/lines.sh` script (kinda) - Removed some instances of `fmt` in favor of `std` string functions - Restructed style for better readibility
This commit is contained in:
parent
ba23299777
commit
5a73651ad1
29 changed files with 1836 additions and 1140 deletions
|
|
@ -1,6 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <tuple>
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
|
||||
namespace gdpm{
|
||||
class error;
|
||||
|
||||
/*
|
||||
Base class to prevent derived class from creating copies.
|
||||
*/
|
||||
|
|
@ -20,4 +28,20 @@ namespace gdpm{
|
|||
non_movable(const non_movable&) = delete;
|
||||
non_movable(non_movable&&) = delete;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
concept error_t = requires{ std::is_same<error, T>::value; };
|
||||
|
||||
using string = std::string;
|
||||
using string_list = std::vector<string>;
|
||||
using string_map = std::unordered_map<string, string>;
|
||||
using string_pair = std::pair<string, string>;
|
||||
using var = std::variant<int, bool, float, std::string>;
|
||||
template <typename T = var>
|
||||
using _args_t = std::vector<T>;
|
||||
using args_t = _args_t<string>;
|
||||
template <typename Key = std::string, class Value = _args_t<var>>
|
||||
using _opts_t = std::unordered_map<Key, Value>;
|
||||
using opts_t = _opts_t<string, string_list>;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue