Class Documentation

  • All Implemented Interfaces:
    DocumentationProvider
    Direct Known Subclasses:
    Converter, ExtractPyAPIDoc

    public class Documentation
    extends java.lang.Object
    implements DocumentationProvider

    This class is used to manage and retrieve documentation for generated classes.

    Documentation is mainly received from blender source and can be manually extended by additional information. Documentation is stored in external documentation files (see "resources/dnadoc").

    This class parses the documentation files and establishes lookup tables for structs and fields of structs. During the generation of the data model, the class and method generators use this class to lookup available documentation for classes and its members.

    Author:
    homac
    • Field Detail

      • structdocs

        protected java.util.Map<java.lang.String,​StructDoc> structdocs
      • authors

        protected java.lang.String[] authors
      • system

        protected java.lang.String system
      • module

        protected java.lang.String module
      • version

        protected java.lang.String version
      • source

        protected java.lang.String source
      • includePath

        protected java.io.File includePath
    • Constructor Detail

      • Documentation

        public Documentation​(java.io.File docfile,
                             boolean debug)
                      throws java.io.IOException,
                             JSONException
        Throws:
        java.io.IOException
        JSONException
      • Documentation

        public Documentation()
        Creates an empty documentation. Use it for documentation construction only such as in converters.
    • Method Detail

      • getAuthors

        public java.lang.String[] getAuthors()
      • getSystem

        public java.lang.String getSystem()
      • getModule

        public java.lang.String getModule()
      • getVersion

        public java.lang.String getVersion()
      • getStructDoc

        public java.lang.String getStructDoc​(DNAStruct struct)
      • getFieldDoc

        public java.lang.String getFieldDoc​(DNAStruct struct,
                                            DNAField field)
      • getFieldDoc

        public java.lang.String getFieldDoc​(java.lang.String structname,
                                            java.lang.String fieldname)
        Specified by:
        getFieldDoc in interface DocumentationProvider
      • getPath

        public java.lang.String getPath()
      • write

        public void write​(java.io.File out)
                   throws java.io.UnsupportedEncodingException,
                          java.io.IOException
        Throws:
        java.io.UnsupportedEncodingException
        java.io.IOException
      • getSource

        public java.lang.String getSource()
      • getDocFolder

        public static java.io.File getDocFolder​(java.io.File docfolder,
                                                FileVersionInfo versionInfo)