BaseConfigObject is an abstract class for classes that save some sort of configuration, settings or similar to disk. It handles periodic saving (if there're changes).
Task is the base class for all tasks, it contains information about the state of the task (started/running/finished/success/failure), error message, status message etc., including related signals. Other tasks will inherit from this, and implement at least the pure virtual run() method.
GroupedTask is a task that consists of several subtasks. When run, all subtasks will be executed, with a specified number of them run concurrently.
A ThreadTask wraps a normal Task
, and runs it in a separate thread.
ProgressDialog and ProgressWidget take a Task
and show information about it using a label and a progress bar.
JavaLaunchTask has a launch script (think the launch script in MultiMC)
MinecraftAuthTask is the task generated from a MinecraftAuthComponent
, which does the actual work.
FileCache handles the application-global file cache, for caching of downloads etc. It provides getters/setters for FileCache::Entrys, which in turn contain information about the file stored. Entries are references by a group and an id, the group could be "factorio/archives", and the id "0.10.5.zip". The FileCache
also handles invalidation of cache entries.
NetworkTask is an abstract Task
that handles connecting QNetworkReply signals to the ones of the Task. It also handles redirects etc.
RawDownloadTask is a task that downloads something and yields the result as a raw byte array.
CachedDownloadTask also downloads a single file, but stores it to disk and registers it with the FileCache
, using the group and id given to the constructor.
ContainerModel is an application-global model of all containers.
ComponentModel exposes all components contained within a single container.
BaseComponent is an abstract class that is the base for all components. It provides several virtual methods, some pure, for querying things like name, version, parent etc. It also keeps track of it's parent component as well as the container it is contained within. Not shown in the current diagram are functions for loading/saving the component from/to a JSON object, query functions like isImplicit (= not saved, usually used for children of a BaseCompoundComponent
), isUserVisible etc.
BaseCompoundComponent is the base class for all components that are made up of several others. It's mainly for keeping things organized in a tree-like structure, which is flattened by the container when required.
JavaLibraryComponent is a compound component that takes a maven identifier, and is made up of one ClasspathComponent
and one FileDownloadComponent
.
MinecraftComponent does the same, but takes only a version for the wanted version of Minecraft.
ClasspathComponent is a component that specifies a file to add to the classpath for Java-based games.
FileDownloadComponent specifies a file that needs to be downloaded, thus returning a CachedDownloadTask
in the getUpdateTask
method.
FactorioComponent takes a download URL and is made up of a FileDownloadComponent
and a RunnableComponent
RunnableComponent specifies a file that can be run.
MinecraftAuthComponent checks if there exists an active and valid Minecraft account, prompting the user if not.
Container is a rather lightweight class that handles one directory on disk. It is made up of one or more Components
, with at least one that is a "root component", which decides which other components may be added.
Aspects are the part that transform a list of component into a list of tasks for a specific stage. They all inherit from the BaseAspect interface, and have to reimplement a single pure virtual method, where they are given the container as well as a Stage for which to generate tasks. They then iterate through all components in the container, and if they find one which they know what to do with at the current stage, they add a Task
for that to the list, which is then returned.
FileDownloadAspect gathers all FileDownloadComponents
, and if the stage is Download, it generates a CachedDownloadTask
s for all of them.
JavaLaunchAspect gathers ClasspathComponent
s etc. and generates a launchscript for a JavaLaunchTask
.
MinecraftAspect gathers the MinecraftAuthComponent
and generates the MinecraftAuthTask
.