1#ifndef UZUKI2_INTERFACES_HPP
2#define UZUKI2_INTERFACES_HPP
45 return (t >= 0 && t < LIST);
60 Base& operator=(
const Base&) =
default;
61 virtual ~Base() =
default;
80 virtual std::size_t
size ()
const = 0;
89 virtual void set_name(std::size_t i, std::string n) = 0;
114 virtual void set(std::size_t i, std::int32_t v) = 0;
132 virtual void set(std::size_t i,
double v) = 0;
150 virtual void set(std::size_t i, std::string v) = 0;
181 virtual void set(std::size_t i,
bool v) = 0;
202 virtual void set(std::size_t i, std::size_t v) = 0;
210 virtual void set_level(std::size_t il, std::string vl) = 0;
247 virtual std::size_t
size()
const = 0;
255 virtual void set(std::size_t i, std::shared_ptr<Base> v) = 0;
264 virtual void set_name(std::size_t i, std::string n) = 0;
Base interface for all R objects.
Definition interfaces.hpp:51
virtual Type type() const =0
Interface for a boolean vector.
Definition interfaces.hpp:169
Type type() const
Definition interfaces.hpp:171
virtual void set(std::size_t i, bool v)=0
Interface for unsupported objects.
Definition interfaces.hpp:228
Type type() const
Definition interfaces.hpp:230
Interface for a factor.
Definition interfaces.hpp:190
Type type() const
Definition interfaces.hpp:192
virtual void set(std::size_t i, std::size_t v)=0
virtual void set_level(std::size_t il, std::string vl)=0
Interface for integer vectors.
Definition interfaces.hpp:102
Type type() const
Definition interfaces.hpp:104
virtual void set(std::size_t i, std::int32_t v)=0
Interface for lists.
Definition interfaces.hpp:238
virtual void set(std::size_t i, std::shared_ptr< Base > v)=0
Type type() const
Definition interfaces.hpp:240
virtual void set_name(std::size_t i, std::string n)=0
virtual std::size_t size() const =0
Representation of R's NULL.
Definition interfaces.hpp:216
Type type() const
Definition interfaces.hpp:218
Interface for a double-precision vector.
Definition interfaces.hpp:120
Type type() const
Definition interfaces.hpp:122
virtual void set(std::size_t i, double v)=0
Interface for a string vector.
Definition interfaces.hpp:138
Format
Definition interfaces.hpp:159
Type type() const
Definition interfaces.hpp:140
virtual void set(std::size_t i, std::string v)=0
Interface for vector-like objects.
Definition interfaces.hpp:75
virtual void set_name(std::size_t i, std::string n)=0
virtual std::size_t size() const =0
virtual void set_missing(std::size_t i)=0
Parse an R list from a HDF5 or JSON file.
Definition parse_json.hpp:31
Type
Definition interfaces.hpp:29
bool is_vector(Type t)
Definition interfaces.hpp:44