<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.14">
  <compounddef id="serialize_8h" kind="file" language="C++">
    <compoundname>serialize.h</compoundname>
    <includes refid="tools_8h" local="yes">../tools.h</includes>
    <includes refid="SerializeBase_8h" local="yes">SerializeBase.h</includes>
    <includes refid="FormatSerialize_8h" local="yes">FormatSerialize.h</includes>
    <includes refid="AsciiTableSerialize_8h" local="yes">AsciiTableSerialize.h</includes>
    <includes refid="PlySerialize_8h" local="yes">PlySerialize.h</includes>
    <includes refid="ObjSerialize_8h" local="yes">ObjSerialize.h</includes>
    <includedby refid="communication_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/communication.h</includedby>
    <incdepgraph>
      <node id="2848">
        <label>stdint.h</label>
        <link refid="stdint_8h_source"/>
        <childnode refid="2849" relation="include">
        </childnode>
        <childnode refid="2850" relation="include">
        </childnode>
      </node>
      <node id="2843">
        <label>stdarg.h</label>
      </node>
      <node id="2854">
        <label>../dataio/AsciiTable.h</label>
        <link refid="AsciiTable_8h_source"/>
        <childnode refid="2839" relation="include">
        </childnode>
        <childnode refid="2855" relation="include">
        </childnode>
      </node>
      <node id="2842">
        <label>stdlib.h</label>
      </node>
      <node id="2844">
        <label>errno.h</label>
      </node>
      <node id="2856">
        <label>AsciiTableSerialize.h</label>
        <link refid="AsciiTableSerialize_8h_source"/>
        <childnode refid="2839" relation="include">
        </childnode>
        <childnode refid="2852" relation="include">
        </childnode>
        <childnode refid="2854" relation="include">
        </childnode>
      </node>
      <node id="2858">
        <label>ObjSerialize.h</label>
        <link refid="ObjSerialize_8h_source"/>
        <childnode refid="2839" relation="include">
        </childnode>
      </node>
      <node id="2850">
        <label>stddef.h</label>
      </node>
      <node id="2839">
        <label>../tools.h</label>
        <link refid="tools_8h_source"/>
        <childnode refid="2840" relation="include">
        </childnode>
        <childnode refid="2841" relation="include">
        </childnode>
        <childnode refid="2842" relation="include">
        </childnode>
        <childnode refid="2843" relation="include">
        </childnode>
        <childnode refid="2844" relation="include">
        </childnode>
        <childnode refid="2845" relation="include">
        </childnode>
        <childnode refid="2846" relation="include">
        </childnode>
        <childnode refid="2848" relation="include">
        </childnode>
        <childnode refid="2851" relation="include">
        </childnode>
      </node>
      <node id="2853">
        <label>FormatSerialize.h</label>
        <link refid="FormatSerialize_8h_source"/>
        <childnode refid="2839" relation="include">
        </childnode>
        <childnode refid="2852" relation="include">
        </childnode>
        <childnode refid="2854" relation="include">
        </childnode>
      </node>
      <node id="2838">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h</label>
        <link refid="serialize_8h"/>
        <childnode refid="2839" relation="include">
        </childnode>
        <childnode refid="2852" relation="include">
        </childnode>
        <childnode refid="2853" relation="include">
        </childnode>
        <childnode refid="2856" relation="include">
        </childnode>
        <childnode refid="2857" relation="include">
        </childnode>
        <childnode refid="2858" relation="include">
        </childnode>
      </node>
      <node id="2855">
        <label>AsciiFile.h</label>
        <link refid="AsciiFile_8h_source"/>
        <childnode refid="2839" relation="include">
        </childnode>
      </node>
      <node id="2857">
        <label>PlySerialize.h</label>
        <link refid="PlySerialize_8h_source"/>
        <childnode refid="2839" relation="include">
        </childnode>
      </node>
      <node id="2849">
        <label>wchar.h</label>
      </node>
      <node id="2840">
        <label>string.h</label>
      </node>
      <node id="2851">
        <label>unistd.h</label>
      </node>
      <node id="2846">
        <label>regex_posix.h</label>
        <link refid="regex__posix_8h_source"/>
        <childnode refid="2847" relation="include">
        </childnode>
        <childnode refid="2848" relation="include">
        </childnode>
      </node>
      <node id="2845">
        <label>time.h</label>
      </node>
      <node id="2852">
        <label>SerializeBase.h</label>
        <link refid="SerializeBase_8h_source"/>
        <childnode refid="2839" relation="include">
        </childnode>
      </node>
      <node id="2847">
        <label>regex.h</label>
      </node>
      <node id="2841">
        <label>stdio.h</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="2863">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/PsiInterface.hpp</label>
        <link refid="PsiInterface_8hpp_source"/>
      </node>
      <node id="2861">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/CisInterface.h</label>
        <link refid="CisInterface_8h_source"/>
        <childnode refid="2862" relation="include">
        </childnode>
        <childnode refid="2864" relation="include">
        </childnode>
      </node>
      <node id="2859">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h</label>
        <link refid="serialize_8h"/>
        <childnode refid="2860" relation="include">
        </childnode>
      </node>
      <node id="2864">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/PsiInterface.h</label>
        <link refid="PsiInterface_8h_source"/>
      </node>
      <node id="2862">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/CisInterface.hpp</label>
        <link refid="CisInterface_8hpp_source"/>
        <childnode refid="2863" relation="include">
        </childnode>
      </node>
      <node id="2860">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/communication.h</label>
        <link refid="communication_8h_source"/>
        <childnode refid="2861" relation="include">
        </childnode>
        <childnode refid="2864" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="serialize_8h_1ab759dfd09c898159a5307eddd5273975" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="structseri__t" kindref="compound">seri_t</ref></type>
        <definition>static seri_t empty_serializer</definition>
        <argsstring>()</argsstring>
        <name>empty_serializer</name>
        <briefdescription>
<para>Create an empty serializer structure. </para>        </briefdescription>
        <detaileddescription>
<para><simplesect kind="return"><para><ref refid="structseri__t" kindref="compound">seri_t</ref> Empty serializer. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" line="20" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" bodystart="20" bodyend="26"/>
      </memberdef>
      <memberdef kind="function" id="serialize_8h_1a7a24e67e9fd8e16d3e6e818218feca60" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int update_serializer</definition>
        <argsstring>(seri_t *s, int type, const void *info)</argsstring>
        <name>update_serializer</name>
        <param>
          <type><ref refid="structseri__t" kindref="compound">seri_t</ref> *</type>
          <declname>s</declname>
        </param>
        <param>
          <type>int</type>
          <declname>type</declname>
        </param>
        <param>
          <type>const void *</type>
          <declname>info</declname>
        </param>
        <briefdescription>
<para>Update serializer with provided information. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">s</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structseri__t" kindref="compound">seri_t</ref> * Address of serializer that should be updated. If NULL, one is created. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">type</parametername>
</parameternamelist>
<parameterdescription>
<para>int Type that should be updated for the serializer. If negative, the type will be set depending on if info is NULL or not. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">info</parametername>
</parameternamelist>
<parameterdescription>
<para>void * Information that should be copied to the serializer. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int -1 if there is an error, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" line="38" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" bodystart="38" bodyend="90"/>
      </memberdef>
      <memberdef kind="function" id="serialize_8h_1a9a63378b35cb22864d1d64441caa9e50" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="structseri__t" kindref="compound">seri_t</ref> *</type>
        <definition>static seri_t* init_serializer</definition>
        <argsstring>(int type, const void *info)</argsstring>
        <name>init_serializer</name>
        <param>
          <type>int</type>
          <declname>type</declname>
        </param>
        <param>
          <type>const void *</type>
          <declname>info</declname>
        </param>
        <briefdescription>
<para>Initialize serialier. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">type</parametername>
</parameternamelist>
<parameterdescription>
<para>seri_type Type of serializer. If -1, the type will be inferred from the info. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">info</parametername>
</parameternamelist>
<parameterdescription>
<para>void * Information for the serializer. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>seri_t* Address of serializer. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" line="99" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" bodystart="99" bodyend="113"/>
      </memberdef>
      <memberdef kind="function" id="serialize_8h_1a976acf277d49735779610014d4619dfe" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int free_serializer</definition>
        <argsstring>(seri_t *s)</argsstring>
        <name>free_serializer</name>
        <param>
          <type><ref refid="structseri__t" kindref="compound">seri_t</ref> *</type>
          <declname>s</declname>
        </param>
        <briefdescription>
<para>Free serializer. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">s</parametername>
</parameternamelist>
<parameterdescription>
<para>seri_t* Serializer that should be freed. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int -1 if there was an error, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" line="121" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" bodystart="121" bodyend="127"/>
      </memberdef>
      <memberdef kind="function" id="serialize_8h_1a0847f9230197233fb87bf6b06d2b7d14" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int serialize</definition>
        <argsstring>(const seri_t s, char **buf, const size_t buf_siz, const int allow_realloc, int *args_used, va_list ap)</argsstring>
        <name>serialize</name>
        <param>
          <type>const <ref refid="structseri__t" kindref="compound">seri_t</ref></type>
          <declname>s</declname>
        </param>
        <param>
          <type>char **</type>
          <declname>buf</declname>
        </param>
        <param>
          <type>const size_t</type>
          <declname>buf_siz</declname>
        </param>
        <param>
          <type>const int</type>
          <declname>allow_realloc</declname>
        </param>
        <param>
          <type>int *</type>
          <declname>args_used</declname>
        </param>
        <param>
          <type>va_list</type>
          <declname>ap</declname>
        </param>
        <briefdescription>
<para>Serialize arguments to create a message. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">s</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structseri__t" kindref="compound">seri_t</ref> Structure sepcifying how to serialize arguments. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">buf</parametername>
</parameternamelist>
<parameterdescription>
<para>character pointer to pointer to memory where serialized message should be stored. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">buf_siz</parametername>
</parameternamelist>
<parameterdescription>
<para>size_t Size of memory allocated to buf. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">allow_realloc</parametername>
</parameternamelist>
<parameterdescription>
<para>int If 1, buf will be realloced if it is not big enough to hold the serialized emssage. If 0, an error will be returned. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="out">args_used</parametername>
</parameternamelist>
<parameterdescription>
<para>int Number of arguments formatted. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">ap</parametername>
</parameternamelist>
<parameterdescription>
<para>va_list Arguments to be formatted. returns: int The length of the serialized message or -1 if there is an error. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" line="143" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" bodystart="143" bodyend="185"/>
      </memberdef>
      <memberdef kind="function" id="serialize_8h_1ad7e24e0cec195ea2bed4844da174dd9c" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int deserialize</definition>
        <argsstring>(const seri_t s, const char *buf, const size_t buf_siz, va_list ap)</argsstring>
        <name>deserialize</name>
        <param>
          <type>const <ref refid="structseri__t" kindref="compound">seri_t</ref></type>
          <declname>s</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type>const size_t</type>
          <declname>buf_siz</declname>
        </param>
        <param>
          <type>va_list</type>
          <declname>ap</declname>
        </param>
        <briefdescription>
<para>Deserialize message to populate arguments. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">s</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structseri__t" kindref="compound">seri_t</ref> Structure sepcifying how to deserialize message. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">buf</parametername>
</parameternamelist>
<parameterdescription>
<para>character pointer to serialized message. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">buf_siz</parametername>
</parameternamelist>
<parameterdescription>
<para>size_t Size of buf. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">ap</parametername>
</parameternamelist>
<parameterdescription>
<para>va_list Arguments to be parsed from message. returns: int The number of populated arguments. -1 indicates an error. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" line="196" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h" bodystart="196" bodyend="215"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#ifndef<sp/>CISSERIALIZE_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CISSERIALIZE_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;../tools.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;SerializeBase.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;FormatSerialize.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;AsciiTableSerialize.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;PlySerialize.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;ObjSerialize.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus<sp/></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>is<sp/>a<sp/>C++<sp/>compiler,<sp/>use<sp/>C<sp/>linkage<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;C&quot;</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>empty_serializer()<sp/>{</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>s;</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/>s.type<sp/>=<sp/>DIRECT_SERI;<sp/></highlight><highlight class="comment">//<sp/>Can&apos;t<sp/>be<sp/>-1<sp/>(was<sp/>that<sp/>used?)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/>s.info<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/>s.size_info<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>s;</highlight></codeline>
<codeline lineno="26"><highlight class="normal">};</highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>update_serializer(<ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>*s,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>type,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*info)<sp/>{</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Malloc<sp/>if<sp/>not<sp/>initialized</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(s<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;update_serializer:<sp/>Pointer<sp/>to<sp/>serializer<sp/>is<sp/>NULL.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Copy<sp/>information</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((type<sp/>==<sp/>ASCII_TABLE_SERI)<sp/>||<sp/>(type<sp/>==<sp/>ASCII_TABLE_ARRAY_SERI))<sp/>{</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structasciiTable__t" kindref="compound">asciiTable_t</ref><sp/>*handle<sp/>=<sp/>(<ref refid="structasciiTable__t" kindref="compound">asciiTable_t</ref>*)malloc(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structasciiTable__t" kindref="compound">asciiTable_t</ref>));</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/></highlight><highlight class="comment">//<sp/>Limit<sp/>content<sp/>of<sp/>format_str<sp/>so<sp/>double<sp/>free<sp/>not<sp/>triggered</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*format_str;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(info<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/>format_str<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)(s-&gt;info);</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/>format_str<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)info;</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(handle<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;update_serializer:<sp/>Failed<sp/>to<sp/>allocate<sp/>for<sp/>asciiTable.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>handle[0]<sp/>=<sp/>asciiTable(</highlight><highlight class="stringliteral">&quot;seri&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;0&quot;</highlight><highlight class="normal">,<sp/>format_str,<sp/>NULL,<sp/>NULL,<sp/>NULL);</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(s-&gt;info<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>free(s-&gt;info);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/>s-&gt;size_info<sp/>=<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structasciiTable__t" kindref="compound">asciiTable_t</ref>);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/>s-&gt;info<sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)handle;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(info<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(type<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>type<sp/>=<sp/>DIRECT_SERI;</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*format_str<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)info;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/>s-&gt;size_info<sp/>=<sp/>2*strlen(format_str)<sp/>+<sp/>1;</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*t_sinfo<sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)realloc(s-&gt;info,<sp/>s-&gt;size_info);</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t_sinfo<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;update_serializer:<sp/>Failed<sp/>to<sp/>reallocate<sp/>for<sp/>format<sp/>string.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>s-&gt;size_info<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>free(s-&gt;info);</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/>s-&gt;info<sp/>=<sp/>t_sinfo;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/>strcpy((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)(s-&gt;info),<sp/>format_str);</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>size_t<sp/>len_fmt<sp/>=<sp/>strlen(format_str);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>memcpy(s-&gt;info,<sp/>format_str,<sp/>len_fmt<sp/>+<sp/>1);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>((char*)(s-&gt;info))[len_fmt]<sp/>=<sp/>&apos;\0&apos;;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(type<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>type<sp/>=<sp/>FORMAT_SERI;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/>s-&gt;type<sp/>=<sp/>(seri_type)type;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="90"><highlight class="normal">};</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>*<sp/>init_serializer(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>type,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*info)<sp/>{</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>*s<sp/>=<sp/>(<ref refid="structseri__t" kindref="compound">seri_t</ref>*)malloc(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structseri__t" kindref="compound">seri_t</ref>));</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(s<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;init_serializer:<sp/>Failed<sp/>to<sp/>allocate<sp/>serializer.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>s[0]<sp/>=<sp/>empty_serializer();</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>flag<sp/>=<sp/>update_serializer(s,<sp/>type,<sp/>info);</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(flag<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;init_serializer:<sp/>Failed<sp/>to<sp/>create<sp/>serializer.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/>free(s);</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/>s<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>s;</highlight></codeline>
<codeline lineno="113"><highlight class="normal">};</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>free_serializer(<ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>*s)<sp/>{</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(s-&gt;info<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/>free(s-&gt;info);</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/>s-&gt;info<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="127"><highlight class="normal">};</highlight></codeline>
<codeline lineno="128"><highlight class="normal"></highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>serialize(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>s,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>**buf,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>buf_siz,</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>allow_realloc,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*args_used,<sp/>va_list<sp/>ap)<sp/>{</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/>seri_type<sp/>t<sp/>=<sp/>s.type;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/>va_list<sp/>ap2;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(allow_realloc)<sp/>{</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/>va_copy(ap2,<sp/>ap);</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>DIRECT_SERI)</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>serialize_direct(s,<sp/>*buf,<sp/>buf_siz,<sp/>args_used,<sp/>ap);</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>FORMAT_SERI)</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>serialize_format(s,<sp/>*buf,<sp/>buf_siz,<sp/>args_used,<sp/>ap);</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>ASCII_TABLE_SERI)</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>serialize_ascii_table(s,<sp/>*buf,<sp/>buf_siz,<sp/>args_used,<sp/>ap);</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>ASCII_TABLE_ARRAY_SERI)</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>serialize_ascii_table_array(s,<sp/>*buf,<sp/>buf_siz,<sp/>args_used,<sp/>ap);</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>PLY_SERI)</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>serialize_ply(s,<sp/>*buf,<sp/>buf_siz,<sp/>args_used,<sp/>ap);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>OBJ_SERI)</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>serialize_obj(s,<sp/>*buf,<sp/>buf_siz,<sp/>args_used,<sp/>ap);</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;serialize:<sp/>Unsupported<sp/>seri_type<sp/>%d&quot;</highlight><highlight class="normal">,<sp/>t);</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret<sp/>&gt;<sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)buf_siz)<sp/>{</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(allow_realloc)<sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*buf<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)realloc(*buf,<sp/>ret+1);<sp/></highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(*buf<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;serialize:<sp/>Failed<sp/>to<sp/>realloc<sp/>buffer.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>serialize(s,<sp/>buf,<sp/>ret+1,<sp/>1,<sp/>args_used,<sp/>ap2);</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;serialize:<sp/>encoded<sp/>message<sp/>too<sp/>large<sp/>for<sp/>the<sp/>buffer.<sp/>(buf_siz=%d,<sp/>len=%d)&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf_siz,<sp/>ret);</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(allow_realloc)<sp/>{</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/>va_end(ap2);</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="185"><highlight class="normal">}</highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>deserialize(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structseri__t" kindref="compound">seri_t</ref><sp/>s,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>buf_siz,<sp/>va_list<sp/>ap)<sp/>{</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/>seri_type<sp/>t<sp/>=<sp/>s.type;</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>DIRECT_SERI)</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>deserialize_direct(s,<sp/>buf,<sp/>buf_siz,<sp/>ap);</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>FORMAT_SERI)</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>deserialize_format(s,<sp/>buf,<sp/>buf_siz,<sp/>ap);</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>ASCII_TABLE_SERI)</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>deserialize_ascii_table(s,<sp/>buf,<sp/>buf_siz,<sp/>ap);</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>ASCII_TABLE_ARRAY_SERI)</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>deserialize_ascii_table_array(s,<sp/>buf,<sp/>buf_siz,<sp/>ap);</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>PLY_SERI)</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>deserialize_ply(s,<sp/>buf,<sp/>buf_siz,<sp/>ap);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>OBJ_SERI)</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>deserialize_obj(s,<sp/>buf,<sp/>buf_siz,<sp/>ap);</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;deserialize:<sp/>Unsupported<sp/>seri_type<sp/>%d&quot;</highlight><highlight class="normal">,<sp/>t);</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="215"><highlight class="normal">};</highlight></codeline>
<codeline lineno="216"><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus<sp/></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>is<sp/>a<sp/>C++<sp/>compiler,<sp/>end<sp/>C<sp/>linkage<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal">}</highlight></codeline>
<codeline lineno="219"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*CISSERIALIZE_H_*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h"/>
  </compounddef>
</doxygen>
