mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Some more data types; dynamic arguments
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@5 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
//+----------------------------------------------------------------------------+
|
||||
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
||||
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#ifndef HEADER_DATA_CARD
|
||||
#define HEADER_DATA_CARD
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/string.hpp>
|
||||
#include <util/reflect.hpp>
|
||||
#include <util/dynamic_arg.hpp>
|
||||
|
||||
class Game;
|
||||
DECLARE_POINTER_TYPE(Field);
|
||||
DECLARE_POINTER_TYPE(Value);
|
||||
DECLARE_POINTER_TYPE(CardStyle);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Card
|
||||
|
||||
/// Game that is used for cards constructed with the default constructor
|
||||
DECLARE_DYNAMIC_ARG(Game*, game_for_new_cards);
|
||||
|
||||
/// A card from a card Set
|
||||
class Card {
|
||||
public:
|
||||
/// Default constructor, uses game_for_new_cards to make the game
|
||||
Card();
|
||||
/// Creates a card using the given game
|
||||
Card(const Game& game);
|
||||
|
||||
/// Get an identification of the card, an identification is something like a name, title, etc.
|
||||
String identification() const;
|
||||
|
||||
private:
|
||||
/// The values on the fields of the card
|
||||
/// The indices should correspond to the cardFields in the Game
|
||||
IndexMap<FieldP, ValueP> data;
|
||||
|
||||
/// Notes for this card
|
||||
String notes;
|
||||
|
||||
/// Alternative style to use for this card
|
||||
/// Optional, if not set use the card style from the set
|
||||
CardStyleP style;
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
#endif
|
||||
Reference in New Issue
Block a user