Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
FileWriter.h
Go to the documentation of this file.
1#ifndef FILE_WRITER_H
2#define FILE_WRITER_H
3
4#include <memory>
5#include <string>
6#include <vector>
7
8#include "BlockAccessor.h"
9#include "IDataWriter.h"
10#include "ParamID.h"
11
26class FileWriter : public IDataWriter<const std::string&, std::shared_ptr<BlockAccessor>> {
27public:
38 void write(const std::string& dest, std::shared_ptr<BlockAccessor> src = nullptr) override;
39
49 void write_blocks(const std::string& dest,
50 const std::vector<BlockName>& block_names,
51 std::shared_ptr<BlockAccessor> src = nullptr);
52
66 void write_parameters(const std::string& dest,
67 const std::vector<ParamId>& parameter_ids,
68 std::shared_ptr<BlockAccessor> src = nullptr);
69
70private:
71 static std::shared_ptr<BlockAccessor> resolve_source(std::shared_ptr<BlockAccessor> src);
72 static void write_accessor(const std::string& dest, const std::shared_ptr<BlockAccessor>& src);
73};
74
75#endif // FILE_WRITER_H
Alias-aware façade for accessing and manipulating multiple parameter blocks.
Defines a generic interface for data writing operations.
void write_blocks(const std::string &dest, const std::vector< BlockName > &block_names, std::shared_ptr< BlockAccessor > src=nullptr)
Export only the requested blocks.
void write_parameters(const std::string &dest, const std::vector< ParamId > &parameter_ids, std::shared_ptr< BlockAccessor > src=nullptr)
Export only the requested block/id parameters.
void write(const std::string &dest, std::shared_ptr< BlockAccessor > src=nullptr) override
Export all blocks from an accessor or from the current database.
Abstract interface for writing data into an object.
Definition IDataWriter.h:54