src/aria/templates/ClassGenerator.js
function (arg) {
            var out = arg.out;
            var statement = arg.statement;

            // Add dependencies specified explicitly in the template declaration
            this._processDependencies(out);

            this._createBlocks(out);
            this._processInheritance(out);
            this._processScript(out);

            out.enterBlock("main");
            out.writeln("var Aria = require('ariatemplates/Aria');");
            out.leaveBlock();

            out.enterBlock("classDefinition");
            this._writeClassDefHeaders(out);
            this._writeConstructor(out);
            this._writeDestructor(out);
            out.leaveBlock();

            // main part of the processing (process the whole template):
            out.processContent(statement.content);

            if (out.errors) {
                out.$dispose();
                this.$callback(out.callback, {
                    classDef : null,
                    errors : out.errors
                });
                // in case of synchronous call, the following line prevents a second call of the callback
                // to report the error
                out.errors = false;
                return;
            }

            out.enterBlock("prototype");
            this._writeClassInit(out);
            this._writeInitTemplate(out);
            out.leaveBlock();

            out.enterBlock("classDefinition");
            this._writeDependencies(out);
            this._writeClassDefEnd(out);
            out.leaveBlock();

            out.enterBlock("main");
            out.writeDependencies();
            out.write(out.getBlockContent("classDefinition"));
            out.leaveBlock();

            out.tree.properties = {
                macros: out.macros,
                views: out.views,
                wlibs: out.wlibs
            };
            var res = null;
            res = out.getBlockContent("main");
            out.$dispose();
            this.$callback(out.callback, {
                classDef : res,
                logicalPath : Aria.getLogicalPath(out.templateParam.$classpath, Aria.ACCEPTED_TYPES[this._classType]),
                tree : out.tree,
                debug : out.debug
            });
        }
function (arg) {
            var out = arg.out;
            var statement = arg.statement;

            // Add dependencies specified explicitly in the template declaration
            this._processDependencies(out);

            this._createBlocks(out);
            this._processInheritance(out);
            this._processScript(out);

            out.enterBlock("main");
            out.writeln("var Aria = require('ariatemplates/Aria');");
            out.leaveBlock();

            out.enterBlock("classDefinition");
            this._writeClassDefHeaders(out);
            this._writeConstructor(out);
            this._writeDestructor(out);
            out.leaveBlock();

            // main part of the processing (process the whole template):
            out.processContent(statement.content);

            if (out.errors) {
                out.$dispose();
                this.$callback(out.callback, {
                    classDef : null,
                    errors : out.errors
                });
                // in case of synchronous call, the following line prevents a second call of the callback
                // to report the error
                out.errors = false;
                return;
            }

            out.enterBlock("prototype");
            this._writeClassInit(out);
            this._writeInitTemplate(out);
            out.leaveBlock();

            out.enterBlock("classDefinition");
            this._writeDependencies(out);
            this._writeClassDefEnd(out);
            out.leaveBlock();

            out.enterBlock("main");
            out.writeDependencies();
            out.write(out.getBlockContent("classDefinition"));
            out.leaveBlock();

            out.tree.properties = {
                macros: out.macros,
                views: out.views,
                wlibs: out.wlibs
            };
            var res = null;
            res = out.getBlockContent("main");
            out.$dispose();
            this.$callback(out.callback, {
                classDef : res,
                logicalPath : Aria.getLogicalPath(out.templateParam.$classpath, Aria.ACCEPTED_TYPES[this._classType]),
                tree : out.tree,
                debug : out.debug
            });
        }
function ( arg ) { var out = arg . out ; var statement = arg . statement ; // Add dependencies specified explicitly in the template declaration this . _processDependencies ( out ) ; this . _createBlocks ( out ) ; this . _processInheritance ( out ) ; this . _processScript ( out ) ; out . enterBlock ( "main" ) ; out . writeln ( "var Aria = require('ariatemplates/Aria');" ) ; out . leaveBlock ( ) ; out . enterBlock ( "classDefinition" ) ; this . _writeClassDefHeaders ( out ) ; this . _writeConstructor ( out ) ; this . _writeDestructor ( out ) ; out . leaveBlock ( ) ; // main part of the processing (process the whole template): out . processContent ( statement . content ) ; if ( out . errors ) { out . $dispose ( ) ; this . $callback ( out . callback , { classDef : null , errors : out . errors } ) ; // in case of synchronous call, the following line prevents a second call of the callback // to report the error out . errors = false ; return ; } out . enterBlock ( "prototype" ) ; this . _writeClassInit ( out ) ; this . _writeInitTemplate ( out ) ; out . leaveBlock ( ) ; out . enterBlock ( "classDefinition" ) ; this . _writeDependencies ( out ) ; this . _writeClassDefEnd ( out ) ; out . leaveBlock ( ) ; out . enterBlock ( "main" ) ; out . writeDependencies ( ) ; out . write ( out . getBlockContent ( "classDefinition" ) ) ; out . leaveBlock ( ) ; out . tree . properties = { macros : out . macros , views : out . views , wlibs : out . wlibs } ; var res = null ; res = out . getBlockContent ( "main" ) ; out . $dispose ( ) ; this . $callback ( out . callback , { classDef : res , logicalPath : Aria . getLogicalPath ( out . templateParam . $classpath , Aria . ACCEPTED_TYPES [ this . _classType ] ) , tree : out . tree , debug : out . debug } ) ; }
Process template content. This method is called from _processRootStatement.
@param {Object} Process template content properties (contains out and statement objects).
@protected
Process template content . This method is called from _processRootStatement .