|
|
|
@ -98,15 +98,19 @@ class Adapter
|
|
|
|
|
|
|
|
|
|
void SetTitle(const MString& t) { title = t; } |
|
|
|
|
|
|
|
|
|
void Add2DVariable(const MString& name, std::unique_ptr<VInfoBase>&& vinfo, std::shared_ptr<Projection> proj, decltype(VarInfo().Read2D) func = Def2DReader) |
|
|
|
|
bool Add2DVariable(const MString& name, std::unique_ptr<VInfoBase>&& vinfo, std::shared_ptr<Projection> proj, decltype(VarInfo().Read2D) func = Def2DReader) |
|
|
|
|
{ |
|
|
|
|
if(vars.contains(name)) return false; |
|
|
|
|
vars[name] = {.info = std::move(vinfo), .proj = proj, .Read2D = func, .Read3D = {}}; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Add3DVariable(const MString& name, std::unique_ptr<VInfoBase>&& vinfo, std::shared_ptr<Projection> proj, std::shared_ptr<Vertical> vert, |
|
|
|
|
bool Add3DVariable(const MString& name, std::unique_ptr<VInfoBase>&& vinfo, std::shared_ptr<Projection> proj, std::shared_ptr<Vertical> vert, |
|
|
|
|
decltype(VarInfo().Read3D) func = Def3DReader) |
|
|
|
|
{ |
|
|
|
|
if(vars.contains(name)) return false; |
|
|
|
|
vars[name] = {.info = std::move(vinfo), .proj = proj, .vert = vert, .Read2D = {}, .Read3D = func}; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CleanVariables(const std::set<MString>& keep) |
|
|
|
|