29 #ifndef PDI_PARACONF_WRAPPER_H_ 30 #define PDI_PARACONF_WRAPPER_H_ 37 #include <pdi/pdi_fwd.h> 67 int PDI_EXPORT
len(PC_tree_t tree);
81 int PDI_EXPORT
len(PC_tree_t tree,
int dflt);
90 long PDI_EXPORT
to_long(PC_tree_t tree);
100 long PDI_EXPORT
to_long(PC_tree_t tree,
long dflt);
109 double PDI_EXPORT
to_double(PC_tree_t tree);
119 double PDI_EXPORT
to_double(PC_tree_t tree,
double dflt);
128 std::string PDI_EXPORT
to_string(PC_tree_t tree);
138 std::string PDI_EXPORT
to_string(PC_tree_t tree,
const std::string& dflt);
147 bool PDI_EXPORT
to_bool(PC_tree_t tree);
157 bool PDI_EXPORT
to_bool(PC_tree_t tree,
bool dflt);
165 bool PDI_EXPORT
is_list(PC_tree_t tree);
172 bool PDI_EXPORT
is_map(PC_tree_t tree);
179 bool PDI_EXPORT
is_scalar(PC_tree_t tree);
186 void PDI_EXPORT
each(PC_tree_t tree, std::function<
void(PC_tree_t)> operation);
194 void PDI_EXPORT
opt_each(PC_tree_t tree, std::function<
void(PC_tree_t)> operation);
201 void PDI_EXPORT
each(PC_tree_t tree, std::function<
void (PC_tree_t,PC_tree_t)> operation);
209 void PDI_EXPORT
each_in_omap(PC_tree_t tree, std::function<
void (PC_tree_t,PC_tree_t)> operation);
213 #endif // PDI_PARACONF_WRAPPER_H_ 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. ...
std::string to_string(PC_tree_t tree)
Returns the string content of a scalar node.
bool is_map(PC_tree_t tree)
Checks if the tree is a map.
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 ele...
bool is_scalar(PC_tree_t tree)
Checks if the tree is a scalar.
bool is_list(PC_tree_t tree)
Checks if the tree is a list.
int len(PC_tree_t tree)
Returns the length of a node.
long to_long(PC_tree_t tree)
Returns the int value of a scalar node.
Automatically installs a paraconf error-handler that ignores errors and uninstalls it on destruction...
Definition: paraconf_wrapper.h:45
bool to_bool(PC_tree_t tree)
Returns the boolean value of a scalar node.
Definition: array_datatype.h:37
double to_double(PC_tree_t tree)
Returns the floating point value of a scalar node.
PC_errhandler_t m_handler
Definition: paraconf_wrapper.h:47