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

step/stepcore

  • sources
  • kde-4.12
  • kdeedu
  • step
  • stepcore
xmlfile.h
Go to the documentation of this file.
1 /* This file is part of StepCore library.
2  Copyright (C) 2007 Vladimir Kuznetsov <ks.vladimir@gmail.com>
3 
4  StepCore library is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  StepCore library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with StepCore; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
23 #ifndef STEPCORE_XMLFILE_H
24 #define STEPCORE_XMLFILE_H
25 
26 #include <QString>
27 class QIODevice;
28 
29 namespace StepCore {
30 
31 class World;
32 class Factory;
33 
37 class XmlFile {
38 public:
43  XmlFile(QIODevice* device): _device(device) {}
44 
50  bool save(const World* world);
51 
58  bool load(World* world, const Factory* factory);
59 
61  QString errorString() const { return _errorString; }
62 
63 protected:
64  QIODevice* _device;
65  QString _errorString;
66 
67 public:
68  static const char* DOCTYPE;
69  static const char* NAMESPACE_URI;
70  static const char* VERSION;
71 };
72 
73 }
74 
75 #endif
76 
StepCore::XmlFile
Class for saving and loading World as XML file.
Definition: xmlfile.h:37
StepCore::XmlFile::errorString
QString errorString() const
Get error message from last failed save() or load()
Definition: xmlfile.h:61
StepCore::XmlFile::_device
QIODevice * _device
Definition: xmlfile.h:64
StepCore::XmlFile::NAMESPACE_URI
static const char * NAMESPACE_URI
Definition: xmlfile.h:69
StepCore::Factory
List of MetaObject.
Definition: factory.h:40
StepCore::XmlFile::VERSION
static const char * VERSION
Definition: xmlfile.h:70
StepCore::XmlFile::_errorString
QString _errorString
Definition: xmlfile.h:65
StepCore::XmlFile::DOCTYPE
static const char * DOCTYPE
Definition: xmlfile.h:68
StepCore::XmlFile::XmlFile
XmlFile(QIODevice *device)
Constructs XmlFile.
Definition: xmlfile.h:43
StepCore::XmlFile::save
bool save(const World *world)
Save world to XML file.
StepCore::World
Contains multiple Item, Solver and general properties such as time.
Definition: world.h:372
StepCore::XmlFile::load
bool load(World *world, const Factory *factory)
Load world from XML file.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

step/stepcore

Skip menu "step/stepcore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

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