<sect1 id="scripting-data-structure">
<title>Scripting API for every Data Structure</title>
<sect2>
<title>Abstract Data Structure Object</title>
<para>
The abstract data structure defines a set of data elements and possible connections between them, this is the prototype for every other data structure.
Data structures are identified by their names.
Assuming you created a data structure with name <literal>testgraph</literal>, then you can access the data structure simply by writing this identifier.
For example, to get an array with all data elements in the given data structure, you can write <literal>testgraph.list_nodes();</literal> in the script.
</para>

<sect3>
<title>Properties</title>
<itemizedlist>
    <listitem>
        <para>
        <emphasis>name</emphasis> :
        </para>
        <para>The unique name of this data structure.</para>
    </listitem>
</itemizedlist>
</sect3>
</sect2>

<sect2>
<title>Abstract Data</title>
<para>
An abstract data element is a unit of information that belongs to an abstract data structure and possibly is connected to other data elements by pointers.
</para>

<sect3>
<title>Properties</title>
<itemizedlist>
    <listitem>
        <para>
        <emphasis>width</emphasis> :
        </para>
        <para>The size of this data element.</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>x</emphasis> :
        </para>
        <para>The x-coordinate of this data element.</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>y</emphasis> :
        </para>
        <para>The y-coordinate of this data element.</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>id</emphasis> :
        </para>
        <para>The unique identifier of this data element.</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>color</emphasis> :
        </para>
        <para>The color of this data element stated as hexadecimal value.</para>
    </listitem>
</itemizedlist>
</sect3>
</sect2>


<sect2>
<title>Abstract Pointer</title>
<para>
A pointer connects two data elements and can itself hold information by its properties.
</para>
<sect3>
<title>Properties</title>
<itemizedlist>
    <listitem>
        <para>
        <emphasis>width</emphasis> :
        </para>
        <para>The width of the connection.</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>directed</emphasis> :
        </para>
        <para>If true, the connection is directed. Otherwise is connection is undirected.</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>from</emphasis> :
        </para>
        <para>Start of the connection.</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>to</emphasis> :
        </para>
        <para>End of the connection</para>
    </listitem>

    <listitem>
        <para>
        <emphasis>color</emphasis> :
        </para>
        <para>ID of the connection type.</para>
    </listitem>
</itemizedlist>
</sect3>


<sect3>
<title>Methods</title>
<variablelist>

    <varlistentry>
    <term>remove()</term>
    <listitem>
        <para>Remove this connection.</para>
    <funcsynopsis><funcprototype>
    <funcdef>void <function>remove</function></funcdef>
    <paramdef></paramdef>
    </funcprototype>
    </funcsynopsis>
    </listitem>
    </varlistentry>

    <varlistentry>
    <term>add_property(name, value)</term>
    <listitem>
        <para>Add a new property to the connection.</para>
    <funcsynopsis><funcprototype>
    <funcdef>void <function>add_property</function></funcdef>
        <paramdef>string <parameter><replaceable>name</replaceable></parameter></paramdef>
        <paramdef>string <parameter><replaceable>value</replaceable></parameter></paramdef>
    </funcprototype>
    </funcsynopsis>
    </listitem>
    </varlistentry>

    <varlistentry>
    <term>remove_property(name)</term>
    <listitem>
        <para>Remove an existing property from the connection.</para>
    <funcsynopsis><funcprototype>
    <funcdef>void <function>remove_property</function></funcdef>
        <paramdef>string <parameter><replaceable>name</replaceable></parameter></paramdef>
    </funcprototype>
    </funcsynopsis>
    </listitem>
    </varlistentry>
</variablelist>
</sect3>

</sect2>
</sect1>
