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.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
authors |
protected java.io.File |
includePath |
protected java.lang.String |
module |
protected java.lang.String |
source |
protected JSONObject |
structdocs |
protected java.lang.String |
system |
protected java.lang.String |
version |
Constructor and Description |
---|
Documentation()
creates an empty documentation.
|
Documentation(java.io.File docfile,
boolean debug) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getAuthors() |
static java.io.File |
getDocFolder(java.io.File docfolder,
FileVersionInfo versionInfo) |
java.lang.String |
getFieldDoc(DNAStruct struct,
DNAField field) |
java.lang.String |
getFieldDoc(java.lang.String structname,
java.lang.String fieldname) |
java.lang.String |
getModule() |
java.lang.String |
getPath() |
java.lang.String |
getSource() |
java.lang.String |
getStructDoc(DNAStruct struct) |
java.lang.String |
getStructDoc(java.lang.String structname) |
java.lang.String |
getSystem() |
java.lang.String |
getVersion() |
void |
write(java.io.File out) |
protected JSONObject structdocs
protected java.lang.String[] authors
protected java.lang.String system
protected java.lang.String module
protected java.lang.String version
protected java.lang.String source
protected java.io.File includePath
public Documentation(java.io.File docfile, boolean debug) throws java.io.IOException, JSONException
java.io.IOException
JSONException
public Documentation()
public java.lang.String[] getAuthors()
public java.lang.String getSystem()
public java.lang.String getModule()
public java.lang.String getVersion()
public java.lang.String getStructDoc(DNAStruct struct)
public java.lang.String getStructDoc(java.lang.String structname)
getStructDoc
in interface DocumentationProvider
public java.lang.String getFieldDoc(java.lang.String structname, java.lang.String fieldname)
getFieldDoc
in interface DocumentationProvider
public java.lang.String getPath()
public void write(java.io.File out) throws java.io.UnsupportedEncodingException, java.io.IOException
java.io.UnsupportedEncodingException
java.io.IOException
public java.lang.String getSource()
public static java.io.File getDocFolder(java.io.File docfolder, FileVersionInfo versionInfo)