func init // save original blocks sys.all_blocks_store() // defines destructor body event("onBody") // create a blocks of the element sys.create_blocks() // defines comments arr.clear() if(not isdef("Comment")) arr = this.props("Comment").value if(arr.size()) for(i = 0; i < arr.size(); i++) this._blk.println('/// ', code(arr.get(i))) end end end // defines attributes if(not isdef("Attributes")) arr = this.props("Attributes").value attr = code(arr.join(',')) this._blk.println('[', attr, ']') end // declares destructor this._blk.println('~', code(this.parent.get_parent_sdk().cName), '()') .println('{').inc() sys.copy_blocks() this._blk.dec().println('}') // restore original blocks sys.all_blocks_restore() // cleanup arr.clear() end