\begin{manual}

\resetmancounter

\section*{Import ( GraphML\_reader )}
\label{Import}
\label{GraphML_reader}

\mansection{Definition}


\ensuremath{\mathit{GraphML\nspaceunderscore\_reader}} extends \ensuremath{\mathit{GraphML\nspaceunderscore\_graph}} and thus inherits from
\ensuremath{\mathit{graphml\nspaceunderscore\_attributes}\Ltemplateless \mathit{string}\Ltemplategreater }, \ensuremath{\mathit{graphml\nspaceunderscore\_parseinfo}\Ltemplateless \mathit{string}\Ltemplategreater }
and \ensuremath{\mathit{graphml\nspaceunderscore\_structure}\Ltemplateless \mathit{string}\Ltemplategreater }.
An instance \ensuremath{\mathit{gm}} of \ensuremath{\mathit{GraphML\nspaceunderscore\_reader}} is a data structure that holds 
references to a \ensuremath{\mathit{graph}} and associated \ensuremath{\mathit{node\nspaceunderscore\_}} and 
\ensuremath{\mathit{edge\nspaceunderscore\_array}}s, and allows to import the referenced graph
and its attributes in GraphML format.  

Any of the following types may be used for attribute data: \ensuremath{\mathit{bool}},
\ensuremath{\mathit{int}}, \ensuremath{\mathit{long}}, \ensuremath{\mathit{float}}, \ensuremath{\mathit{double}}, or \ensuremath{\mathit{string}} (i.e.\ \ensuremath{\mathit{leda\nspaceunderscore\_string}}). 
Types are identified by instances of 
\begin{quote}
\ensuremath{\mathit{GraphML\nspaceunderscore\_reader}\DP\ \mathit{gm\nspaceunderscore\_data\nspaceunderscore\_type}}\\
\ensuremath{\ =\ \{bool\nspaceunderscore\_data,} \ensuremath{int\nspaceunderscore\_data,} \ensuremath{long\nspaceunderscore\_data,} \ensuremath{float\nspaceunderscore\_data,} \ensuremath{double\nspaceunderscore\_data,} \ensuremath{
string\nspaceunderscore\_data\}}.
\end{quote}

     



\setlength{\declwidth}{1cm}\computewidths

\mansection{Creation}

\create{\ensuremath{\mathit{GraphML\nspaceunderscore\_reader}}}{\ensuremath{\mathit{gm}}}{\ensuremath{\mathit{graph}\&\ G}}
{
    creates an instance \ensuremath{\mathit{gm}} of type \ensuremath{\mathit{GraphML\nspaceunderscore\_reader}} for graph \ensuremath{G}.
     

}

\setlength{\typewidth}{1cm}\setlength{\callwidth}{1cm}\computewidths

\mansection{Operations}

\function{\ensuremath{\mathit{bool}}}
{\ensuremath{\mathit{gm}\nspacedot.}read}
{\ensuremath{\mathit{string}\ \mathit{filename}}}
{
    Imports a GraphML document from file \ensuremath{\mathit{filename}}.\\
    If \ensuremath{\mathit{filename}} is "-", imports a GraphML document from StdIn.\\
    Returns \ensuremath{\mathit{true}} if and only if the operation was completed
    successfully.\\
    Calls first \ensuremath{G\nspacedot.\mathit{clear}(\;)} on the referenced graph \ensuremath{G}
    of \ensuremath{\mathit{gm}}\\ 
    PRECONDITION:\\
    \ensuremath{\mathit{filename}} must contain a valid GraphML document 
    (validity will not be checked).
     

}

\end{manual}


