25#ifndef PDI_DATA_DESCRIPTOR_H_
26#define PDI_DATA_DESCRIPTOR_H_
32#include <pdi/pdi_fwd.h>
33#include <pdi/datatype_template.h>
34#include <pdi/ref_any.h>
71 virtual const std::string&
name()
const = 0;
88 virtual void share(
void* data,
bool read,
bool write) = 0;
96 virtual void*
share(
Ref ref,
bool read,
bool write) = 0;
Definition: data_descriptor.h:40
virtual bool metadata() const =0
Return true if the data is a metadata.
virtual const std::string & name() const =0
Access the name of the descriptor.
virtual void metadata(bool metadata)=0
Sets whether this describes a metadata or not.
virtual void * reclaim()=0
Reclaims ownership of a data buffer shared with PDI.
virtual void * share(Ref ref, bool read, bool write)=0
Shares some data with PDI.
virtual Ref ref()=0
Return a reference to the value of the data behind this descriptor.
virtual void share(void *data, bool read, bool write)=0
Shares some data with PDI.
virtual void release()=0
Releases ownership of a data shared with PDI.
virtual ~Data_descriptor()
virtual void default_type(Datatype_template_ptr type)=0
Set the datatype template used to type raw pointers shared through this descriptor.
virtual bool empty()=0
Checks whether this descriptor is empty (contains no reference)
virtual Datatype_template_ptr default_type()=0
Access the datatype template used to type raw pointers shared through this descriptor.
A dynamically typed reference to data with automatic memory management and read/write locking semanti...
Definition: ref_any.h:273
Definition: array_datatype.h:38
std::shared_ptr< const Datatype_template > Datatype_template_ptr
Definition: pdi_fwd.h:76