add try_engine

This commit is contained in:
chatlanin
2023-03-02 15:25:58 +03:00
parent 5a829fad05
commit f81f4e5e78
54 changed files with 129 additions and 1905 deletions

View File

@@ -0,0 +1,39 @@
#include "file.hpp"
namespace rrr
{
file::file(std::filesystem::path path_, file_type type_, bool is_link_) : id { ++hack::utils::counter<int>::id }, path { path_ }, type { type_ }, is_link { is_link_ } {}
file::file(file&& f) : id { ++hack::utils::counter<int>::id }, path { std::move(f.path) }, type { std::move(f.type) }, is_link { std::move(f.is_link) }, is_mark { std::move(f.is_mark) } {}
file::file(const file& f) : id { ++hack::utils::counter<int>::id }, path { f.path }, type { f.type }, is_link { f.is_link }, is_mark { f.is_mark } {}
file& file::operator=(const file& other)
{
if (this == &other) return *this;
path = other.path;
type = other.type;
is_link = other.is_link;
is_mark = other.is_mark;
id = ++hack::utils::counter<int>::id ;
return *this;
}
bool file::operator<(const file& other) const
{
return path.string().compare(other.path.string()) < 0;
}
bool file::operator==(const file& f) const
{
if (this->path == f.path)
return true;
return false;
};
std::ostream& operator<<(std::ostream& os, const file& f)
{
return os << f.path << std::endl;
}
}