• 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
factory.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_FACTORY_H
24 #define STEPCORE_FACTORY_H
25 
26 #include "object.h"
27 
28 #include <QHash>
29 
30 namespace StepCore {
31 
32 class Item;
33 class Solver;
34 class CollisionSolver;
35 class ConstraintSolver;
36 
40 class Factory
41 {
42 public:
44  void registerMetaObject(const MetaObject* metaObject);
45 
47  const MetaObject* metaObject(const QString& name) const;
48 
50  const QHash<QString, const MetaObject*>& metaObjects() const { return _metaObjects; }
51 
53  Object* newObject(const QString& name) const;
55  Item* newItem(const QString& name) const;
57  Solver* newSolver(const QString& name) const;
59  CollisionSolver* newCollisionSolver(const QString& name) const;
61  ConstraintSolver* newConstraintSolver(const QString& name) const;
62 
63 protected:
64  QHash<QString, const MetaObject*> _metaObjects;
65 };
66 
67 } // namespace StepCore
68 
69 #endif // STEPCORE_FACTORY_H
70 
StepCore::Factory::newObject
Object * newObject(const QString &name) const
Create new Object by class name.
Definition: factory.cc:38
StepCore::Object
Root of the StepCore classes hierarchy.
Definition: object.h:57
StepCore::Solver
Generic Solver interface.
Definition: solver.h:70
StepCore::Factory
List of MetaObject.
Definition: factory.h:40
StepCore::Factory::newConstraintSolver
ConstraintSolver * newConstraintSolver(const QString &name) const
Create new ConstraintSolver by class name.
Definition: factory.cc:66
StepCore::Item
The root class for any world items (bodies and forces)
Definition: world.h:69
StepCore::Factory::registerMetaObject
void registerMetaObject(const MetaObject *metaObject)
Register MetaObject.
Definition: factory.cc:28
StepCore::CollisionSolver
Collision solver interface.
Definition: collisionsolver.h:85
StepCore::Factory::newItem
Item * newItem(const QString &name) const
Create new Item by class name.
Definition: factory.cc:45
object.h
Object, MetaObject and MetaProperty classes.
StepCore::Factory::metaObjects
const QHash< QString, const MetaObject * > & metaObjects() const
Get QHash of all registered MetaObject.
Definition: factory.h:50
StepCore::Factory::metaObject
const MetaObject * metaObject(const QString &name) const
Find MetaObject by name.
Definition: factory.cc:33
StepCore::Factory::_metaObjects
QHash< QString, const MetaObject * > _metaObjects
Definition: factory.h:64
StepCore::MetaObject
Meta-information about class.
Definition: object.h:176
StepCore::Factory::newCollisionSolver
CollisionSolver * newCollisionSolver(const QString &name) const
Create new CollisionSolver by class name.
Definition: factory.cc:59
StepCore::ConstraintSolver
Constraint solver interface.
Definition: constraintsolver.h:40
StepCore::Factory::newSolver
Solver * newSolver(const QString &name) const
Create new Solver by class name.
Definition: factory.cc:52
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