SNRK-70: documentation is added
This commit is contained in:
parent
3c2ffb572b
commit
417d90b842
@ -2,20 +2,43 @@ package documentBuilder
|
|||||||
|
|
||||||
typealias FileName = String
|
typealias FileName = String
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Node of dependency graph.
|
||||||
|
*
|
||||||
|
* One node represents one file and its dependencies
|
||||||
|
*
|
||||||
|
* @property mdAst - AST tree of current file.
|
||||||
|
* @property dependencies - list of tail end adjacent to this node (dependencies of current file to be resolved).
|
||||||
|
*/
|
||||||
|
data class DependencyGraphNode(
|
||||||
|
val mdAst: MdAstRoot,
|
||||||
|
val dependencies: List<DependencyGraphEdge>
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface of all dependency edges.
|
||||||
|
*/
|
||||||
sealed interface DependencyGraphEdge {
|
sealed interface DependencyGraphEdge {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Include dependency edge.
|
||||||
|
*
|
||||||
|
* @property parentNode - node inside AST tree, that is parent for dependent node.
|
||||||
|
* @property dependentNode - iterator to a dependent node, i.e. node of part of document with include commands
|
||||||
|
* @property includeList - list of files to be included.
|
||||||
|
*/
|
||||||
data class IncludeDependency(
|
data class IncludeDependency(
|
||||||
val parentNode: MdAstParent,
|
val parentNode: MdAstParent,
|
||||||
val dependentNode: Iterator<MdAstElement>,
|
val dependentNode: Iterator<MdAstElement>,
|
||||||
val includeList: List<FileName>
|
val includeList: List<FileName>
|
||||||
) : DependencyGraphEdge
|
) : DependencyGraphEdge
|
||||||
|
|
||||||
data class DependencyGraphNode(
|
/**
|
||||||
val mdAst: MdAstRoot,
|
* Whole dependency graph.
|
||||||
val dependencies: List<DependencyGraphEdge>
|
*
|
||||||
)
|
* @property nodes - map of nodes, where you can find DependencyGraphNode of file by its name.
|
||||||
|
*/
|
||||||
data class DependencyGraph(
|
data class DependencyGraph(
|
||||||
val nodes: Map<FileName, DependencyGraphNode>
|
val nodes: Map<FileName, DependencyGraphNode>
|
||||||
)
|
)
|
Loading…
Reference in New Issue
Block a user