26 #ifndef PDI_DATATYPE_H_ 27 #define PDI_DATATYPE_H_ 34 #include <pdi/pdi_fwd.h> 35 #include <pdi/datatype_template.h> 60 virtual std::pair<void*, Datatype_uptr> access(
const Array_datatype& type,
62 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_begin,
63 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_end)
const;
74 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_begin,
75 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_end)
const;
84 virtual std::pair<void*, Datatype_uptr> access(
const Record_datatype& type,
86 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_begin,
87 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_end)
const;
92 virtual std::string access_kind()
const = 0;
97 virtual std::unique_ptr<Accessor_base> clone()
const = 0;
123 virtual bool operator== (
const Datatype& other)
const = 0;
130 bool operator!=(
const Datatype& other)
const;
142 virtual bool dense()
const = 0;
149 virtual size_t datasize()
const = 0;
156 virtual size_t buffersize()
const = 0;
162 virtual size_t alignment()
const = 0;
169 virtual bool simple()
const = 0;
178 virtual void* data_to_dense_copy(
void* to,
const void* from)
const = 0;
187 virtual void* data_from_dense_copy(
void* to,
const void* from)
const = 0;
196 std::pair<void*, Datatype_uptr> subaccess(
void* from,
const Accessor_base& accessor)
const;
205 std::pair<void*, Datatype_uptr> subaccess(
void* from,
const std::vector<std::unique_ptr<Accessor_base>>& accessors)
const;
215 virtual std::pair<void*, Datatype_uptr> subaccess_by_iterators(
void* from,
216 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_begin,
217 std::vector<std::unique_ptr<Accessor_base>>::const_iterator remaining_end)
const;
224 virtual void destroy_data(
void* ptr)
const = 0;
230 virtual std::string debug_string()
const = 0;
236 #endif // PDI_DATATYPE_H_ A Datatype is a Datatype_template that accepts no argument.
Definition: datatype.h:46
Base class for datatype accesssors, that allow to get pointer to subtype.
Definition: datatype.h:52
an Array_datatype is a Datatype that represents an array: i.e storage of multiple elements of the sam...
Definition: array_datatype.h:43
Definition: pointer_datatype.h:37
std::unique_ptr< Datatype > Datatype_uptr
Definition: pdi_fwd.h:74
A Record_datatype is a Datatype that represents a fixed number of elements of potentially different t...
Definition: record_datatype.h:42
std::unordered_map< std::string, Expression > Attributes_map
Definition: datatype_template.h:40
Definition: datatype_template.h:42
Definition: array_datatype.h:37