kig
base_type.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KIG_OBJECTS_BASE_TYPE_H
00019 #define KIG_OBJECTS_BASE_TYPE_H
00020
00021 #include "object_type.h"
00022
00023 #include "../misc/argsparser.h"
00024
00025 class LineData;
00026
00027 class ObjectABType
00028 : public ArgsParserObjectType
00029 {
00030 protected:
00031 ObjectABType( const char* fulltypename, const ArgsParser::spec* argsspec, int n );
00032 ~ObjectABType();
00033 public:
00034 ObjectImp* calc( const Args& args, const KigDocument& ) const;
00035 bool canMove( const ObjectTypeCalcer& o ) const;
00036 bool isFreelyTranslatable( const ObjectTypeCalcer& o ) const;
00037 std::vector<ObjectCalcer*> movableParents( const ObjectTypeCalcer& ourobj ) const;
00038 void move( ObjectTypeCalcer& o, const Coordinate& to,
00039 const KigDocument& d ) const;
00040 const Coordinate moveReferencePoint( const ObjectTypeCalcer& o ) const;
00041
00042 virtual ObjectImp* calc( const Coordinate& a, const Coordinate& b ) const = 0;
00043 };
00044
00045 class ObjectLPType
00046 : public ArgsParserObjectType
00047 {
00048 protected:
00049 ObjectLPType( const char* fullname, const ArgsParser::spec* spec, int n );
00050 ~ObjectLPType();
00051 public:
00052 ObjectImp* calc( const Args& args, const KigDocument& ) const;
00053
00054 virtual ObjectImp* calc( const LineData& a, const Coordinate& b ) const = 0;
00055 };
00056
00057 #endif