<?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="structforpy_1_1ptr__variant" kind="struct" language="C++" prot="public">
    <compoundname>forpy::ptr_variant</compoundname>
    <basecompoundref prot="public" virt="non-virtual">mu::variant&lt; Ts... &gt;</basecompoundref>
    <includes refid="storage_8h" local="no">storage.h</includes>
    <templateparamlist>
      <param>
        <type>typename...</type>
        <declname>Ts</declname>
        <defname>Ts</defname>
      </param>
    </templateparamlist>
      <sectiondef kind="public-type">
      <memberdef kind="typedef" id="structforpy_1_1ptr__variant_1a66fc5b573e64d1fe5fc1b22c0c5b9c34" prot="public" static="no">
        <type>mu::variant&lt; Ts... &gt;</type>
        <definition>using forpy::ptr_variant&lt; Ts &gt;::Base =  mu::variant&lt;Ts...&gt;</definition>
        <argsstring></argsstring>
        <name>Base</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/classner/git/forpy/include/forpy/util/storage.h" line="56" column="1" bodyfile="/Users/classner/git/forpy/include/forpy/util/storage.h" bodystart="56" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<para>Design concepts behind this storage.</para><para>Aims are:<itemizedlist>
<listitem><para>easy and serializable storage for internal types,</para></listitem><listitem><para>encoding of multiple possible return types,</para></listitem><listitem><para>high efficiency,</para></listitem><listitem><para>no hassle for library users,</para></listitem><listitem><para>remain as compatible with the standard as possible (c.f., std::variant in C++ 17).</para></listitem></itemizedlist>
</para><para>Since it should be possible to use this library with large datasets that shouldn&apos;t have to be copied when library functions are called, this implies some additional constraints.</para><para>The standard says that std::variant can&apos;t hold pointer types, which is necessary for this to work. The currently provided mu::variant can do this.</para><para>To not influence library user experience and not create problems when feeding the library with data, all external methods accept either std::shared_ptr&lt;Eigen::Mat&gt;s if ownership of the data must be set. That&apos;s why the <computeroutput>store</computeroutput> suffixed variants contain shared_ptr&apos;s (otherwise the data would have to be copied).</para><para>In all other cases, the variants contain the data or MatRefs to it directly for internal library use.</para><para>The <ref refid="structforpy_1_1ptr__variant" kindref="compound">ptr_variant</ref> is a subclass of the variant for which an automatic return type conversion to Python is applied. <computeroutput><ref refid="structforpy_1_1_empty" kindref="compound">Empty</ref></computeroutput> is similar to <computeroutput>std::monostate</computeroutput>. The <ref refid="structforpy_1_1_v_reset" kindref="compound">VReset</ref> visitor can be used to clear <computeroutput><ref refid="structforpy_1_1ptr__variant" kindref="compound">ptr_variant</ref></computeroutput>s. </para>    </detaileddescription>
    <inheritancegraph>
      <node id="144">
        <label>mu::variant&lt; Ts... &gt;</label>
      </node>
      <node id="143">
        <label>forpy::ptr_variant&lt; Ts &gt;</label>
        <link refid="structforpy_1_1ptr__variant"/>
        <childnode refid="144" relation="public-inheritance">
        </childnode>
      </node>
    </inheritancegraph>
    <collaborationgraph>
      <node id="146">
        <label>mu::variant&lt; Ts... &gt;</label>
      </node>
      <node id="145">
        <label>forpy::ptr_variant&lt; Ts &gt;</label>
        <link refid="structforpy_1_1ptr__variant"/>
        <childnode refid="146" relation="public-inheritance">
        </childnode>
      </node>
    </collaborationgraph>
    <location file="/Users/classner/git/forpy/include/forpy/util/storage.h" line="55" column="1" bodyfile="/Users/classner/git/forpy/include/forpy/util/storage.h" bodystart="55" bodyend="58"/>
    <listofallmembers>
      <member refid="structforpy_1_1ptr__variant_1a66fc5b573e64d1fe5fc1b22c0c5b9c34" prot="public" virt="non-virtual"><scope>forpy::ptr_variant</scope><name>Base</name></member>
    </listofallmembers>
  </compounddef>
</doxygen>
