Working on installer packages;

Nicer warnings about using spaces for indentation

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@321 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-06 00:30:53 +00:00
parent 6feef4feb0
commit 90b685f0f8
6 changed files with 77 additions and 11 deletions
+19
View File
@@ -0,0 +1,19 @@
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
// ----------------------------------------------------------------------------- : Includes
#include <data/installer.hpp>
#include <script/to_value.hpp>
// ----------------------------------------------------------------------------- : Installer
String Installer::typeName() const { return _("installer"); }
IMPLEMENT_REFLECTION(Installer) {
REFLECT_BASE(Packaged);
REFLECT(packages);
}
+37
View File
@@ -0,0 +1,37 @@
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_DATA_INSTALLER
#define HEADER_DATA_INSTALLER
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <util/io/package.hpp>
// ----------------------------------------------------------------------------- : Installer
/// A package that contains other packages that can be installed
class Installer : public Packaged {
public:
String prefered_filename; ///< What filename should be used (by default)
vector<String> packages; ///< Packages to install
/// Install all the packages
void install();
/// Add a package to the installer (if it is not already added).
/** The first package gives the name of the installer.
*/
void addPackage(const Packaged& package);
protected:
String typeName() const;
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF
#endif