Update l10n files, translate into french a bit more.
[tagua/yd.git] / src / entities / entity.h
blob2ad8b5e50d51681c15ebd6500c087d7c873adfbf
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #ifndef ENTITY_H
12 #define ENTITY_H
14 #include "fwd.h"
15 #include "usermove.h"
17 class Entity {
18 protected:
19 bool m_enabled : 1;
20 bool m_highlight : 1;
22 GamePtr m_game;
23 public:
24 explicit Entity(const GamePtr& game);
25 /**
26 * Detach from dependent resource disposing it.
28 virtual ~Entity();
30 bool highlight() const { return m_highlight; }
31 void setHighlight(bool highlight) { m_highlight = highlight; }
33 void setEnabled(bool enabled) { m_enabled = enabled; }
35 virtual bool canDetach() const = 0;
36 /**
37 * Detach from dependent resource without disposing it.
39 virtual void detach() { }
41 GamePtr game() const;
42 PositionPtr position() const;
45 #endif // ENTITY_H