Classes | |
class | Array_datatype |
an Array_datatype is a Datatype that represents an array: i.e storage of multiple elements of the same type continuously in memory. More... | |
class | Callbacks |
class | Config_error |
class | Context |
class | Context_proxy |
class | Data_descriptor |
class | Datatype |
A Datatype is a Datatype_template that accepts no argument. More... | |
class | Datatype_template |
class | Error |
class | Expression |
class | Impl_error |
class | Logger |
Wrapper for spdlog::logger with additional pattern getter method. More... | |
struct | Paraconf_wrapper |
Automatically installs a paraconf error-handler that ignores errors and uninstalls it on destruction. More... | |
class | Plugin |
The class PDI plugins should implement. More... | |
class | Plugin_error |
class | Pointer_datatype |
class | Record_datatype |
A Record_datatype is a Datatype that represents a fixed number of elements of potentially different types layed out in a specific way in memory. More... | |
class | Ref_any |
A dynamically typed reference to data with automatic memory management and read/write locking semantic. More... | |
class | Reference_base |
A common base for all references, whatever their access privileges. More... | |
class | Right_error |
class | Scalar_datatype |
class | State_error |
class | System_error |
class | Tuple_datatype |
A Tuple_datatype is a Datatype that represents a fixed number of elements of potentially different types layed out in a specific way in memory. More... | |
class | Type_error |
class | Unavailable_error |
class | Value_error |
Typedefs | |
using | Attributes_map = std::unordered_map< std::string, Expression > |
using | Datatype_template_ptr = std::shared_ptr< const Datatype_template > |
using | Datatype_template_sptr = std::shared_ptr< const Datatype_template > |
using | Datatype_sptr = std::shared_ptr< const Datatype > |
typedef Ref_any< false, false > | Ref |
typedef Ref_any< true, false > | Ref_r |
typedef Ref_any< false, true > | Ref_w |
typedef Ref_any< true, true > | Ref_rw |
Enumerations | |
enum class | Scalar_kind : uint8_t { UNKNOWN , SIGNED , UNSIGNED , FLOAT } |
Different possible interpretations for a scalar. More... | |
Functions | |
int | len (PC_tree_t tree) |
Returns the length of a node. | |
int | len (PC_tree_t tree, int dflt) |
Returns the length of a node. | |
long | to_long (PC_tree_t tree) |
Returns the int value of a scalar node. | |
long | to_long (PC_tree_t tree, long dflt) |
Returns the int value of a scalar node. | |
double | to_double (PC_tree_t tree) |
Returns the floating point value of a scalar node. | |
double | to_double (PC_tree_t tree, double dflt) |
Returns the floating point value of a scalar node. | |
std::string | to_string (PC_tree_t tree) |
Returns the string content of a scalar node. | |
std::string | to_string (PC_tree_t tree, const std::string &dflt) |
Returns the string content of a scalar node. | |
bool | to_bool (PC_tree_t tree) |
Returns the boolean value of a scalar node. | |
bool | to_bool (PC_tree_t tree, bool dflt) |
Returns the boolean value of a scalar node. | |
bool | is_list (PC_tree_t tree) |
Checks if the tree is a list. | |
bool | is_map (PC_tree_t tree) |
Checks if the tree is a map. | |
bool | is_scalar (PC_tree_t tree) |
Checks if the tree is a scalar. | |
void | each (PC_tree_t tree, std::function< void(PC_tree_t)> operation) |
Iterates and apply the provided function to all elements of a PC list. | |
void | opt_each (PC_tree_t tree, std::function< void(PC_tree_t)> operation) |
Iterates and apply the provided function to all elements of a PC list or directly to the provided element if it is not a list. | |
void | each (PC_tree_t tree, std::function< void(PC_tree_t, PC_tree_t)> operation) |
Iterates and apply the provided function to all elements of a PC mapping. | |
void | each_in_omap (PC_tree_t tree, std::function< void(PC_tree_t, PC_tree_t)> operation) |
Iterates and apply the provided function to all elements of a PC ordered mapping. | |
unsigned long | plugin_api_version (unsigned long expected_version=0) |
Checks compatibility with a plugin API. | |
Variables | |
const auto | UNDEF_TYPE = Scalar_datatype::make(Scalar_kind::UNKNOWN, 0) |
using PDI::Attributes_map = typedef std::unordered_map<std::string, Expression> |
using PDI::Datatype_template_ptr = typedef std::shared_ptr<const Datatype_template> |
using PDI::Datatype_template_sptr = typedef std::shared_ptr<const Datatype_template> |
using PDI::Datatype_sptr = typedef std::shared_ptr<const Datatype> |
typedef Ref_any<true, false> PDI::Ref_r |
typedef Ref_any<false, true> PDI::Ref_w |
typedef Ref_any<true, true> PDI::Ref_rw |
|
strong |
int PDI::len | ( | PC_tree_t | tree | ) |
Returns the length of a node.
throws an Error if the provided tree is in error
[in] | tree | the sequence or mapping |
int PDI::len | ( | PC_tree_t | tree, |
int | dflt | ||
) |
Returns the length of a node.
returns the default value in case of error
[in] | tree | the sequence or mapping |
[in] | dflt | the default value in case of error |
long PDI::to_long | ( | PC_tree_t | tree | ) |
Returns the int value of a scalar node.
throws an Error if the provided tree is in error
[in] | tree | the int-valued node |
long PDI::to_long | ( | PC_tree_t | tree, |
long | dflt | ||
) |
Returns the int value of a scalar node.
returns the default value in case of error
[in] | tree | the int-valued node |
[in] | dflt | the default value in case of error |
double PDI::to_double | ( | PC_tree_t | tree | ) |
Returns the floating point value of a scalar node.
throws an Error if the provided tree is in error
[in] | tree | the floating-point-valued node |
double PDI::to_double | ( | PC_tree_t | tree, |
double | dflt | ||
) |
Returns the floating point value of a scalar node.
returns the default value in case of error
[in] | tree | the floating-point-valued node |
[in] | dflt | the default value in case of error |
std::string PDI::to_string | ( | PC_tree_t | tree | ) |
Returns the string content of a scalar node.
throws an Error if the provided tree is in error
[in] | tree | the node |
std::string PDI::to_string | ( | PC_tree_t | tree, |
const std::string & | dflt | ||
) |
Returns the string content of a scalar node.
returns the default value in case of error
[in] | tree | the node |
[in] | dflt | the default value in case of error |
bool PDI::to_bool | ( | PC_tree_t | tree | ) |
Returns the boolean value of a scalar node.
throws an Error if the provided tree is in error
[in] | tree | the node |
bool PDI::to_bool | ( | PC_tree_t | tree, |
bool | dflt | ||
) |
Returns the boolean value of a scalar node.
returns the default value in case of error
[in] | tree | the node |
[in] | dflt | the default value in case of error |
bool PDI::is_list | ( | PC_tree_t | tree | ) |
Checks if the tree is a list.
[in] | tree | the node |
bool PDI::is_map | ( | PC_tree_t | tree | ) |
Checks if the tree is a map.
[in] | tree | the node |
bool PDI::is_scalar | ( | PC_tree_t | tree | ) |
Checks if the tree is a scalar.
[in] | tree | the node |
void PDI::each | ( | PC_tree_t | tree, |
std::function< void(PC_tree_t)> | operation | ||
) |
Iterates and apply the provided function to all elements of a PC list.
tree | the tree containing the list |
operation | the operation to apply to each element of the tree |
void PDI::opt_each | ( | PC_tree_t | tree, |
std::function< void(PC_tree_t)> | operation | ||
) |
Iterates and apply the provided function to all elements of a PC list or directly to the provided element if it is not a list.
tree | the tree containing the list or the single element |
operation | the operation to apply to the elements |
void PDI::each | ( | PC_tree_t | tree, |
std::function< void(PC_tree_t, PC_tree_t)> | operation | ||
) |
Iterates and apply the provided function to all elements of a PC mapping.
tree | the tree containing the mapping |
operation | the operation to apply to each element of the tree |
void PDI::each_in_omap | ( | PC_tree_t | tree, |
std::function< void(PC_tree_t, PC_tree_t)> | operation | ||
) |
Iterates and apply the provided function to all elements of a PC ordered mapping.
tree | the tree containing the ordered mapping |
operation | the operation to apply to each element of the tree |
unsigned long PDI::plugin_api_version | ( | unsigned long | expected_version = 0 | ) |
Checks compatibility with a plugin API.
expected_version | the expected version of the API or 0 for no check |
PDI::Error | if the provided version is incompatible with the expected one |
const auto PDI::UNDEF_TYPE = Scalar_datatype::make(Scalar_kind::UNKNOWN, 0) |