change dir name

This commit is contained in:
chatlanin
2023-05-23 12:13:38 +03:00
parent b0ea45e84d
commit d691c0e655
29 changed files with 60 additions and 78 deletions

View File

@@ -4,11 +4,11 @@
#include "boost/type_index.hpp"
#include "view/color.hpp"
#include "concepts/concepts.hpp"
#include "iterators/sequence_ostream_iterator.hpp"
#include "iterators/associative_ostream_iterator.hpp"
#include "math/matrix.hpp"
#include "hack/view/color.hpp"
#include "hack/concepts/concepts.hpp"
#include "hack/iterators/sequence_ostream_iterator.hpp"
#include "hack/iterators/associative_ostream_iterator.hpp"
#include "hack/math/matrix.hpp"
// #include "nlohmann/json.hpp"
namespace hack
@@ -25,7 +25,11 @@ namespace hack
class log
{
public:
log(std::string devider_ = ", ", std::experimental::source_location location_ = std::experimental::source_location::current());
log(std::string devider_ = ", ", std::experimental::source_location location_ = std::experimental::source_location::current()) : location { location_ }
{
this->devider = devider_;
}
log(log&) = delete;
log(log&&) = delete;
@@ -48,11 +52,11 @@ namespace hack
private:
std::experimental::source_location location;
static int count;
static std::string devider;
inline static int count = 0;
inline static std::string devider = " ";
private:
static void print();
static void print() { std::cout << std::endl; }
static std::ostream& make_type_view(std::ostream &os)
{
@@ -136,7 +140,11 @@ namespace hack
class warn : public log
{
public:
warn(std::string devider_ = ", ", std::experimental::source_location location_ = std::experimental::source_location::current());
warn(std::string devider_ = ", ", std::experimental::source_location location_ = std::experimental::source_location::current()) : location { location_ }
{
this->devider = devider_;
}
warn(warn&) = delete;
warn(warn&&) = delete;
@@ -163,7 +171,10 @@ namespace hack
class error : public log
{
public:
error(std::string devider_ = ", ", std::experimental::source_location location_ = std::experimental::source_location::current());
error(std::string devider_ = ", ", std::experimental::source_location location_ = std::experimental::source_location::current()) : location { location_ }
{
this->devider = devider_;
}
error(error&) = delete;
error(error&&) = delete;

View File

@@ -2,8 +2,8 @@
#include <regex>
#include "string/string_concat_helper.hpp"
#include "concepts/concepts.hpp"
#include "hack/string/string_concat_helper.hpp"
#include "hack/concepts/concepts.hpp"
#include "nlohmann/json.hpp"
namespace hack::utils

View File

@@ -62,6 +62,12 @@ namespace hack::utils
return result;
}
template<typename T, T value = 0>
struct counter
{
inline static T id = value;
};
// this function can will use
// as switch wiht string
// switch(case_int("key"))

View File

@@ -1,24 +0,0 @@
#include "logger.hpp"
namespace hack
{
std::string log::devider = " ";
int log::count = 0;
log::log(std::string devider_, std::experimental::source_location location_) : location { location_ }
{
this->devider = devider_;
}
warn::warn(std::string devider_, std::experimental::source_location location_) : location { location_ }
{
this->devider = devider_;
}
error::error(std::string devider_, std::experimental::source_location location_) : location { location_ }
{
this->devider = devider_;
}
void log::print() { std::cout << std::endl; }
}

View File

@@ -1,13 +0,0 @@
headers = ['logger.hpp']
sources = ['logger.cpp']
lib = library(
'logger',
include_directories : inc,
sources: [headers, sources]
)
logger_dep = declare_dependency(
include_directories: inc,
link_with: lib
)

View File

@@ -1,6 +1 @@
inc += include_directories('.')
subdir('logger')
deps += logger_dep