diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-07-28 08:40:15 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-07-28 08:40:15 +0200 |
commit | 9d99b539bfaabe45a43948edf37e900401288f65 (patch) | |
tree | b583a7649dfa59597f352a41ed641b373f130436 /libmultimc/include/instanceloader.h | |
parent | a7a84d4dbb58565f108cb0886da6cb786e34d10d (diff) | |
download | MultiMC-9d99b539bfaabe45a43948edf37e900401288f65.tar MultiMC-9d99b539bfaabe45a43948edf37e900401288f65.tar.gz MultiMC-9d99b539bfaabe45a43948edf37e900401288f65.tar.lz MultiMC-9d99b539bfaabe45a43948edf37e900401288f65.tar.xz MultiMC-9d99b539bfaabe45a43948edf37e900401288f65.zip |
Parsing the version files, part IV
Also, start of big refactors.
Diffstat (limited to 'libmultimc/include/instanceloader.h')
-rw-r--r-- | libmultimc/include/instanceloader.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/libmultimc/include/instanceloader.h b/libmultimc/include/instanceloader.h index fd6d04d6..af5bf92d 100644 --- a/libmultimc/include/instanceloader.h +++ b/libmultimc/include/instanceloader.h @@ -36,22 +36,18 @@ public: */ static InstanceLoader &get() { return loader; } - /*! - * \brief Error codes returned by functions in the InstanceLoader and InstanceType classes. - * - * - NoError indicates that no error occurred. - * - OtherError indicates that an unspecified error occurred. - * - InstExists is returned by createInstance() if the given instance directory is already an instance. - * - NotAnInstance is returned by loadInstance() if the given instance directory is not a valid instance. - * - CantCreateDir is returned by createInstance( if the given instance directory can't be created.) - */ - enum InstLoaderError + enum InstLoadError + { + NoLoadError = 0, + UnknownLoadError, + NotAnInstance + }; + + enum InstCreateError { - NoError = 0, - OtherError, - + NoCreateError = 0, + UnknownCreateError, InstExists, - NotAnInstance, CantCreateDir }; @@ -61,21 +57,21 @@ public: * \param inst Pointer to store the created instance in. * \param type The type of instance to create. * \param instDir The instance's directory. - * \return An InstLoaderError error code. + * \return An InstCreateError error code. * - InstExists if the given instance directory is already an instance. * - CantCreateDir if the given instance directory cannot be created. */ - InstLoaderError createInstance(Instance *&inst, const QString &instDir); + InstCreateError createInstance(Instance *&inst, const QString &instDir); /*! * \brief Loads an instance from the given directory. * Checks the instance's INI file to figure out what the instance's type is first. * \param inst Pointer to store the loaded instance in. * \param instDir The instance's directory. - * \return An InstLoaderError error code. + * \return An InstLoadError error code. * - NotAnInstance if the given instance directory isn't a valid instance. */ - InstLoaderError loadInstance(Instance *&inst, const QString &instDir); + InstLoadError loadInstance(Instance *&inst, const QString &instDir); private: InstanceLoader(); |