refresh dc9ccb8c0bf4bc198802d4d39ad2bc523eb5e06f
[tagua/yd.git] / src / core / namedsprite.h
blob357c87e3f31ffaf54761d013118465c2e132aa66
1 /*
2 Copyright (c) 2006-2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006-2007 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 NAMEDSPRITE_H
12 #define NAMEDSPRITE_H
14 #include <boost/shared_ptr.hpp>
15 #include <QString>
16 #include "export.h"
18 class Sprite;
19 typedef boost::shared_ptr<Sprite> SpritePtr;
21 class TAGUA_EXPORT NamedSprite {
22 public:
23 QString m_name;
24 SpritePtr m_sprite;
26 NamedSprite();
27 NamedSprite(const QString& name, const SpritePtr& s);
29 QString name() const { return m_name; }
30 SpritePtr sprite() const { return m_sprite; }
31 operator bool() const { return !!m_sprite; }
34 #endif //NAMEDSPRITE_H