1#ifndef UZUKI2_DUMMY_HPP
2#define UZUKI2_DUMMY_HPP
23class DummyIntegerVector final :
public IntegerVector {
25 DummyIntegerVector(std::size_t l,
bool,
bool) : my_length(l) {}
26 std::size_t size()
const {
return my_length; }
27 void set(std::size_t, std::int32_t) {}
28 void set_missing(std::size_t) {}
29 void set_name(std::size_t, std::string) {}
31 std::size_t my_length;
34class DummyNumberVector final :
public NumberVector {
36 DummyNumberVector(std::size_t l,
bool,
bool) : my_length(l) {}
37 std::size_t size()
const {
return my_length; }
38 void set(std::size_t,
double) {}
39 void set_missing(std::size_t) {}
40 void set_name(std::size_t, std::string) {}
42 std::size_t my_length;
45class DummyStringVector final :
public StringVector {
47 DummyStringVector(std::size_t l,
bool,
bool, StringVector::Format) : my_length(l) {}
48 std::size_t size()
const {
return my_length; }
49 void set(std::size_t, std::string) {}
50 void set_missing(std::size_t) {}
51 void set_name(std::size_t, std::string) {}
53 std::size_t my_length;
56class DummyBooleanVector final :
public BooleanVector {
58 DummyBooleanVector(std::size_t l,
bool,
bool) : my_length(l) {}
59 std::size_t size()
const {
return my_length; }
60 void set(std::size_t,
bool) {}
61 void set_missing(std::size_t) {}
62 void set_name(std::size_t, std::string) {}
64 std::size_t my_length;
67class DummyFactor final :
public Factor {
69 DummyFactor(std::size_t l,
bool,
bool, std::size_t,
bool) : my_length(l) {}
70 std::size_t size()
const {
return my_length; }
71 void set(std::size_t, std::size_t) {}
72 void set_missing(std::size_t) {}
73 void set_name(std::size_t, std::string) {}
74 void set_level(std::size_t, std::string) {}
76 std::size_t my_length;
81class DummyNothing final :
public Nothing {};
83class DummyExternal final :
public External {};
85class DummyList final :
public List {
87 DummyList(std::size_t n,
bool) : my_length(n) {}
88 std::size_t size()
const {
return my_length; }
89 void set(std::size_t, std::shared_ptr<Base>) {}
90 void set_name(std::size_t, std::string) {}
92 std::size_t my_length;
97struct DummyProvisioner {
98 static Nothing* new_Nothing() {
return (
new DummyNothing); }
100 static External* new_External(
void*) {
return (
new DummyExternal); }
102 template<
class ... Args_>
103 static List* new_List(Args_&& ... args) {
return (
new DummyList(std::forward<Args_>(args)...)); }
105 template<
class ... Args_>
106 static IntegerVector* new_Integer(Args_&& ... args) {
return (
new DummyIntegerVector(std::forward<Args_>(args)...)); }
108 template<
class ... Args_>
109 static NumberVector* new_Number(Args_&& ... args) {
return (
new DummyNumberVector(std::forward<Args_>(args)...)); }
111 template<
class ... Args_>
112 static StringVector* new_String(Args_&& ... args) {
return (
new DummyStringVector(std::forward<Args_>(args)...)); }
114 template<
class ... Args_>
115 static BooleanVector* new_Boolean(Args_&& ... args) {
return (
new DummyBooleanVector(std::forward<Args_>(args)...)); }
117 template<
class ... Args_>
118 static Factor* new_Factor(Args_&& ... args) {
return (
new DummyFactor(std::forward<Args_>(args)...)); }
136 std::size_t my_number;
144 void* get(std::size_t)
const {
148 std::size_t size()
const {
Dummy class satisfying the Externals_ interface of hdf5::parse().
Definition Dummy.hpp:131
Defines the interfaces to use in HDF5 parsing.
Parse an R list from a HDF5 or JSON file.
Definition parse_json.hpp:31