moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kig / objects / other_type.h
blob47fdb24c5a83dd1af6427b48c8aab809bb8107db
1 // Copyright (C) 2003-2004 Dominique Devriese <devriese@kde.org>
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA
16 // 02111-1307, USA.
18 #ifndef KIG_MISC_OTHER_TYPE_H
19 #define KIG_MISC_OTHER_TYPE_H
21 #include "base_type.h"
22 #include "../misc/object_hierarchy.h"
24 class LocusType
25 : public ArgsParserObjectType
27 typedef ArgsParserObjectType Parent;
28 LocusType();
29 ~LocusType();
30 public:
31 static const LocusType* instance();
33 ObjectImp* calc( const Args& args, const KigDocument& ) const;
35 const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
37 bool inherits( int type ) const;
38 const ObjectImpType* resultId() const;
40 std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
41 Args sortArgs( const Args& args ) const;
44 class CopyObjectType
45 : public ObjectType
47 protected:
48 CopyObjectType();
49 ~CopyObjectType();
50 public:
51 static CopyObjectType* instance();
52 bool inherits( int type ) const;
53 ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
54 const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
55 bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
56 const ObjectImpType* resultId() const;
57 std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& os ) const;
58 Args sortArgs( const Args& args ) const;
61 #endif