Feature--PDI--Add_C++_classes_and_manage_access_right
This branch removes some of PDI limitations:
- PDI_data_t are replaced with PDI::Data_ref, PDI::Data_descriptor and PDI::data_content
- Introduce C++11 into PDI
1- New classes
PDI_::Data_content
: This class is used to handle a buffer that contain a dataset.
PDI::Data_ref
: Reference to a given content (a Data_ref should be used to access a content).
An access control policy is handle by references that, for instance, prevent multiple write access on the same data.
PDI::Data_descriptor
: Descriptors contain all the dataset properties. Data/metadata properties that are declared in the PDI configuration file are parsed and store into PDI::Data_descriptor
.
To give an example, when the application code use PDI_share
to expose a data, a new Data_content
that encapsulates the data buffer is produced. Then, new Data_references
are sequentially generated to share the Data_content
with each plug-ins. Each reference can asked for an additional access right which is granted only if it's available. Once a plug-in has received its reference, it can access to the corresponding content until the reference is destroyed.
As soon as a reference is destroyed the corresponding right on the content are revoked.
2- C++11, improvement
The PDI_state was containing C arrays. Those arrays have been replaced with C++ container.