PDI 1.7.1

the PDI data interface

PDI::Data_descriptor Class Referenceabstract

Public Member Functions

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 Datatype_template_ptr default_type ()=0
 Access the datatype template used to type raw pointers shared through this descriptor.
 
virtual bool metadata () const =0
 Return true if the data is a metadata.
 
virtual void metadata (bool metadata)=0
 Sets whether this describes a metadata or not.
 
virtual const std::string & name () const =0
 Access the name of the descriptor.
 
virtual Ref ref ()=0
 Return a reference to the value of the data behind this descriptor.
 
virtual bool empty ()=0
 Checks whether this descriptor is empty (contains no reference)
 
virtual void share (void *data, bool read, bool write)=0
 Shares some data with PDI.
 
virtual void * share (Ref ref, bool read, bool write)=0
 Shares some data with PDI.
 
virtual void release ()=0
 Releases ownership of a data shared with PDI.
 
virtual void * reclaim ()=0
 Reclaims ownership of a data buffer shared with PDI.
 

Constructor & Destructor Documentation

◆ ~Data_descriptor()

virtual PDI::Data_descriptor::~Data_descriptor ( )
virtual

Member Function Documentation

◆ default_type() [1/2]

virtual void PDI::Data_descriptor::default_type ( Datatype_template_ptr  type)
pure virtual

Set the datatype template used to type raw pointers shared through this descriptor.

Parameters
typethe datatype template attached to the descriptor

◆ default_type() [2/2]

virtual Datatype_template_ptr PDI::Data_descriptor::default_type ( )
pure virtual

Access the datatype template used to type raw pointers shared through this descriptor.

Returns
the datatype template attached to the descriptor

◆ metadata() [1/2]

virtual bool PDI::Data_descriptor::metadata ( ) const
pure virtual

Return true if the data is a metadata.

◆ metadata() [2/2]

virtual void PDI::Data_descriptor::metadata ( bool  metadata)
pure virtual

Sets whether this describes a metadata or not.

Parameters
metadatawhether data shared through this descriptor should behave as a metadata

◆ name()

virtual const std::string & PDI::Data_descriptor::name ( ) const
pure virtual

Access the name of the descriptor.

◆ ref()

virtual Ref PDI::Data_descriptor::ref ( )
pure virtual

Return a reference to the value of the data behind this descriptor.

◆ empty()

virtual bool PDI::Data_descriptor::empty ( )
pure virtual

Checks whether this descriptor is empty (contains no reference)

Returns
true if empty.

◆ share() [1/2]

virtual void PDI::Data_descriptor::share ( void *  data,
bool  read,
bool  write 
)
pure virtual

Shares some data with PDI.

Parameters
[in,out]datathe shared data
readwhether read access is granted to other references
writewhether write access is granted to other references

◆ share() [2/2]

virtual void * PDI::Data_descriptor::share ( Ref  ref,
bool  read,
bool  write 
)
pure virtual

Shares some data with PDI.

Parameters
[in,out]refa reference to the shared data
readwhether the stored reference should have read access
writewhether the stored reference should have write access
Returns
the just shared buffer

◆ release()

virtual void PDI::Data_descriptor::release ( )
pure virtual

Releases ownership of a data shared with PDI.

PDI is then responsible to free the associated memory whenever necessary.

◆ reclaim()

virtual void * PDI::Data_descriptor::reclaim ( )
pure virtual

Reclaims ownership of a data buffer shared with PDI.

PDI does not manage the buffer memory anymore.

Returns
the address of the buffer

The documentation for this class was generated from the following file: