class PDI::Data_descriptor

Content

Member Functions

void default_type ( Datatype_template_uptr type )
Set the datatype template used to type raw pointers shared through this descriptor.
Datatype_template_uptr default_type ( )
Access the datatype template used to type raw pointers shared through this descriptor.
bool empty ( )
Checks whether this descriptor is empty (contains no reference)
bool metadata ( )
Return true if the data is a metadata.
void metadata ( bool metadata )
Sets whether this describes a metadata or not.
const std::string & name ( )
Access the name of the descriptor.
void * reclaim ( )
Reclaims ownership of a data buffer shared with PDI.
Ref ref ( )
Return a reference to the value of the data behind this descriptor.
void release ( )
Releases ownership of a data shared with PDI.
void share ( void * data, bool read, bool write )
Shares some data with PDI.
void * share ( bool read, Ref ref, bool write )
Shares some data with PDI.
~Data_descriptor ( )

Documentation

Member Functions

void default_type ( Datatype_template_uptr type )

Description

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

Parameters

type
the datatype template attached to the descriptor

Datatype_template_uptr default_type ( )

Description

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

Result

the datatype template attached to the descriptor

bool empty ( )

Description

Checks whether this descriptor is empty (contains no reference)

Result

true if empty.

bool metadata ( )

Description

Return true if the data is a metadata.

void metadata ( bool metadata )

Description

Sets whether this describes a metadata or not.

Parameters

metadata
whether data shared through this descriptor should behave as a metadata

const std::string & name ( )

Description

Access the name of the descriptor.

void * reclaim ( )

Description

Reclaims ownership of a data buffer shared with PDI.

Result

the address of the buffer

Ref ref ( )

Description

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

void release ( )

Description

Releases ownership of a data shared with PDI. PDI is then responsible to free the associated memory whenever necessary.

void share ( void * data, bool read, bool write )

Description

Shares some data with PDI.

Parameters

data
the shared data
read
whether read access is granted to other references
write
whether write access is granted to other references

void * share ( bool read, Ref ref, bool write )

Description

Shares some data with PDI.

Parameters

read
whether the stored reference should have read access
ref
a reference to the shared data
write
whether the stored reference should have write access

Result

the just shared buffer

~Data_descriptor ( )


Last modified January 1, 0001