VirtualMachine.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3 
4  This file is part of the TerraLib - a Framework for building GIS enabled
5  applications.
6 
7  TerraLib is free software: you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation, either version 3 of the License,
10  or (at your option) any later version.
11 
12  TerraLib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with TerraLib. See COPYING. If not, write to
19  TerraLib Team at <terralib-team@terralib.org>.
20  */
21 
22 /*!
23  \file terralib/vm/lua/VirtualMachine.h
24 
25  \brief Implementation of a virtual machine for the Lua Programming Language.
26 
27  \author Frederico Augusto BedĂȘ
28  \author Gilberto Ribeiro de Queiroz
29 */
30 
31 #ifndef __TERRALIB_VM_LUA_VIRTUALMACHINE_H__
32 #define __TERRALIB_VM_LUA_VIRTUALMACHINE_H__
33 
34 // TerraLib
35 #include "../core/VirtualMachine.h"
36 
37 // STL
38 #include <memory>
39 
40 #include <QString>
41 
42 namespace te
43 {
44  namespace vm
45  {
46  namespace lua
47  {
49  {
50  Q_OBJECT
51  public:
53 
55 
56  std::string getName() const;
57 
58  std::string getTitle() const;
59 
60  std::string getDescription() const;
61 
62  void setFileName(QString file);
63 
64  std::string readline();
65 
66  public slots:
67  void write(const QString& str);
68  void readline(QString msg);
69  void execute();
70  void stop();
71 
72  private:
73  struct Impl;
74  std::unique_ptr<Impl> m_pimpl;
75  };
76 
77  } // end namespace lua
78  } // end namespace vm
79 } // end namespace te
80 
81 #endif // __TERRALIB_VM_LUA_VIRTUALMACHINE_H__
#define slots
void write(const QString &str)
std::string getName() const
std::unique_ptr< Impl > m_pimpl
void setFileName(QString file)
setFileName Sets the file that will be used in the Virtual Machine.
std::string getDescription() const
Returns a brief description about the underlying Virtual Machine.
URI C++ Library.
std::string getTitle() const
Return the title of Virtual Machine: a name that can be used by applications to show in a GUI...
~VirtualMachine()
Virtual destructor.
std::string readline()
readline Method to be used by the language of the Virtual Machine when doing a input operation...