<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxModelCodec"></a>mxModelCodec</h1><divclass=CBody><p>Codec for <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link7onMouseOver="ShowTip(event, 'tt1', 'link7')"onMouseOut="HideTip('tt1')">mxGraphModel</a>s. This class is created and registered dynamically at load time and used implicitely via <ahref="mxCodec-js.html#mxCodec"class=LClassid=link8onMouseOver="ShowTip(event, 'tt6', 'link8')"onMouseOut="HideTip('tt6')">mxCodec</a> and the <ahref="mxCodecRegistry-js.html#mxCodecRegistry"class=LClassid=link9onMouseOver="ShowTip(event, 'tt7', 'link9')"onMouseOut="HideTip('tt7')">mxCodecRegistry</a>.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxModelCodec">mxModelCodec</a></td><tdclass=SDescription>Codec for <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxGraphModel</a>s. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxModelCodec.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxModelCodec.encodeObject"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">encodeObject</a></td><tdclass=SDescription>Encodes the given <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link3onMouseOver="ShowTip(event, 'tt1', 'link3')"onMouseOut="HideTip('tt1')">mxGraphModel</a> by writing a (flat) XML sequence of cell nodes as produced by the <ahref="mxCellCodec-js.html#mxCellCodec"class=LClassid=link4onMouseOver="ShowTip(event, 'tt3', 'link4')"onMouseOut="HideTip('tt3')">mxCellCodec</a>. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxModelCodec.decodeChild"id=link5onMouseOver="ShowTip(event, 'tt4', 'link5')"onMouseOut="HideTip('tt4')">decodeChild</a></td><tdclass=SDescription>Overrides decode child to handle special child nodes.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxModelCodec.decodeRoot"id=link6onMouseOver="ShowTip(event, 'tt5', 'link6')"onMouseOut="HideTip('tt5')">decodeRoot</a></td><tdclass=SDescription>Reads the cells into the graph model. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxModelCodec.encodeObject"></a>encodeObject</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.encodeObject = function(</td><tdclass=PParameternowrap>enc,</td></tr><tr><td></td><tdclass=PParameternowrap>obj,</td></tr><tr><td></td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Encodes the given <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link10onMouseOver="ShowTip(event, 'tt1', 'link10')"onMouseOut="HideTip('tt1')">mxGraphModel</a> by writing a (flat) XML sequence of cell nodes as produced by the <ahref="mxCellCodec-js.html#mxCellCodec"class=LClassid=link11onMouseOver="ShowTip(event, 'tt3', 'link11')"onMouseOut="HideTip('tt3')">mxCellCodec</a>. The sequence is wrapped-up in a node with the name root.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxModelCodec.decodeChild"></a>decodeChild</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.decodeChild = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>child,</td></tr><tr><td></td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Overrides decode child to handle special child nodes.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxModelCodec.decodeRoot"></a>decodeRoot</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.decodeRoot = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>root,</td></tr><tr><td></td><tdclass=PParameternowrap>model</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Reads the cells into the graph model. All cells are children of the root element in the node.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CClass>Extends mxEventSource to implement a graph model. </div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.encodeObject = function(</td><tdclass=PParameternowrap>enc,</td></tr><tr><td></td><tdclass=PParameternowrap>obj,</td></tr><tr><td></td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Encodes the given mxGraphModel by writing a (flat) XML sequence of cell nodes as produced by the mxCellCodec. </div></div><divclass=CToolTipid="tt3"><divclass=CClass>Codec for mxCells. </div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.decodeChild = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>child,</td></tr><tr><td></td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Overrides decode child to handle special child nodes.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.decodeRoot = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>root,</td></tr><tr><td></td><tdclass=PParameternowrap>model</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Reads the cells into the graph model. </div></div><divclass=CToolTipid="tt6"><divclass=CClass>XML codec for JavaScript object graphs. </div></div><divclass=CToolTipid="tt7"><divclass=CClass>Singleton class that acts as a global registry for codecs.</div></div><!--END_ND_TOOLTIPS-->