• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • scripting
python_scripter.h
Go to the documentation of this file.
1 // Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
2 
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17 
18 #ifndef KIG_SCRIPTING_PYTHON_SCRIPTER_H
19 #define KIG_SCRIPTING_PYTHON_SCRIPTER_H
20 
21 #include "../objects/common.h"
22 
23 #include <string>
24 
25 class KigDocument;
26 class ObjectImp;
27 
28 class CompiledPythonScript
29 {
30  friend class PythonScripter;
31  class Private;
32  Private* const d;
33  CompiledPythonScript( Private* );
34 public:
35  CompiledPythonScript( const CompiledPythonScript& s );
36  ~CompiledPythonScript();
37  ObjectImp* calc( const Args& a, const KigDocument& doc );
38 
39  bool valid();
40 };
41 
42 class PythonScripter
43 {
44  friend class CompiledPythonScript;
45  class Private;
46  Private* d;
47  PythonScripter();
48  ~PythonScripter();
49 
50  void clearErrors();
51  void saveErrors();
52 
53  bool erroroccurred;
54  std::string lastexceptiontype;
55  std::string lastexceptionvalue;
56  std::string lastexceptiontraceback;
57 public:
58  static PythonScripter* instance();
59 
60  bool errorOccurred() const;
61  std::string lastErrorExceptionType() const;
62  std::string lastErrorExceptionValue() const;
63  std::string lastErrorExceptionTraceback() const;
64 
65  CompiledPythonScript compile( const char* code );
66  ObjectImp* calc( CompiledPythonScript& script, const Args& args );
67 };
68 
69 #endif
PythonScripter::errorOccurred
bool errorOccurred() const
Definition: python_scripter.cc:607
CompiledPythonScript::calc
ObjectImp * calc(const Args &a, const KigDocument &doc)
Definition: python_scripter.cc:439
PythonScripter::instance
static PythonScripter * instance()
Definition: python_scripter.cc:364
PythonScripter::compile
CompiledPythonScript compile(const char *code)
Definition: python_scripter.cc:457
Args
std::vector< const ObjectImp * > Args
Definition: objects/common.h:47
PythonScripter
Definition: python_scripter.h:42
PythonScripter::lastErrorExceptionValue
std::string lastErrorExceptionValue() const
Definition: python_scripter.cc:498
PythonScripter::lastErrorExceptionType
std::string lastErrorExceptionType() const
Definition: python_scripter.cc:493
CompiledPythonScript
Definition: python_scripter.h:28
KigDocument
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
PythonScripter::lastErrorExceptionTraceback
std::string lastErrorExceptionTraceback() const
Definition: python_scripter.cc:503
ObjectImp
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
PythonScripter::calc
ObjectImp * calc(CompiledPythonScript &script, const Args &args)
Definition: python_scripter.cc:508
CompiledPythonScript::valid
bool valid()
Definition: python_scripter.cc:602
CompiledPythonScript::~CompiledPythonScript
~CompiledPythonScript()
Definition: python_scripter.cc:444
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal