:orphan: .. index:: pair: struct; cfg_primary_type .. _doxid-structcfg__primary__type: struct cfg_primary_type ======================= .. toctree:: :hidden: Overview ~~~~~~~~ Primary type structure :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct cfg_primary_type { // fields :ref:`te_errno`(* :ref:`str2val`)(char *val_str, cfg_inst_val *val); :ref:`te_errno`(* :ref:`val2str`)(cfg_inst_val val, char **val_str); :ref:`te_errno`(* :ref:`def_val`)(cfg_inst_val *val); void(* :ref:`free`)(cfg_inst_val val); :ref:`te_errno`(* :ref:`copy`)(cfg_inst_val val, cfg_inst_val *var); :ref:`te_errno`(* :ref:`get_from_msg`)(struct cfg_msg *msg, cfg_inst_val *val); void(* :ref:`put_to_msg`)(cfg_inst_val val, struct cfg_msg *msg); bool(* :ref:`is_equal`)(cfg_inst_val val1, cfg_inst_val val2); size_t(* :ref:`value_size`)(cfg_inst_val val); }; .. _details-structcfg__primary__type: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Primary type structure Fields ------ .. index:: pair: variable; str2val .. _doxid-structcfg__primary__type_1a8ec3ea1bb807101217fd7bb209becbc3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno`(* str2val)(char *val_str, cfg_inst_val *val) Convert value from string representation to :ref:`cfg_inst_val ` .. index:: pair: variable; val2str .. _doxid-structcfg__primary__type_1af539a46439cc35fdae7e9e61b53dc73c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno`(* val2str)(cfg_inst_val val, char **val_str) Convert value from :ref:`cfg_inst_val ` to string representation .. index:: pair: variable; def_val .. _doxid-structcfg__primary__type_1a46aa01132e2bfc107c130bd6e4447747: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno`(* def_val)(cfg_inst_val *val) Put default value of the type to :ref:`cfg_inst_val ` .. index:: pair: variable; free .. _doxid-structcfg__primary__type_1ad6cb13b1a74334b02e548a32ce8dd028: .. ref-code-block:: cpp :class: doxyrest-title-code-block void(* free)(cfg_inst_val val) Free memory allocated for the value (dummy for integer types) .. index:: pair: variable; copy .. _doxid-structcfg__primary__type_1abebcdcfe35618a4f2672bf48ba1edb9b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno`(* copy)(cfg_inst_val val, cfg_inst_val *var) Copy the value (allocating memory, if necessary). .. index:: pair: variable; get_from_msg .. _doxid-structcfg__primary__type_1afb6c13153d453dc6649808748eedaaf5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno`(* get_from_msg)(struct cfg_msg *msg, cfg_inst_val *val) Obtain value from the message .. index:: pair: variable; put_to_msg .. _doxid-structcfg__primary__type_1a81fe3b7794ae4724ea441ea1bfc686f1: .. ref-code-block:: cpp :class: doxyrest-title-code-block void(* put_to_msg)(cfg_inst_val val, struct cfg_msg *msg) Put the value to the message; the message length should be updated. .. index:: pair: variable; is_equal .. _doxid-structcfg__primary__type_1a789501df06e48c3549ff2dcf94022223: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool(* is_equal)(cfg_inst_val val1, cfg_inst_val val2) Compare two values .. index:: pair: variable; value_size .. _doxid-structcfg__primary__type_1a9d64bd00d1bbc76136b335c7db3330fd: .. ref-code-block:: cpp :class: doxyrest-title-code-block size_t(* value_size)(cfg_inst_val val) Get the size of given value