mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Implement bespoke branch policies
Consolidate branch policy selection behind the BranchPolicy interfaces and update filesystem operations to use the bespoke policy implementations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
42ab831d97
commit
96d8232853
451 changed files with 18495 additions and 7562 deletions
24
src/func_getattr_factory.cpp
Normal file
24
src/func_getattr_factory.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "func_getattr_factory.hpp"
|
||||
|
||||
#include "func_getattr_cdfo.hpp"
|
||||
#include "func_getattr_cdco.hpp"
|
||||
#include "func_getattr_ff.hpp"
|
||||
#include "func_getattr_newest.hpp"
|
||||
|
||||
|
||||
bool
|
||||
Func2::GetAttrFactory::valid(const std::string str_)
|
||||
{
|
||||
return (bool)make(str_);
|
||||
}
|
||||
|
||||
std::shared_ptr<Func2::GetAttrBase>
|
||||
Func2::GetAttrFactory::make(const std::string_view str_)
|
||||
{
|
||||
if(str_ == "cdfo") return std::make_shared<Func2::GetAttrCDFO>();
|
||||
if(str_ == "cdco") return std::make_shared<Func2::GetAttrCDCO>();
|
||||
if(str_ == "ff") return std::make_shared<Func2::GetAttrFF>();
|
||||
if(str_ == "newest") return std::make_shared<Func2::GetAttrNewest>();
|
||||
|
||||
return {};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue