<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!--
// // See license.txt for license information. // // impl.xml // // 31-Jan-2006 phamilton Created //
-->

<filedef name="impl">
    <filepath>$(filepath)</filepath>
    <extension>.java</extension>
    <root>$(root)</root>
    <ignoreobjects>$(ignoreobjects)</ignoreobjects>
    <blocks>
        <namespace name="namespace">
            <language>Java</language>
        </namespace>
        <date name="date">
            <format>%e-%b-%Y</format>
        </date>
        <stringmember name="classname">
            <membername>classname</membername>
        </stringmember>
        <stringmember name="superclassname">
            <location>parent()</location>
            <membername>classname</membername>
        </stringmember>
        <text name="superclassdecl">
            <conditions>
                <objecthasmemberequal>
                    <location>parent()</location>
                    <membername>classname</membername>
                    <membervalue/>
                    <fail/>
                </objecthasmemberequal>
            </conditions>
            <content> extends \superclassname</content>
        </text>
        <import href="../common/abstractmethods.xml"/>
        <import href="../common/methods.xml"/>
        <import href="../common/overridemethods.xml">
            <param name="priv" value="protected"/>
        </import>
        <foreach name="constructors">
            <vector>constructors</vector>
            <blocks>
                <import href="../common/arguments.xml"/>
<!--
Handle an empty constructor implmentation.
-->

                <foreach name="emptyconsinitimpl">
                    <vector>implementations</vector>
                    <blocks>
                        <foreach name="initialise">
                            <vector>initialise</vector>
                            <conditions>
                                <objecthasmemberequal>
                                    <membername>type</membername>
                                    <membervalue>emptyconsinitimpl</membervalue>
                                </objecthasmemberequal>
                            </conditions>
                            <blocks>
<!--
handle all super initialisations.
-->

                                <forlist name="constrsuperargs">
                                    <conditions>
                                        <objecthasmemberequal>
                                            <membername>type</membername>
                                            <membervalue>constrsuper</membervalue>
                                        </objecthasmemberequal>
                                    </conditions>
                                    <listmember>members</listmember>
                                    <blocks>
                                        <text name="comma">
                                            <conditions>
                                                <islast>
                                                    <fail/>
                                                </islast>
                                            </conditions>
                                            <content>, </content>
                                        </text>
                                    </blocks>
                                    <structure>\item\comma</structure>
                                </forlist>
                                <text name="constrsuper">
                                    <conditions>
                                        <objecthasmemberequal>
                                            <membername>type</membername>
                                            <membervalue>constrsuper</membervalue>
                                        </objecthasmemberequal>
                                    </conditions>
                                    <content>super(\constrsuperargs)</content>
                                </text>
<!--
handle all member copies.
-->

                                <forlist name="constrcopymembers">
                                    <conditions>
                                        <objecthasmemberequal>
                                            <membername>type</membername>
                                            <membervalue>constrcopymembers</membervalue>
                                        </objecthasmemberequal>
                                    </conditions>
                                    <listmember>members</listmember>
                                    <structure>\t\(t)this._\item = \item;\n</structure>
                                </forlist>
<!--
handle all member copies from pointers.
-->

                                <stringmember name="ptrmember">
                                    <membername>ptr</membername>
                                </stringmember>
                                <forlist name="constrcopyptrmembers">
                                    <conditions>
                                        <objecthasmemberequal>
                                            <membername>type</membername>
                                            <membervalue>constrcopyptrmembers</membervalue>
                                        </objecthasmemberequal>
                                    </conditions>
                                    <listmember>members</listmember>
                                    <structure>\t\(t)this._\item = \ptrmember._\item;\n</structure>
                                </forlist>
<!--
hande all straight assignments
-->

                                <stringmember name="membername">
                                    <membername>member</membername>
                                </stringmember>
                                <stringmember name="value">
                                    <membername>value</membername>
                                </stringmember>
                                <text name="constrassignmember">
                                    <conditions>
                                        <objecthasmemberequal>
                                            <membername>type</membername>
                                            <membervalue>constrassignmember</membervalue>
                                        </objecthasmemberequal>
                                    </conditions>
                                    <content>\t\(t)this._\membername = \value;\n</content>
                                </text>
                            </blocks>
                            <structure>\constrsuper\constrcopymembers\constrcopyptrmembers\constrassignmember</structure>
                        </foreach>
                    </blocks>
                    <structure>\initialise</structure>
                </foreach>
            </blocks>
            <structure>public \classname(\arguments)\n{\n\emptyconsinitimpl\n}\n</structure>
        </foreach>
        <foreach name="memberdefs">
            <vector>members</vector>
            <blocks>
                <stringmember name="membername">
                    <membername>name</membername>
                </stringmember>
                <lookupobjectmember name="classname">
                    <location>root()</location>
                    <lookupmember>reftype</lookupmember>
                    <membername>classname</membername>
                </lookupobjectmember>
<!--
although it looks like this block isn't used, it's actually used by some implfields below so we need it here.
-->

                <lookupobjectmember name="enumeration">
                    <location>root()</location>
                    <lookupmember>enumeration</lookupmember>
                    <membername>classname</membername>
                </lookupobjectmember>
                <typeimplfield name="cpptype">
                    <language>Java</language>
                    <field>typedecl</field>
                </typeimplfield>
                <text name="static">
                    <conditions>
                        <vectorhasany>
                            <vector>attributes</vector>
                            <condition>
                                <objecthasmemberequal>
                                    <membername>name</membername>
                                    <membervalue>global</membervalue>
                                </objecthasmemberequal>
                            </condition>
                        </vectorhasany>
                    </conditions>
                    <content>static </content>
                </text>
            </blocks>
            <structure>\t\(static)protected \cpptype _\membername;\n</structure>
        </foreach>
        <text name="abstract">
            <conditions>
                <isabstract/>
            </conditions>
            <content>abstract </content>
        </text>
    </blocks>
    <structure>\comment=on See license.txt for license information. \(classname).java Generated by tangle. Edit at your own risk! \comment=off package \namespace; public \(abstract)class \classname \superclassdecl { \memberdefs \constructors \abstractmethods \methods \overridemethods } </structure>
</filedef>