2
Bear Engine - Editor library
4
Copyright (C) 2005-2010 Julien Jorge, Sebastien Angibaud
6
This program is free software; you can redistribute it and/or modify it
7
under the terms of the GNU General Public License as published by the
8
Free Software Foundation; either version 2 of the License, or (at your
9
option) any later version.
11
This program is distributed in the hope that it will be useful, but WITHOUT
12
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16
You should have received a copy of the GNU General Public License along
17
with this program; if not, write to the Free Software Foundation, Inc.,
18
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
contact: plee-the-bear@gamned.org
22
Please add the tag [Bear] in the subject of your mails.
25
* \file bf/any_animation.hpp
26
* \brief A class that contains an animation or an animation_file_type, only one
28
* \author Julien Jorge
30
#ifndef __BF_ANY_ANIMATION_HPP__
31
#define __BF_ANY_ANIMATION_HPP__
33
#include "bf/animation_file_type.hpp"
34
#include "bf/libeditor_export.hpp"
39
* \brief A class that contains an animation or an animation_file_type, only
41
* \author Julien Jorge
43
class BEAR_EDITOR_EXPORT any_animation
46
/** \brief The type of the animation effectively stored. */
49
/** \brief A completely detailed animation. */
52
/** \brief An animation file.*/
55
}; // enum content_type
58
static std::string content_to_string( content_type c );
59
static content_type string_to_content( const std::string& c );
61
any_animation( content_type c = content_animation );
63
void set_animation_file( const animation_file_type& a );
64
void set_animation( const animation& a );
66
const animation_file_type& get_animation_file() const;
67
const animation& get_animation() const;
69
animation get_current_animation() const;
71
void switch_to( content_type c );
72
content_type get_content_type() const;
74
void compile( compiled_file& f ) const;
76
bool operator==( const any_animation& that ) const;
77
bool operator!=( const any_animation& that ) const;
78
bool operator<( const any_animation& that ) const;
81
/** \brief The type of the animation on which we are working. */
82
content_type m_content_type;
84
/** \brief The path of the animation file. */
85
animation_file_type m_animation_file;
87
/** \brief The animation returned by original_animation(). */
88
animation m_animation;
90
}; // class any_animation
93
#endif // __BF_ANY_ANIMATION_HPP__