<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxChildChangeCodec"></a>mxChildChangeCodec</h1><divclass=CBody><p>Codec for <ahref="../model/mxGraphModel-js.html#mxChildChange"class=LClassid=link6onMouseOver="ShowTip(event, 'tt1', 'link6')"onMouseOut="HideTip('tt1')">mxChildChange</a>s. This class is created and registered dynamically at load time and used implicitely via <ahref="mxCodec-js.html#mxCodec"class=LClassid=link7onMouseOver="ShowTip(event, 'tt6', 'link7')"onMouseOut="HideTip('tt6')">mxCodec</a> and the <ahref="mxCodecRegistry-js.html#mxCodecRegistry"class=LClassid=link8onMouseOver="ShowTip(event, 'tt7', 'link8')"onMouseOut="HideTip('tt7')">mxCodecRegistry</a>.</p><h4class=CHeading>Transient Fields</h4><ul><li>model</li><li>previous</li><li>previousIndex</li><li>child</li></ul><h4class=CHeading>Reference Fields</h4><ul><li>parent</li></ul><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxChildChangeCodec">mxChildChangeCodec</a></td><tdclass=SDescription>Codec for <ahref="../model/mxGraphModel-js.html#mxChildChange"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxChildChange</a>s. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxChildChangeCodec.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxChildChangeCodec.isReference"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">isReference</a></td><tdclass=SDescription>Returns true for the child attribute if the child cell had a previous parent or if we’re reading the child as an attribute rather than a child node, in which case it’s always a reference.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxChildChangeCodec.afterEncode"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">afterEncode</a></td><tdclass=SDescription>Encodes the child recusively and adds the result to the given node.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxChildChangeCodec.beforeDecode"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">beforeDecode</a></td><tdclass=SDescription>Decodes the any child nodes as using the respective codec from the registry.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxChildChangeCodec.afterDecode"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">afterDecode</a></td><tdclass=SDescription>Restores object state in the child change.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxChildChangeCodec.isReference"></a>isReference</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.isReference = function(</td><tdclass=PParameternowrap>obj,</td></tr><tr><td></td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>value,</td></tr><tr><td></td><tdclass=PParameternowrap>isWrite</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true for the child attribute if the child cell had a previous parent or if we’re reading the child as an attribute rather than a child node, in which case it’s always a reference.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxChildChangeCodec.afterEncode"></a>afterEncode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.afterEncode = 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 child recusively and adds the result to the given node.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxChildChangeCodec.beforeDecode"></a>beforeDecode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.beforeDecode = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Decodes the any child nodes as using the respective codec from the registry.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxChildChangeCodec.afterDecode"></a>afterDecode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.afterDecode = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Restores object state in the child change.</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>Action to add or remove a child in a 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.isReference = function(</td><tdclass=PParameternowrap>obj,</td></tr><tr><td></td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>value,</td></tr><tr><td></td><tdclass=PParameternowrap>isWrite</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns true for the child attribute if the child cell had a previous parent or if we’re reading the child as an attribute rather than a child node, in which case it’s always a reference.</div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.afterEncode = 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 child recusively and adds the result to the given node.</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.beforeDecode = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Decodes the any child nodes as using the respective codec from the registry.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>codec.afterDecode = function(</td><tdclass=PParameternowrap>dec,</td></tr><tr><td></td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>obj</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Restores object state in the child change.</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-->