kig
#include <object_calcer.h>
Public Types | |
typedef myboost::intrusive_ptr < ObjectTypeCalcer > | shared_ptr |
Public Types inherited from ObjectCalcer | |
typedef myboost::intrusive_ptr < ObjectCalcer > | shared_ptr |
Public Member Functions | |
ObjectTypeCalcer (const ObjectType *type, const std::vector< ObjectCalcer * > &parents, bool sort=true) | |
~ObjectTypeCalcer () | |
void | calc (const KigDocument &doc) |
bool | canMove () const |
const ObjectImp * | imp () const |
const ObjectImpType * | impRequirement (ObjectCalcer *o, const std::vector< ObjectCalcer * > &os) const |
bool | isDefinedOnOrThrough (const ObjectCalcer *o) const |
bool | isFreelyTranslatable () const |
std::vector< ObjectCalcer * > | movableParents () const |
void | move (const Coordinate &to, const KigDocument &doc) |
Coordinate | moveReferencePoint () const |
std::vector< ObjectCalcer * > | parents () const |
void | setParents (const std::vector< ObjectCalcer * > np) |
void | setType (const ObjectType *t) |
const ObjectType * | type () const |
Public Member Functions inherited from ObjectCalcer | |
virtual | ~ObjectCalcer () |
void | addChild (ObjectCalcer *c) |
std::vector< ObjectCalcer * > | children () const |
void | delChild (ObjectCalcer *c) |
Additional Inherited Members | |
Protected Member Functions inherited from ObjectCalcer | |
ObjectCalcer () | |
void | deref () |
void | ref () |
Protected Attributes inherited from ObjectCalcer | |
std::vector< ObjectCalcer * > | mchildren |
int | refcount |
Detailed Description
This is an ObjectCalcer that uses one of the various ObjectType's to calculate its ObjectImp.
It basically forwards all of its functionality to the ObjectType that it holds a pointer to.
Definition at line 183 of file object_calcer.h.
Member Typedef Documentation
Definition at line 190 of file object_calcer.h.
Constructor & Destructor Documentation
ObjectTypeCalcer::ObjectTypeCalcer | ( | const ObjectType * | type, |
const std::vector< ObjectCalcer * > & | parents, | ||
bool | sort = true |
||
) |
Construct a new ObjectTypeCalcer with a given type and parents.
the sort boolean tells whether the sortArgs method should be invoked or not; if not present
Definition at line 43 of file object_calcer.cc.
ObjectTypeCalcer::~ObjectTypeCalcer | ( | ) |
Definition at line 125 of file object_calcer.cc.
Member Function Documentation
|
virtual |
Makes the ObjectCalcer recalculate its ObjectImp from its parents.
Implements ObjectCalcer.
Definition at line 32 of file object_calcer.cc.
|
virtual |
Returns whether this ObjectCalcer supports moving.
Reimplemented from ObjectCalcer.
Definition at line 281 of file object_calcer.cc.
|
virtual |
Returns the ObjectImp of this ObjectCalcer.
Implements ObjectCalcer.
Definition at line 100 of file object_calcer.cc.
|
virtual |
An ObjectCalcer expects its parents to have an ObjectImp of a certain type.
This method returns the ObjectImpType that o
should have. os
is a list of all the parents in order, and o
is part of it. This method will return the ObjectImpType that the parent should at least be. For example, a Translated object can translate any sort of object, so it will return ObjectImp::stype() here ( the topmost ObjectImpType, that all other ObjectImpType's inherit ).
Implements ObjectCalcer.
Definition at line 228 of file object_calcer.cc.
|
virtual |
If this ObjectCalcer represents a curve, return true if the given point is by construction on this curve.
If this ObjectCalcer represents a point, return true if this point is by construction on the given curve.
Implements ObjectCalcer.
Definition at line 338 of file object_calcer.cc.
|
virtual |
Returns whether this ObjectCalcer can be translated at any position in the coordinate plane.
Note that a ConstrainedPointType can be moved, but cannot be moved everywhere.
Reimplemented from ObjectCalcer.
Definition at line 286 of file object_calcer.cc.
|
virtual |
Moving an object most of the time signifies invoking changes in some of its parents.
This method returns the set of parents that will be changed in the move() method. The object itself should not be included.
Reimplemented from ObjectCalcer.
Definition at line 321 of file object_calcer.cc.
|
virtual |
This is the method that does the real moving work.
It will be invoked to tell the object to move to the new location to. After this, the calc() method will be calced, so you only need to do the real changes in this method, updating the ObjectImp should be done in the calc() method, not here.
Reimplemented from ObjectCalcer.
Definition at line 296 of file object_calcer.cc.
|
virtual |
In order to support simultaneously moving objects that are in different locations, we need for each object a location that it is assumed to be at, at the moment the moving starts.
This method returns such a point.
Reimplemented from ObjectCalcer.
Definition at line 291 of file object_calcer.cc.
|
virtual |
Returns the parent ObjectCalcer's of this ObjectCalcer.
Implements ObjectCalcer.
Definition at line 105 of file object_calcer.cc.
void ObjectTypeCalcer::setParents | ( | const std::vector< ObjectCalcer * > | np | ) |
Set the parents of this ObjectTypeCalcer to np.
This object will release the reference it had to its old parents, and take a new one on the new parents.
Definition at line 246 of file object_calcer.cc.
void ObjectTypeCalcer::setType | ( | const ObjectType * | t | ) |
Definition at line 255 of file object_calcer.cc.
const ObjectType * ObjectTypeCalcer::type | ( | ) | const |
Definition at line 132 of file object_calcer.cc.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.