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

kig

ObjectConstCalcer Class Reference

#include <object_calcer.h>

Inheritance diagram for ObjectConstCalcer:

Inheritance graph
[legend]

List of all members.


Detailed Description

This is an ObjectCalcer that keeps an ObjectImp, and never calculates a new one.

It is a trivial, but very useful ObjectCalcer. It is used often in Kig, for holding data to be used by other ObjectCalcer's.

Definition at line 232 of file object_calcer.h.


Public Types

typedef myboost::intrusive_ptr
< ObjectConstCalcer > 
shared_ptr

Public Member Functions

void calc (const KigDocument &doc)
const ObjectImp * imp () const
const ObjectImpType * impRequirement (ObjectCalcer *o, const std::vector< ObjectCalcer * > &os) const
bool isDefinedOnOrThrough (const ObjectCalcer *o) const
 ObjectConstCalcer (ObjectImp *imp)
std::vector< ObjectCalcer * > parents () const
void setImp (ObjectImp *newimp)
ObjectImp * switchImp (ObjectImp *newimp)
 ~ObjectConstCalcer ()

Member Typedef Documentation

typedef myboost::intrusive_ptr<ObjectConstCalcer> ObjectConstCalcer::shared_ptr

Reimplemented from ObjectCalcer.

Definition at line 237 of file object_calcer.h.


Constructor & Destructor Documentation

ObjectConstCalcer::ObjectConstCalcer ( ObjectImp *  imp  ) 

Construct a new ObjectConstCalcer with the given imp as the stored ObjectImp.

This class takes ownership of the imp you pass it, it should have been constructed using new, and this class is responsible for deleting it.

Definition at line 54 of file object_calcer.cc.

ObjectConstCalcer::~ObjectConstCalcer (  ) 

Definition at line 59 of file object_calcer.cc.


Member Function Documentation

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

Makes the ObjectCalcer recalculate its ObjectImp from its parents.

Implements ObjectCalcer.

Definition at line 69 of file object_calcer.cc.

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

Returns the ObjectImp of this ObjectCalcer.

Implements ObjectCalcer.

Definition at line 64 of file object_calcer.cc.

const ObjectImpType * ObjectConstCalcer::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 220 of file object_calcer.cc.

bool ObjectConstCalcer::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 325 of file object_calcer.cc.

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

Returns the parent ObjectCalcer's of this ObjectCalcer.

Implements ObjectCalcer.

Definition at line 73 of file object_calcer.cc.

void ObjectConstCalcer::setImp ( ObjectImp *  newimp  ) 

Set the ObjectImp of this ObjectConstCalcer to the given newimp.

The old one will be deleted.

Definition at line 240 of file object_calcer.cc.

ObjectImp * ObjectConstCalcer::switchImp ( ObjectImp *  newimp  ) 

Set the ObjectImp of this ObjectConstCalcer to the given newimp.

The old one will not be deleted, but returned.

Definition at line 201 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
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
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