namespace PDI reference

Content

Types

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.
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.
class Datatype_template
typedef Datatype_template_uptr
typedef Datatype_uptr
class Error
class Expression
class Impl_error
typedef Logger_sptr
A shared pointer to a logger instance.
struct Paraconf_wrapper
Automatically installs a paraconf error-handler that ignores errors and uninstalls it on destruction.
class Plugin
The class PDI plugins should implement.
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.
typedef Ref
class Ref_any
A dynamically typed reference to data with automatic memory management and read/write locking semantic.
typedef Ref_r
typedef Ref_rw
typedef Ref_w
class Reference_base
A common base for all references, whatever their access privileges.
class Right_error
class Scalar_datatype
enum Scalar_kind
Different possible interpretations for a scalar.
class State_error
class System_error
class Type_error
class Unavailable_error
class Value_error

Variables

UNDEF_TYPE

Functions

Logger_sptr configure_logger ( PC_tree_t config, spdlog::level::level_enum level, const std::string & name )
Reads configuration tree and sets up the logger.
void each ( std::function< void(PC_tree_t)> operation, PC_tree_t tree )
Iterates and apply the provided function to all elements of a PC list.
void each ( std::function< void(PC_tree_t, PC_tree_t)> operation, PC_tree_t tree )
Iterates and apply the provided function to all elements of a PC mapping.
void each_in_omap ( std::function< void(PC_tree_t, PC_tree_t)> operation, PC_tree_t tree )
Iterates and apply the provided function to all elements of a PC ordered mapping.
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.
int len ( PC_tree_t tree )
Returns the length of a node.
int len ( int dflt, PC_tree_t tree )
Returns the length of a node.
void opt_each ( std::function< void(PC_tree_t)> operation, PC_tree_t tree )
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.
unsigned long plugin_api_version ( unsigned long expected_version )
Checks compatibility with a plugin API.
bool to_bool ( PC_tree_t tree )
Returns the boolean value of a scalar node.
bool to_bool ( bool dflt, PC_tree_t tree )
Returns the boolean value of a scalar node.
double to_double ( PC_tree_t tree )
Returns the floating point value of a scalar node.
double to_double ( double dflt, PC_tree_t tree )
Returns the floating point value of a scalar node.
long to_long ( PC_tree_t tree )
Returns the int value of a scalar node.
long to_long ( long dflt, PC_tree_t tree )
Returns the int 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 ( const std::string & dflt, PC_tree_t tree )
Returns the string content of a scalar node.

Documentation

Functions

Logger_sptr configure_logger ( PC_tree_t config, spdlog::level::level_enum level = spdlog::level::info, const std::string & name )

Description

Reads configuration tree and sets up the logger.

Parameters

config
configuration tree from config file
level
default level of the logger
name
name of the module (e.g. global, test, decl_hdf5)

Result

a configured logger

void each ( std::function< void(PC_tree_t)> operation, PC_tree_t tree )

Description

Iterates and apply the provided function to all elements of a PC list.

Parameters

operation
the operation to apply to each element of the tree
tree
the tree containing the list

void each ( std::function< void(PC_tree_t, PC_tree_t)> operation, PC_tree_t tree )

Description

Iterates and apply the provided function to all elements of a PC mapping.

Parameters

operation
the operation to apply to each element of the tree
tree
the tree containing the mapping

void each_in_omap ( std::function< void(PC_tree_t, PC_tree_t)> operation, PC_tree_t tree )

Description

Iterates and apply the provided function to all elements of a PC ordered mapping.

Parameters

operation
the operation to apply to each element of the tree
tree
the tree containing the ordered mapping

bool is_list ( PC_tree_t tree )

Description

Checks if the tree is a list.

Parameters

tree
the node

Result

true if tree is a list, false otherwise

bool is_map ( PC_tree_t tree )

Description

Checks if the tree is a map.

Parameters

tree
the node

Result

true if tree is a map, false otherwise

bool is_scalar ( PC_tree_t tree )

Description

Checks if the tree is a scalar.

Parameters

tree
the node

Result

true if tree is a scalar, false otherwise

int len ( PC_tree_t tree )

Description

Returns the length of a node.
  • for a sequence: the number of nodes,
  • for a mapping: the number of pairs,
  • for a scalar: the string length.

throws an Error if the provided tree is in error

Parameters

tree
the sequence or mapping

Result

the length

int len ( int dflt, PC_tree_t tree )

Description

Returns the length of a node.
  • for a sequence: the number of nodes,
  • for a mapping: the number of pairs,
  • for a scalar: the string length.

returns the default value in case of error

Parameters

dflt
the default value in case of error
tree
the sequence or mapping

Result

the length

void opt_each ( std::function< void(PC_tree_t)> operation, PC_tree_t tree )

Description

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.

Parameters

operation
the operation to apply to the elements
tree
the tree containing the list or the single element

unsigned long plugin_api_version ( unsigned long expected_version = 0 )

Description

Checks compatibility with a plugin API.

Parameters

expected_version
the expected version of the API or 0 for no check

Result

the version of the API provided by PDI

bool to_bool ( PC_tree_t tree )

Description

Returns the boolean value of a scalar node. throws an Error if the provided tree is in error

Parameters

tree
the node

Result

the boolean value of the scalar node

bool to_bool ( bool dflt, PC_tree_t tree )

Description

Returns the boolean value of a scalar node. returns the default value in case of error

Parameters

dflt
the default value in case of error
tree
the node

Result

the boolean value of the scalar node

double to_double ( PC_tree_t tree )

Description

Returns the floating point value of a scalar node. throws an Error if the provided tree is in error

Parameters

tree
the floating-point-valued node

Result

the floating point value of the scalar node

double to_double ( double dflt, PC_tree_t tree )

Description

Returns the floating point value of a scalar node. returns the default value in case of error

Parameters

dflt
the default value in case of error
tree
the floating-point-valued node

Result

the floating point value of the scalar node

long to_long ( PC_tree_t tree )

Description

Returns the int value of a scalar node. throws an Error if the provided tree is in error

Parameters

tree
the int-valued node

Result

the int value of the scalar node

long to_long ( long dflt, PC_tree_t tree )

Description

Returns the int value of a scalar node. returns the default value in case of error

Parameters

dflt
the default value in case of error
tree
the int-valued node

Result

the int value of the scalar node

std::string to_string ( PC_tree_t tree )

Description

Returns the string content of a scalar node. throws an Error if the provided tree is in error

Parameters

tree
the node

Result

the content of the scalar node

std::string to_string ( const std::string & dflt, PC_tree_t tree )

Description

Returns the string content of a scalar node. returns the default value in case of error

Parameters

dflt
the default value in case of error
tree
the node

Result

the content of the scalar node


Last modified January 1, 0001