:template
/* # @(#) /47 1.5 12/19/95 14:49:37 [7/30/96 15:08:21] */

/*
 *   COMPONENT_NAME: some
 *
 *   ORIGINS: 27
 *
 *
 *   10H9767, 25H7912  (C) COPYRIGHT International Business Machines Corp. 1992,1996 
 *   All Rights Reserved
 *   Licensed Materials - Property of IBM
 *   US Government Users Restricted Rights - Use, duplication or
 *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 */

/*
 *         File:    <classSourceFileStem>.<cppext>
 *       Author:    SOMObjects Emitter Framework.
 *     Contents:    Generic framework implementation for <className>.
 *         Date:    <timeStamp>.
 */

#define <className>_Class_Source
#include "<classSourceFileStem>.xih"

SOM_Scope boolean  SOMLINK somtGenerateSections(<className> *somSelf)
{
    /* <className>Data *somThis = <className>GetData(somSelf); */
    SOMTClassEntryC *cls = somSelf->_get_somtTargetClass();
    SOMTTemplateOutputC *templte = somSelf->_get_somtTemplate();
    <className>MethodDebug("<className>","somtGenerateSections");

    /*
     * Setup symbols that are common to the whole file 
     */
    somSelf->somtFileSymbols();

    somSelf->somtEmitProlog();

    if (cls != (SOMTClassEntryC *) NULL) {
        somSelf->somtScanBases(
                       "somtEmitBaseIncludesProlog",
                       "somtEmitBaseIncludes",
                       "somtEmitBaseIncludesEpilog");

        somSelf->somtEmitMetaInclude();

        somSelf->somtEmitClass();

        somSelf->somtScanBases(
                       "somtEmitBaseProlog",
                       "somtEmitBase",
                       "somtEmitBaseEpilog");

        somSelf->somtEmitMeta();
    }
    somSelf->somtScanConstants("somtEmitConstantProlog",
                      "somtEmitConstant", "somtEmitConstantEpilog");

    somSelf->somtScanTypedefs("somtEmitTypedefProlog",
                      "somtEmitTypedef", "somtEmitTypedefEpilog");

    somSelf->somtScanStructs("somtEmitStructProlog",
                     "somtEmitStruct", "somtEmitStructEpilog");

    somSelf->somtScanUnions("somtEmitUnionProlog",
                    "somtEmitUnion", "somtEmitUnionEpilog");

    somSelf->somtScanEnums("somtEmitEnumProlog",
                   "somtEmitEnum", "somtEmitEnumEpilog");

    if (cls != (SOMTClassEntryC *) NULL) {
        somSelf->somtScanAttributes("somtEmitAttributeProlog",
                            "somtEmitAttribute", "somtEmitAttributeEpilog");

        somSelf->somtScanMethods(
                         "somtImplemented",
                         "somtEmitMethodsProlog",
                         "somtEmitMethod",
                         "somtEmitMethodsEpilog",
                         FALSE);

        somSelf->somtEmitRelease();

        somSelf->somtScanPassthru(TRUE,
                          "somtEmitPassthruProlog",
                          "somtEmitPassthru",
                          "somtEmitPassthruEpilog");

        somSelf->somtScanPassthru(FALSE,
                          "somtEmitPassthruProlog",
                          "somtEmitPassthru",
                          "somtEmitPassthruEpilog");

        somSelf->somtScanData(
                      "somtEmitDataProlog",
                      "somtEmitData",
                      "somtEmitDataEpilog");
    }

    if (somSelf->_get_somtTargetModule() != (SOMTModuleEntryC *) NULL) {

        somSelf->somtScanInterfaces("somtEmitInterfaceProlog",
                            "somtEmitInterface", "somtEmitInterfaceEpilog");

        somSelf->somtScanModules("somtEmitModuleProlog",
                         "somtEmitModule", "somtEmitModuleEpilog");
    }

    somSelf->somtEmitEpilog();

    return (TRUE);
}
