Package org.cakelab.blender.doc
Class Documentation
- java.lang.Object
-
- org.cakelab.blender.doc.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 Summary
Fields Modifier and Type Field Description protected java.lang.String[]
authors
protected java.io.File
includePath
protected java.lang.String
module
protected java.lang.String
source
protected java.util.Map<java.lang.String,StructDoc>
structdocs
protected java.lang.String
system
protected java.lang.String
version
-
Constructor Summary
Constructors Constructor Description Documentation()
Creates an empty documentation.Documentation(java.io.File docfile, boolean debug)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getAuthors()
static java.io.File
getDocFolder(java.io.File docfolder, FileVersionInfo versionInfo)
java.lang.String
getFieldDoc(java.lang.String structname, java.lang.String fieldname)
java.lang.String
getFieldDoc(DNAStruct struct, DNAField field)
java.lang.String
getModule()
java.lang.String
getPath()
java.lang.String
getSource()
java.lang.String
getStructDoc(java.lang.String structname)
java.lang.String
getStructDoc(DNAStruct struct)
java.lang.String
getSystem()
java.lang.String
getVersion()
void
write(java.io.File out)
-
-
-
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)
-
getStructDoc
public java.lang.String getStructDoc(java.lang.String structname)
- Specified by:
getStructDoc
in interfaceDocumentationProvider
-
getFieldDoc
public java.lang.String getFieldDoc(java.lang.String structname, java.lang.String fieldname)
- Specified by:
getFieldDoc
in interfaceDocumentationProvider
-
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)
-
-