maxGraph/docs/api/classes/Codec.html

172 lines
49 KiB
HTML

<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Codec | @maxgraph/core</title><meta name="description" content="Documentation for @maxgraph/core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@maxgraph/core</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@maxgraph/core</a></li><li><a href="Codec.html">Codec</a></li></ul><h1>Class Codec</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>XML codec for JavaScript object graphs. See <a href="ObjectCodec.html">ObjectCodec</a> for a
description of the general encoding/decoding scheme. This class uses the
codecs registered in <a href="CodecRegistry.html">CodecRegistry</a> for encoding/decoding each object.</p>
</div><div>
<a href="#references" id="references" style="color: inherit; text-decoration: none;">
<h3>References</h3>
</a>
<p>In order to resolve references, especially forward references, the Codec
constructor must be given the document that contains the referenced
elements.</p>
<a href="#examples" id="examples" style="color: inherit; text-decoration: none;">
<h3>Examples</h3>
</a>
<p>The following code is used to encode a graph model.</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">encoder</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">();</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">result</span><span class="hl-1"> = </span><span class="hl-0">encoder</span><span class="hl-1">.</span><span class="hl-2">encode</span><span class="hl-1">(</span><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">getDataModel</span><span class="hl-1">());</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">xml</span><span class="hl-1"> = </span><span class="hl-0">mxUtils</span><span class="hl-1">.</span><span class="hl-2">getXml</span><span class="hl-1">(</span><span class="hl-0">result</span><span class="hl-1">);</span>
</code></pre>
<a href="#example" id="example" style="color: inherit; text-decoration: none;">
<h4>Example</h4>
</a>
<p>Using the code below, an XML document is decoded into an existing model. The
document may be obtained using one of the functions in mxUtils for loading
an XML file, eg. {@link mxUtils.get}, or using {@link mxUtils.parseXml} for parsing an
XML string.</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">doc</span><span class="hl-1"> = </span><span class="hl-0">mxUtils</span><span class="hl-1">.</span><span class="hl-2">parseXml</span><span class="hl-1">(</span><span class="hl-0">xmlString</span><span class="hl-1">);</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">codec</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">(</span><span class="hl-0">doc</span><span class="hl-1">);</span><br/><span class="hl-0">codec</span><span class="hl-1">.</span><span class="hl-2">decode</span><span class="hl-1">(</span><span class="hl-0">doc</span><span class="hl-1">.</span><span class="hl-0">documentElement</span><span class="hl-1">, </span><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">getDataModel</span><span class="hl-1">());</span>
</code></pre>
<a href="#example-1" id="example-1" style="color: inherit; text-decoration: none;">
<h4>Example</h4>
</a>
<p>This example demonstrates parsing a list of isolated cells into an existing
graph model. Note that the cells do not have a parent reference so they can
be added anywhere in the cell hierarchy after parsing.</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">xml</span><span class="hl-1"> = </span><span class="hl-6">&#39;&lt;root&gt;&lt;mxCell id=&quot;2&quot; value=&quot;Hello,&quot; vertex=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;20&quot; y=&quot;20&quot; width=&quot;80&quot; height=&quot;30&quot; as=&quot;geometry&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;3&quot; value=&quot;World!&quot; vertex=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;200&quot; y=&quot;150&quot; width=&quot;80&quot; height=&quot;30&quot; as=&quot;geometry&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;4&quot; value=&quot;&quot; edge=&quot;1&quot; source=&quot;2&quot; target=&quot;3&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot;/&gt;&lt;/mxCell&gt;&lt;/root&gt;&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">doc</span><span class="hl-1"> = </span><span class="hl-0">mxUtils</span><span class="hl-1">.</span><span class="hl-2">parseXml</span><span class="hl-1">(</span><span class="hl-0">xml</span><span class="hl-1">);</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">codec</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">(</span><span class="hl-0">doc</span><span class="hl-1">);</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">elt</span><span class="hl-1"> = </span><span class="hl-0">doc</span><span class="hl-1">.</span><span class="hl-0">documentElement</span><span class="hl-1">.</span><span class="hl-0">firstChild</span><span class="hl-1">;</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">cells</span><span class="hl-1"> = [];</span><br/><br/><span class="hl-5">while</span><span class="hl-1"> (</span><span class="hl-0">elt</span><span class="hl-1"> != </span><span class="hl-3">null</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-0">cells</span><span class="hl-1">.</span><span class="hl-2">push</span><span class="hl-1">(</span><span class="hl-0">codec</span><span class="hl-1">.</span><span class="hl-2">decode</span><span class="hl-1">(</span><span class="hl-0">elt</span><span class="hl-1">));</span><br/><span class="hl-1"> </span><span class="hl-0">elt</span><span class="hl-1"> = </span><span class="hl-0">elt</span><span class="hl-1">.</span><span class="hl-0">nextSibling</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">addCells</span><span class="hl-1">(</span><span class="hl-0">cells</span><span class="hl-1">);</span>
</code></pre>
<a href="#example-2" id="example-2" style="color: inherit; text-decoration: none;">
<h4>Example</h4>
</a>
<p>Using the following code, the selection cells of a graph are encoded and the
output is displayed in a dialog box.</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">enc</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">();</span><br/><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">cells</span><span class="hl-1"> = </span><span class="hl-0">graph</span><span class="hl-1">.</span><span class="hl-2">getSelectionCells</span><span class="hl-1">();</span><br/><span class="hl-0">mxUtils</span><span class="hl-1">.</span><span class="hl-2">alert</span><span class="hl-1">(</span><span class="hl-0">mxUtils</span><span class="hl-1">.</span><span class="hl-2">getPrettyXml</span><span class="hl-1">(</span><span class="hl-0">enc</span><span class="hl-1">.</span><span class="hl-2">encode</span><span class="hl-1">(</span><span class="hl-0">cells</span><span class="hl-1">)));</span>
</code></pre>
<p>Newlines in the XML can be converted to <br>, in which case a &#39;<br>&#39; argument
must be passed to {@link mxUtils.getXml} as the second argument.</p>
<a href="#debugging" id="debugging" style="color: inherit; text-decoration: none;">
<h3>Debugging</h3>
</a>
<p>For debugging I/O you can use the following code to get the sequence of
encoded objects:</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">oldEncode</span><span class="hl-1"> = </span><span class="hl-0">encode</span><span class="hl-1">;</span><br/><span class="hl-2">encode</span><span class="hl-1">(</span><span class="hl-0">obj</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-0">MaxLog</span><span class="hl-1">.</span><span class="hl-2">show</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-0">MaxLog</span><span class="hl-1">.</span><span class="hl-2">debug</span><span class="hl-1">(</span><span class="hl-6">&#39;Codec.encode: obj=&#39;</span><span class="hl-1">+</span><span class="hl-0">mxUtils</span><span class="hl-1">.</span><span class="hl-2">getFunctionName</span><span class="hl-1">(</span><span class="hl-0">obj</span><span class="hl-1">.</span><span class="hl-0">constructor</span><span class="hl-1">));</span><br/><br/><span class="hl-1"> </span><span class="hl-5">return</span><span class="hl-1"> </span><span class="hl-0">oldEncode</span><span class="hl-1">.</span><span class="hl-2">apply</span><span class="hl-1">(</span><span class="hl-3">this</span><span class="hl-1">, </span><span class="hl-3">arguments</span><span class="hl-1">);</span><br/><span class="hl-1">};</span>
</code></pre>
<p>Note that the I/O system adds object codecs for new object automatically. For
decoding those objects, the constructor should be written as follows:</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">MyObj</span><span class="hl-1">(name)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-4">// ...</span><br/><span class="hl-1">};</span>
</code></pre>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Codec</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Codec.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#document" class="tsd-kind-icon">document</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#elements" class="tsd-kind-icon">elements</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#encodeDefaults" class="tsd-kind-icon">encode<wbr/>Defaults</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#objects" class="tsd-kind-icon">objects</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#addElement" class="tsd-kind-icon">add<wbr/>Element</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#decode" class="tsd-kind-icon">decode</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#decodeCell" class="tsd-kind-icon">decode<wbr/>Cell</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#encode" class="tsd-kind-icon">encode</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#encodeCell" class="tsd-kind-icon">encode<wbr/>Cell</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#getElementById" class="tsd-kind-icon">get<wbr/>Element<wbr/>By<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#getId" class="tsd-kind-icon">get<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#getObject" class="tsd-kind-icon">get<wbr/>Object</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#insertIntoGraph" class="tsd-kind-icon">insert<wbr/>Into<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#isCellCodec" class="tsd-kind-icon">is<wbr/>Cell<wbr/>Codec</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#lookup" class="tsd-kind-icon">lookup</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#putObject" class="tsd-kind-icon">put<wbr/>Object</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#reference" class="tsd-kind-icon">reference</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#setAttribute" class="tsd-kind-icon">set<wbr/>Attribute</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#updateElements" class="tsd-kind-icon">update<wbr/>Elements</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Codec<span class="tsd-signature-symbol">(</span>document<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">XMLDocument</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Codec.html" class="tsd-signature-type" data-tsd-kind="Class">Codec</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L120">serialization/Codec.ts:120</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>document: <span class="tsd-signature-type">XMLDocument</span><span class="tsd-signature-symbol"> = ...</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="Codec.html" class="tsd-signature-type" data-tsd-kind="Class">Codec</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="document" class="tsd-anchor"></a><h3>document</h3><div class="tsd-signature tsd-kind-icon">document<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">XMLDocument</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L128">serialization/Codec.ts:128</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The owner document of the codec.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="elements" class="tsd-anchor"></a><h3>elements</h3><div class="tsd-signature tsd-kind-icon">elements<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L138">serialization/Codec.ts:138</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Lookup table for resolving IDs to elements.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="encodeDefaults" class="tsd-anchor"></a><h3>encode<wbr/>Defaults</h3><div class="tsd-signature tsd-kind-icon">encode<wbr/>Defaults<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L143">serialization/Codec.ts:143</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if default values should be encoded. Default is false.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="objects" class="tsd-anchor"></a><h3>objects</h3><div class="tsd-signature tsd-kind-icon">objects<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L133">serialization/Codec.ts:133</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Maps from IDs to objects.</p>
</div></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span>key: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">Element</span></h5></li></ul></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="addElement" class="tsd-anchor"></a><h3>add<wbr/>Element</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">add<wbr/>Element<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Element</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L232">serialization/Codec.ts:232</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Adds the given element to <a href="Codec.html#elements">elements</a> if it has an ID.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Element</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decode" class="tsd-anchor"></a><h3>decode</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decode<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Element</span>, into<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L341">serialization/Codec.ts:341</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Decodes the given XML node. The optional &quot;into&quot;
argument specifies an existing object to be
used. If no object is given, then a new instance
is created using the constructor from the codec.</p>
</div><div><p>The function returns the passed in object or
the new instance if no object was given.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Element</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>XML node to be decoded.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> into: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional object to be decodec into.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decodeCell" class="tsd-anchor"></a><h3>decode<wbr/>Cell</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decode<wbr/>Cell<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Element</span>, restoreStructures<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L423">serialization/Codec.ts:423</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Decodes cells that have been encoded using inversion, ie.
where the user object is the enclosing node in the XML,
and restores the group and graph structure in the cells.
Returns a new <a href="Cell.html">Cell</a> instance that represents the
given node.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Element</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>XML node that contains the cell data.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> restoreStructures: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional boolean indicating whether
the graph structure should be restored by calling insert
and insertEdge on the parent and terminals, respectively.
Default is true.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encode" class="tsd-anchor"></a><h3>encode</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encode<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Element</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L310">serialization/Codec.ts:310</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Encodes the specified object and returns the resulting
XML node.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>obj: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object to be encoded.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Element</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encodeCell" class="tsd-anchor"></a><h3>encode<wbr/>Cell</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encode<wbr/>Cell<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Node</span>, includeChildren<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L383">serialization/Codec.ts:383</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Encoding of cell hierarchies is built-into the core, but
is a higher-level function that needs to be explicitely
used by the respective object encoders (eg. <a href="ModelCodec.html">ModelCodec</a>,
<a href="ChildChangeCodec.html">ChildChangeCodec</a> and <a href="RootChangeCodec.html">RootChangeCodec</a>). This
implementation writes the given cell and its children as a
(flat) sequence into the given node. The children are not
encoded if the optional includeChildren is false. The
function is in charge of adding the result into the
given node and has no return value.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>{@link mxCell} to be encoded.</p>
</div></div></li><li><h5>node: <span class="tsd-signature-type">Node</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Parent XML node to add the encoded cell into.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> includeChildren: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional boolean indicating if the
function should include all descendents. Default is true.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getElementById" class="tsd-anchor"></a><h3>get<wbr/>Element<wbr/>By<wbr/>Id</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Element<wbr/>By<wbr/>Id<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Element</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L209">serialization/Codec.ts:209</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the element with the given ID from <a href="Codec.html#document">document</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>id: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>String that contains the ID.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Element</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getId" class="tsd-anchor"></a><h3>get<wbr/>Id</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Id<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L261">serialization/Codec.ts:261</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the ID of the specified object. This implementation
calls <a href="Codec.html#reference">reference</a> first and if that returns null handles
the object as an <a href="Cell.html">Cell</a> by returning their IDs using
<a href="Cell.html#getId">Cell.getId</a>. If no ID exists for the given cell, then
an on-the-fly ID is generated using <a href="CellPath.html#create">CellPath.create</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>obj: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object to return the ID for.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getObject" class="tsd-anchor"></a><h3>get<wbr/>Object</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Object<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L162">serialization/Codec.ts:162</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the decoded object for the element with the specified ID in
<a href="Codec.html#document">document</a>. If the object is not known then <a href="Codec.html#lookup">lookup</a> is used to find an
object. If no object is found, then the element with the respective ID
from the document is parsed using <a href="Codec.html#decode">decode</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>id: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="insertIntoGraph" class="tsd-anchor"></a><h3>insert<wbr/>Into<wbr/>Graph</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">insert<wbr/>Into<wbr/>Graph<span class="tsd-signature-symbol">(</span>cell<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L460">serialization/Codec.ts:460</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inserts the given cell into its parent and terminal cells.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>cell: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isCellCodec" class="tsd-anchor"></a><h3>is<wbr/>Cell<wbr/>Codec</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Cell<wbr/>Codec<span class="tsd-signature-symbol">(</span>codec<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L403">serialization/Codec.ts:403</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if the given codec is a cell codec. This uses
<a href="CellCodec.html#isCellCodec">CellCodec.isCellCodec</a> to check if the codec is of the
given type.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>codec: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="lookup" class="tsd-anchor"></a><h3>lookup</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">lookup<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L200">serialization/Codec.ts:200</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Hook for subclassers to implement a custom lookup mechanism for cell IDs.
This implementation always returns null.</p>
</div><div><p>Example:</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">codec</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">();</span><br/><span class="hl-0">codec</span><span class="hl-1">.</span><span class="hl-2">lookup</span><span class="hl-1">(</span><span class="hl-0">id</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-5">return</span><span class="hl-1"> </span><span class="hl-0">model</span><span class="hl-1">.</span><span class="hl-2">getCell</span><span class="hl-1">(</span><span class="hl-0">id</span><span class="hl-1">);</span><br/><span class="hl-1">};</span>
</code></pre>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>id: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>ID of the object to be returned.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="putObject" class="tsd-anchor"></a><h3>put<wbr/>Object</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">put<wbr/>Object<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, obj<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L151">serialization/Codec.ts:151</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Assoiates the given object with the given ID and returns the given object.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>id: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>ID for the object to be associated with.</p>
</div></div></li><li><h5>obj: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object to be associated with the ID.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="reference" class="tsd-anchor"></a><h3>reference</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">reference<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L300">serialization/Codec.ts:300</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Hook for subclassers to implement a custom method
for retrieving IDs from objects. This implementation
always returns null.</p>
</div><div><p>Example:</p>
<pre><code class="language-javascript"><span class="hl-3">var</span><span class="hl-1"> </span><span class="hl-0">codec</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-2">Codec</span><span class="hl-1">();</span><br/><span class="hl-0">codec</span><span class="hl-1">.</span><span class="hl-2">reference</span><span class="hl-1">(</span><span class="hl-0">obj</span><span class="hl-1">)</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-5">return</span><span class="hl-1"> </span><span class="hl-0">obj</span><span class="hl-1">.</span><span class="hl-2">getCustomId</span><span class="hl-1">();</span><br/><span class="hl-1">};</span>
</code></pre>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>obj: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object whose ID should be returned.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setAttribute" class="tsd-anchor"></a><h3>set<wbr/>Attribute</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Attribute<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Element</span>, attribute<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L496">serialization/Codec.ts:496</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the attribute on the specified node to value. This is a
helper method that makes sure the attribute and value arguments
are not null.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Element</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>XML node to set the attribute for.</p>
</div></div></li><li><h5>attribute: <span class="tsd-signature-type">string</span></h5></li><li><h5>value: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>New value of the attribute.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="updateElements" class="tsd-anchor"></a><h3>update<wbr/>Elements</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">update<wbr/>Elements<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/serialization/Codec.ts#L219">serialization/Codec.ts:219</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the element with the given ID from <a href="Codec.html#document">document</a>.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/DomHelpers.html">Dom<wbr/>Helpers</a></li><li class=" tsd-kind-namespace"><a href="../modules/cloneUtils.html">clone<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/constants.html">constants</a></li><li class=" tsd-kind-namespace"><a href="../modules/domUtils.html">dom<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/eventUtils.html">event<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/gestureUtils.html">gesture<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/mathUtils.html">math<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/stringUtils.html">string<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/styleUtils.html">style<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/utils.html">utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/xmlUtils.html">xml<wbr/>Utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="Codec.html" class="tsd-kind-icon">Codec</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Codec.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#document" class="tsd-kind-icon">document</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#elements" class="tsd-kind-icon">elements</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#encodeDefaults" class="tsd-kind-icon">encode<wbr/>Defaults</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Codec.html#objects" class="tsd-kind-icon">objects</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#addElement" class="tsd-kind-icon">add<wbr/>Element</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#decode" class="tsd-kind-icon">decode</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#decodeCell" class="tsd-kind-icon">decode<wbr/>Cell</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#encode" class="tsd-kind-icon">encode</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#encodeCell" class="tsd-kind-icon">encode<wbr/>Cell</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#getElementById" class="tsd-kind-icon">get<wbr/>Element<wbr/>By<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#getId" class="tsd-kind-icon">get<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#getObject" class="tsd-kind-icon">get<wbr/>Object</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#insertIntoGraph" class="tsd-kind-icon">insert<wbr/>Into<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#isCellCodec" class="tsd-kind-icon">is<wbr/>Cell<wbr/>Codec</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#lookup" class="tsd-kind-icon">lookup</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#putObject" class="tsd-kind-icon">put<wbr/>Object</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#reference" class="tsd-kind-icon">reference</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#setAttribute" class="tsd-kind-icon">set<wbr/>Attribute</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Codec.html#updateElements" class="tsd-kind-icon">update<wbr/>Elements</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>