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

kig

ObjectTypeCalcer Class Reference

#include <object_calcer.h>

Inheritance diagram for ObjectTypeCalcer:

Inheritance graph
[legend]

List of all members.


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.


Public Types

typedef myboost::intrusive_ptr
< ObjectTypeCalcer > 
shared_ptr

Public Member Functions

 ObjectTypeCalcer (const ObjectType *type, const std::vector< ObjectCalcer * > &parents, bool sort=true)
 ~ObjectTypeCalcer ()
const ObjectImp * imp () const
std::vector< ObjectCalcer * > parents () const
void calc (const KigDocument &doc)
void setParents (const std::vector< ObjectCalcer * > np)
void setType (const ObjectType *t)
const ObjectType * type () const
const ObjectImpType * impRequirement (ObjectCalcer *o, const std::vector< ObjectCalcer * > &os) const
bool isDefinedOnOrThrough (const ObjectCalcer *o) const
bool canMove () const
bool isFreelyTranslatable () const
std::vector< ObjectCalcer * > movableParents () const
Coordinate moveReferencePoint () const
void move (const Coordinate &to, const KigDocument &doc)

Member Typedef Documentation

typedef myboost::intrusive_ptr<ObjectTypeCalcer> ObjectTypeCalcer::shared_ptr

Reimplemented from ObjectCalcer.

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 42 of file object_calcer.cc.

ObjectTypeCalcer::~ObjectTypeCalcer (  ) 

Definition at line 124 of file object_calcer.cc.


Member Function Documentation

const ObjectImp * ObjectTypeCalcer::imp (  )  const [virtual]

Returns the ObjectImp of this ObjectCalcer.

Implements ObjectCalcer.

Definition at line 99 of file object_calcer.cc.

std::vector< ObjectCalcer * > ObjectTypeCalcer::parents (  )  const [virtual]

Returns the parent ObjectCalcer's of this ObjectCalcer.

Implements ObjectCalcer.

Definition at line 104 of file object_calcer.cc.

void ObjectTypeCalcer::calc ( const KigDocument &   )  [virtual]

Makes the ObjectCalcer recalculate its ObjectImp from its parents.

Implements ObjectCalcer.

Definition at line 31 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 245 of file object_calcer.cc.

void ObjectTypeCalcer::setType ( const ObjectType *  t  ) 

Definition at line 254 of file object_calcer.cc.

const ObjectType * ObjectTypeCalcer::type (  )  const

Definition at line 131 of file object_calcer.cc.

const ObjectImpType * ObjectTypeCalcer::impRequirement ( ObjectCalcer *  o,
const std::vector< ObjectCalcer * > &  os 
) const [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 227 of file object_calcer.cc.

bool ObjectTypeCalcer::isDefinedOnOrThrough ( const ObjectCalcer *  o  )  const [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 337 of file object_calcer.cc.

bool ObjectTypeCalcer::canMove (  )  const [virtual]

Returns whether this ObjectCalcer supports moving.

Reimplemented from ObjectCalcer.

Definition at line 280 of file object_calcer.cc.

bool ObjectTypeCalcer::isFreelyTranslatable (  )  const [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 285 of file object_calcer.cc.

std::vector< ObjectCalcer * > ObjectTypeCalcer::movableParents (  )  const [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 320 of file object_calcer.cc.

Coordinate ObjectTypeCalcer::moveReferencePoint (  )  const [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 290 of file object_calcer.cc.

void ObjectTypeCalcer::move ( const Coordinate &  to,
const KigDocument &  doc 
) [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 295 of file object_calcer.cc.


The documentation for this class was generated from the following files:
  • object_calcer.h
  • object_calcer.cc

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal