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

<!--
// // See license.txt for license information. // // header.xml // // 30-Jun-2005 phamilton Created //
-->

<filedef name="header">
    <filepath>$(filepath)</filepath>
    <extension>.hpp</extension>
    <root>$(root)</root>
    <ignoreobjects>$(ignoreobjects)</ignoreobjects>
    <blocks>
        <namespace name="namespacestart">
            <context>start</context>
        </namespace>
        <namespace name="namespaceend">
            <context>end</context>
        </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> : public \superclassname</content>
        </text>
        <text name="superclasstypedef">
            <conditions>
                <objecthasmemberequal>
                    <location>parent()</location>
                    <membername>classname</membername>
                    <membervalue/>
                    <fail/>
                </objecthasmemberequal>
            </conditions>
            <content>\(t)typedef \superclassname inherited;\n</content>
        </text>
        <import href="../common/header/abstractmethods.xml"/>
        <import href="../common/header/publicmethods.xml"/>
        <import href="../common/header/privatemethods.xml"/>
        <import href="../common/header/overridemethods.xml"/>
        <import href="../common/header/virtualmethods.xml"/>
        <import href="../common/header/memberincludes.xml"/>
        <import href="../common/header/argincludes.xml"/>
        <forwards name="globalforwards"/>
        <forwards name="localforwards">
            <local/>
        </forwards>
        <includes name="includes">
            <otherclasses>$(ignoreobjects)</otherclasses>
            <otherincludes>$(ignoreincludes)</otherincludes>
            <language>C++</language>
        </includes>
        <foreach name="privatememberdefs">
            <vector>members</vector>
            <blocks>
                <stringmember name="name">
                    <membername>name</membername>
                </stringmember>
<!--
although it loks 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>C++</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>
                <lookupobjectmember name="ptrreftype">
                    <location>root()</location>
                    <lookupmember>reftype</lookupmember>
                    <membername>classname</membername>
                </lookupobjectmember>
                <lookupobjectnamespace name="namespace">
                    <location>root()</location>
                    <lookupmember>reftype</lookupmember>
                </lookupobjectnamespace>
                <text name="type">
                    <conditions>
                        <objecthasmemberequal>
                            <membername>reftype</membername>
                            <membervalue/>
                        </objecthasmemberequal>
                    </conditions>
                    <content>\cpptype </content>
                </text>
                <text name="reftype">
                    <conditions>
                        <objecthasmemberequal>
                            <membername>reftype</membername>
                            <membervalue/>
                            <fail/>
                        </objecthasmemberequal>
                    </conditions>
                    <content>\namespace\ptrreftype *</content>
                </text>
            </blocks>
            <structure>\t\static\type\reftype _\name;\n</structure>
        </foreach>
        <foreach name="constructors">
            <vector>constructors</vector>
            <blocks>
                <import href="../common/arguments.xml"/>
                <text name="object">
                    <content>\t\classname(\arguments)</content>
                </text>
<!--
if there are no init implementations, then the implementation is seperated into the implementation file.
-->

                <text name="seperateimpl">
                    <conditions>
                        <logical_or>
                            <conditions>
                                <objecthasany>
                                    <membername>implementations</membername>
                                    <membertype>emptyconsinitimpl</membertype>
                                </objecthasany>
                                <objecthasany>
                                    <membername>implementations</membername>
                                    <membertype>emptyimplementation</membertype>
                                </objecthasany>
                            </conditions>
                            <fail/>
                        </logical_or>
                    </conditions>
                    <content>;\n</content>
                </text>
<!--
if the implmentation is empty, then output it
-->

                <text name="emptyimpl">
                    <conditions>
                        <logical_or>
                            <conditions>
                                <objecthasany>
                                    <membername>implementations</membername>
                                    <membertype>emptyconsinitimpl</membertype>
                                </objecthasany>
                                <objecthasany>
                                    <membername>implementations</membername>
                                    <membertype>emptyimplementation</membertype>
                                </objecthasany>
                            </conditions>
                        </logical_or>
                    </conditions>
                    <content>\n\t\t{}\n</content>
                </text>
<!--
init implementations start with a colon.
-->

                <text name="assigncolon">
                    <conditions>
                        <objecthasany>
                            <membername>implementations</membername>
                            <membertype>emptyconsinitimpl</membertype>
                        </objecthasany>
                    </conditions>
                    <content> : \n\t\t\t</content>
                </text>
<!--
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>inherited(\constrsuperargs)</content>
                                </text>
<!--
handle all member copies.
-->

                                <forlist name="constrcopymembers">
                                    <conditions>
                                        <objecthasmemberequal>
                                            <membername>type</membername>
                                            <membervalue>constrcopymembers</membervalue>
                                        </objecthasmemberequal>
                                    </conditions>
                                    <listmember>members</listmember>
                                    <blocks>
                                        <text name="comma">
                                            <conditions>
                                                <islast>
                                                    <fail/>
                                                </islast>
                                            </conditions>
                                            <content>, \n\t\t\t</content>
                                        </text>
                                    </blocks>
                                    <structure>_\item(\item)\comma</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>
                                    <blocks>
                                        <text name="comma">
                                            <conditions>
                                                <islast>
                                                    <fail/>
                                                </islast>
                                            </conditions>
                                            <content>, \n\t\t\t</content>
                                        </text>
                                    </blocks>
                                    <structure>_\item(\ptrmember->_\item)\comma</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>_\membername(\value)</content>
                                </text>
                                <text name="comma">
                                    <conditions>
                                        <islast>
                                            <fail/>
                                        </islast>
                                    </conditions>
                                    <content>, \n\t\t\t</content>
                                </text>
                            </blocks>
                            <structure>\constrsuper\constrcopymembers\constrcopyptrmembers\constrassignmember\comma</structure>
                        </foreach>
                    </blocks>
                    <structure>\initialise</structure>
                </foreach>
            </blocks>
            <structure>\object\seperateimpl\assigncolon\emptyconsinitimpl\emptyimpl</structure>
        </foreach>
        <foreach name="destructors">
            <vector>destruct</vector>
            <blocks>
                <text name="virtual">
                    <conditions>
                        <objecthasmemberequal>
                            <membername>virtual</membername>
                            <membervalue>true</membervalue>
                        </objecthasmemberequal>
                    </conditions>
                    <content>virtual </content>
                </text>
<!--
if there are no init implementations, then the implementation is seperated into the implementation file.
-->

                <text name="seperateimpl">
                    <conditions>
                        <objecthasany>
                            <membername>implementations</membername>
                            <membertype>emptyimplementation</membertype>
                            <fail/>
                        </objecthasany>
                    </conditions>
                    <content>;\n</content>
                </text>
<!--
if there are no init implementations, then the implementation is seperated into the implementation file.
-->

                <text name="emptyimplementation">
                    <conditions>
                        <objecthasany>
                            <membername>implementations</membername>
                            <membertype>emptyimplementation</membertype>
                        </objecthasany>
                    </conditions>
                    <content> {}\n</content>
                </text>
            </blocks>
            <structure>\t\virtual~\classname()\emptyimplementation\seperateimpl</structure>
        </foreach>
    </blocks>
    <structure>\comment=on See license.txt for license information. \(classname).hpp Generated by tangle. Edit at your own risk! \comment=off #ifndef inc\uppercase=on\classname\uppercase=off #define inc\uppercase=on\classname\uppercase=off \includes \memberincludes \argincludes \globalforwards \namespacestart \localforwards class \classname \superclassdecl { protected: \superclasstypedef public: \constructors \destructors \abstractmethods \publicmethods \overridemethods \virtualmethods private: \privatememberdefs \privatemethods }; \namespaceend #endif // inc\uppercase=on\classname\uppercase=off </structure>
</filedef>