1#ifndef UZUKI2_DUMMY_HPP
2#define UZUKI2_DUMMY_HPP
22class DummyIntegerVector final :
public IntegerVector {
24 DummyIntegerVector(
size_t l,
bool,
bool) : my_length(l) {}
25 size_t size()
const {
return my_length; }
26 void set(
size_t, int32_t) {}
27 void set_missing(
size_t) {}
28 void set_name(
size_t, std::string) {}
33class DummyNumberVector final :
public NumberVector {
35 DummyNumberVector(
size_t l,
bool,
bool) : my_length(l) {}
36 size_t size()
const {
return my_length; }
37 void set(
size_t,
double) {}
38 void set_missing(
size_t) {}
39 void set_name(
size_t, std::string) {}
44class DummyStringVector final :
public StringVector {
46 DummyStringVector(
size_t l,
bool,
bool, StringVector::Format) : my_length(l) {}
47 size_t size()
const {
return my_length; }
48 void set(
size_t, std::string) {}
49 void set_missing(
size_t) {}
50 void set_name(
size_t, std::string) {}
55class DummyBooleanVector final :
public BooleanVector {
57 DummyBooleanVector(
size_t l,
bool,
bool) : my_length(l) {}
58 size_t size()
const {
return my_length; }
59 void set(
size_t,
bool) {}
60 void set_missing(
size_t) {}
61 void set_name(
size_t, std::string) {}
66class DummyFactor final :
public Factor {
68 DummyFactor(
size_t l,
bool,
bool,
size_t,
bool) : my_length(l) {}
69 size_t size()
const {
return my_length; }
70 void set(
size_t,
size_t) {}
71 void set_missing(
size_t) {}
72 void set_name(
size_t, std::string) {}
73 void set_level(
size_t, std::string) {}
80class DummyNothing final :
public Nothing {};
82class DummyExternal final :
public External {};
84class DummyList final :
public List {
86 DummyList(
size_t n,
bool) : my_length(n) {}
87 size_t size()
const {
return my_length; }
88 void set(
size_t, std::shared_ptr<Base>) {}
89 void set_name(
size_t, std::string) {}
96struct DummyProvisioner {
97 static Nothing* new_Nothing() {
return (
new DummyNothing); }
99 static External* new_External(
void*) {
return (
new DummyExternal); }
101 template<
class ... Args_>
102 static List* new_List(Args_&& ... args) {
return (
new DummyList(std::forward<Args_>(args)...)); }
104 template<
class ... Args_>
105 static IntegerVector* new_Integer(Args_&& ... args) {
return (
new DummyIntegerVector(std::forward<Args_>(args)...)); }
107 template<
class ... Args_>
108 static NumberVector* new_Number(Args_&& ... args) {
return (
new DummyNumberVector(std::forward<Args_>(args)...)); }
110 template<
class ... Args_>
111 static StringVector* new_String(Args_&& ... args) {
return (
new DummyStringVector(std::forward<Args_>(args)...)); }
113 template<
class ... Args_>
114 static BooleanVector* new_Boolean(Args_&& ... args) {
return (
new DummyBooleanVector(std::forward<Args_>(args)...)); }
116 template<
class ... Args_>
117 static Factor* new_Factor(Args_&& ... args) {
return (
new DummyFactor(std::forward<Args_>(args)...)); }
143 void* get(
size_t)
const {
147 size_t size()
const {
Dummy class satisfying the Externals_ interface of hdf5::parse().
Definition Dummy.hpp:130
Defines the interfaces to use in HDF5 parsing.
Parse an R list from a HDF5 or JSON file.
Definition parse_json.hpp:28