~ubuntu-branches/ubuntu/natty/plee-the-bear/natty

« back to all changes in this revision

Viewing changes to bear-engine/core/src/engine/script/string_to_arg.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge, Julien Jorge
  • Date: 2010-11-17 20:13:34 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101117201334-o4dp7uq437to7oxb
Tags: 0.5.1-1
[ Julien Jorge ]
* New upstream release (Closes: #565062, #546514).
* Add armhf architecture (Closes: #604689).
* Remove patches integrated upstream: rpath-editors.diff, rpath-game.diff,
  editors-menu-section.diff.
* Bump the Standard-Version, no changes.
* Update my email address.
* Set build dependency of libclaw to 1.6.0.
* Add the missing ${misc:Depends} in debian/control.
* List gettext translations in bear-factory.install and plee-the-bear.install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Bear Engine
 
3
 
 
4
  Copyright (C) 2005-2010 Julien Jorge, Sebastien Angibaud
 
5
 
 
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.
 
10
 
 
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
 
14
  more details.
 
15
 
 
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
 
19
 
 
20
  contact: plee-the-bear@gamned.org
 
21
 
 
22
  Please add the tag [Bear] in the subject of your mails.
 
23
*/
 
24
/**
 
25
 * \file string_to_arg.hpp
 
26
 * \brief Specialisation of text_interface::string_to_arg to pass special
 
27
 *        parameters.
 
28
 * \author Julien Jorge
 
29
 */
 
30
#ifndef __ENGINE_STRING_TO_ARG_HPP__
 
31
#define __ENGINE_STRING_TO_ARG_HPP__
 
32
 
 
33
#include "engine/class_export.hpp"
 
34
 
 
35
#include "engine/script/script_context.hpp"
 
36
#include "engine/script/script_runner.hpp"
 
37
#include "text_interface/string_to_arg.hpp"
 
38
 
 
39
namespace bear
 
40
{
 
41
  namespace text_interface
 
42
  {
 
43
    /**
 
44
     * \brief Get a const base item from its name in the script.
 
45
     * \author Julien Jorge
 
46
     */
 
47
    template<>
 
48
    class ENGINE_EXPORT string_to_arg
 
49
    <bear::engine::script_context, const bear::engine::base_item&>
 
50
    {
 
51
    public:
 
52
      static const bear::engine::base_item& convert
 
53
        ( const bear::engine::script_context& c, const std::string& arg );
 
54
 
 
55
    }; // class string_to_arg
 
56
 
 
57
    /**
 
58
     * \brief Get a base item from its name in the script.
 
59
     * \author Julien Jorge
 
60
     */
 
61
    template<>
 
62
    class ENGINE_EXPORT string_to_arg
 
63
    <bear::engine::script_context, bear::engine::base_item&>
 
64
    {
 
65
    public:
 
66
      static bear::engine::base_item& convert
 
67
        ( const bear::engine::script_context& c, const std::string& arg );
 
68
 
 
69
    }; // class string_to_arg
 
70
 
 
71
 
 
72
    /**
 
73
     * \brief Get a const script runner from its name in the script.
 
74
     * \author S�bastien Angibaud
 
75
     */
 
76
    template<>
 
77
    class ENGINE_EXPORT string_to_arg
 
78
    <bear::engine::script_context, const bear::engine::script_runner&>
 
79
    {
 
80
    public:
 
81
      static const bear::engine::script_runner& convert
 
82
        ( const bear::engine::script_context& c, const std::string& arg );
 
83
 
 
84
    }; // class string_to_arg
 
85
 
 
86
     /**
 
87
     * \brief Get a script runner from its name in the script.
 
88
     * \author S�bastien Angibaud
 
89
     */
 
90
    template<>
 
91
    class ENGINE_EXPORT string_to_arg
 
92
    <bear::engine::script_context, bear::engine::script_runner&>
 
93
    {
 
94
    public:
 
95
      static bear::engine::script_runner& convert
 
96
        ( const bear::engine::script_context& c, const std::string& arg );
 
97
 
 
98
    }; // class string_to_arg
 
99
 
 
100
  } // namespace text_interface
 
101
} // namespace bear
 
102
 
 
103
#endif // __ENGINE_STRING_TO_ARG_HPP__