Package-level declarations

Types

Link copied to clipboard
data class ExistingAndExpectedNode(val existingNode: INode, val expectedNodeData: ModelData)
Link copied to clipboard

A node association is responsible for storing the mapping between a source node and the imported target node. Provides efficient lookup of the mapping from previous synchronization runs.

Link copied to clipboard
class InvalidatingVisitor(val tree: ITree, val invalidationTree: InvalidationTree) : ITreeChangeVisitorEx

Visitor that visits a tree and stores the invalidation information in an invalidationTree.

Link copied to clipboard

The purpose of this data structure is to store which nodes changed and need to be synchronized, but limit the memory consumption via the sizeLimit, which determines the maximum number of nodes in a subtree.

Link copied to clipboard
expect class ModelExporter(root: INode)

A ModelExporter exports a node and its subtree in bulk.

actual class ModelExporter(root: INode)
actual class ModelExporter(root: INode)
Link copied to clipboard
class ModelImporter(root: INode, continueOnError: Boolean, childFilter: (INode) -> Boolean = { true })

A ModelImporter updates an existing INode and its subtree based on a ModelData specification.

Link copied to clipboard
class ModelSynchronizer(val filter: ModelSynchronizer.IFilter, val sourceRoot: INode, val targetRoot: INode, val nodeAssociation: INodeAssociation)

Similar to ModelImporter, but the input is two INode instances instead of INode and NodeData.

Link copied to clipboard
class ProgressReporter(total: ULong, logger: KLogger, print: (line: String) -> Unit = ::println, isTty: () -> Boolean = ::isTty)

Functions

Link copied to clipboard

Returns a NodeData representation of the receiver node as it would be exported by a ModelExporter. This function is recursively called on the node's children.

Link copied to clipboard
@JvmName(name = "importFile")
fun ModelImporter.import(jsonFile: File)

Incrementally updates the root of the receiver ModelImporter based on the ModelData specification contained in the given file.

Link copied to clipboard
fun isModuleIncluded(moduleName: String, includedModules: Collection<String>, includedPrefixes: Collection<String>): Boolean

Checks if a module is included in the sync.

Link copied to clipboard
expect fun isTty(): Boolean
actual fun isTty(): Boolean
actual fun isTty(): Boolean
Link copied to clipboard