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

kig

Public Types | Public Member Functions | List of all members
ObjectTypeCalcer Class Reference

#include <object_calcer.h>

Inheritance diagram for ObjectTypeCalcer:
Inheritance graph
[legend]

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

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

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

void ObjectTypeCalcer::calc ( const KigDocument &  )
virtual

Makes the ObjectCalcer recalculate its ObjectImp from its parents.

Implements ObjectCalcer.

Definition at line 32 of file object_calcer.cc.

bool ObjectTypeCalcer::canMove ( ) const
virtual

Returns whether this ObjectCalcer supports moving.

Reimplemented from ObjectCalcer.

Definition at line 281 of file object_calcer.cc.

const ObjectImp * ObjectTypeCalcer::imp ( ) const
virtual

Returns the ObjectImp of this ObjectCalcer.

Implements ObjectCalcer.

Definition at line 100 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 228 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 338 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 286 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 321 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 296 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 291 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 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:
  • object_calcer.h
  • object_calcer.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

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

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