-------------------------------------------------------------------------------- -- Copyright (c) 2012-2014 Sierra Wireless. -- All rights reserved. This program and the accompanying materials -- are made available under the terms of the Eclipse Public License v1.0 -- which accompanies this distribution, and is available at -- http://www.eclipse.org/legal/epl-v10.html -- -- Contributors: -- Kevin KIN-FOO -- - initial API and implementation and initial documentation -------------------------------------------------------------------------------- return[[#
# -- # -- Module name # -- # if _file.name then Module $(_file.name) # end # -- # -- Descriptions # -- # if _file.shortdescription then $( format(_file.shortdescription) ) # end # if _file.description and #_file.description > 0 then $( format(_file.description) ) # end # -- # -- Handle "@usage" special tag # -- #if _file.metadata and _file.metadata.usage then $( applytemplate(_file.metadata.usage, i+1) ) #end # -- # -- Show quick description of current type # -- # # -- show quick description for globals # if not isempty(_file.globalvars) then Global(s) # for _, item in sortedpairs(_file.globalvars) do # end
$( fulllinkto(item) ) $( format(item.shortdescription) )
# end # # -- get type corresponding to this file (module) # local currenttype # local typeref = _file:moduletyperef() # if typeref and typeref.tag == "internaltyperef" then # local typedef = _file.types[typeref.typename] # if typedef and typedef.tag == "recordtypedef" then # currenttype = typedef # end # end # # -- show quick description type exposed by module # if currenttype and not isempty(currenttype.fields) then Type $(currenttype.name) $( applytemplate(currenttype, i+2, 'index') ) # end # -- # -- Show quick description of other types # -- # if _file.types then # for name, type in sortedpairs( _file.types ) do # if type ~= currenttype and type.tag == 'recordtypedef' and not isempty(type.fields) then Type $(name) $( applytemplate(type, i+2, 'index') ) # end # end # end # -- # -- Long description of globals # -- # if not isempty(_file.globalvars) then Global(s) # for name, item in sortedpairs(_file.globalvars) do $( applytemplate(item, i+2) ) # end # end # -- # -- Long description of current type # -- # if currenttype then Type $(currenttype.name) $( applytemplate(currenttype, i+2) ) # end # -- # -- Long description of other types # -- # if not isempty( _file.types ) then # for name, type in sortedpairs( _file.types ) do # if type ~= currenttype and type.tag == 'recordtypedef' then Type $(name) $( applytemplate(type, i+2) ) # end # end # end
]]