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

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • misc
Macros | Functions
calcpaths.cc File Reference
#include "calcpaths.h"
#include "../objects/object_calcer.h"
#include "../objects/object_imp.h"
#include <algorithm>
Include dependency graph for calcpaths.cc:

Go to the source code of this file.

Macros

#define NEWCALCPATH
 

Functions

bool addBranch (const std::vector< ObjectCalcer * > &o, const ObjectCalcer *to, std::vector< ObjectCalcer * > &ret)
 
static void addNonCache (ObjectCalcer *o, std::vector< ObjectCalcer * > &ret)
 
std::vector< ObjectCalcer * > calcPath (const std::vector< ObjectCalcer * > &os)
 
std::vector< ObjectCalcer * > calcPath (const std::vector< ObjectCalcer * > &from, const ObjectCalcer *to)
 
std::set< ObjectCalcer * > getAllChildren (ObjectCalcer *obj)
 
std::set< ObjectCalcer * > getAllChildren (const std::vector< ObjectCalcer * > objs)
 
std::vector< ObjectCalcer * > getAllParents (const std::vector< ObjectCalcer * > &objs)
 
std::vector< ObjectCalcer * > getAllParents (ObjectCalcer *obj)
 
bool isChild (const ObjectCalcer *o, ObjectCalcer *op)
 
bool isChild (const ObjectCalcer *o, const std::vector< ObjectCalcer * > &os)
 
bool isPointOnCurve (const ObjectCalcer *point, const ObjectCalcer *curve)
 
void localdfs (ObjectCalcer *obj, std::vector< ObjectCalcer * > &visited, std::vector< ObjectCalcer * > &all)
 
std::vector< ObjectCalcer * > sideOfTreePath (const std::vector< ObjectCalcer * > &from, const ObjectCalcer *to)
 
static bool visit (const ObjectCalcer *o, const std::vector< ObjectCalcer * > &from, std::vector< ObjectCalcer * > &ret)
 

Macro Definition Documentation

#define NEWCALCPATH

Definition at line 42 of file calcpaths.cc.

Function Documentation

bool addBranch ( const std::vector< ObjectCalcer * > &  o,
const ObjectCalcer *  to,
std::vector< ObjectCalcer * > &  ret 
)

Definition at line 143 of file calcpaths.cc.

static void addNonCache ( ObjectCalcer *  o,
std::vector< ObjectCalcer * > &  ret 
)
static

Definition at line 178 of file calcpaths.cc.

std::vector<ObjectCalcer*> calcPath ( const std::vector< ObjectCalcer * > &  os)

This function sorts os such that they're in the right order for calc()-ing.

This means that child objects must appear after their parents ( for you graph people, this is just a topological sort.. )

Definition at line 48 of file calcpaths.cc.

std::vector<ObjectCalcer*> calcPath ( const std::vector< ObjectCalcer * > &  from,
const ObjectCalcer *  to 
)

This is a different function for more or less the same purpose.

It takes a few Objects, which are considered to have been calced already. Then, it puts the necessary part of their children in the right order, so that calc()-ing correctly updates all of their data ( they're calc'ed in the right order, i mean... ). The objects in from are normally not included in the output, unless they appear somewhere in the middle of the calc-path towards to ...

Definition at line 160 of file calcpaths.cc.

std::set<ObjectCalcer*> getAllChildren ( ObjectCalcer *  obj)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 281 of file calcpaths.cc.

std::set<ObjectCalcer*> getAllChildren ( const std::vector< ObjectCalcer * >  objs)

This function returns all objects below the objects in objs in the dependency graphy.

The objects in objs are also included themselves..

Definition at line 288 of file calcpaths.cc.

std::vector<ObjectCalcer*> getAllParents ( const std::vector< ObjectCalcer * > &  objs)

This function returns all objects above the given in the dependency graph.

The given objects objs are also included themselves..

Definition at line 229 of file calcpaths.cc.

std::vector<ObjectCalcer*> getAllParents ( ObjectCalcer *  obj)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 249 of file calcpaths.cc.

bool isChild ( const ObjectCalcer *  o,
ObjectCalcer *  op 
)

Definition at line 256 of file calcpaths.cc.

bool isChild ( const ObjectCalcer *  o,
const std::vector< ObjectCalcer * > &  os 
)

Returns true if o is a descendant of any of the objects in os.

Definition at line 263 of file calcpaths.cc.

bool isPointOnCurve ( const ObjectCalcer *  point,
const ObjectCalcer *  curve 
)

Return true if the given point is ( by construction ) on the given curve.

This means that it is either a constrained point on the curve, or the curve is constructed through the point, or the point is an intersection point of the curve with another curve. Note that it is assumed that the given point is in fact a point and the given curve is in fact a curve.

Definition at line 309 of file calcpaths.cc.

void localdfs ( ObjectCalcer *  obj,
std::vector< ObjectCalcer * > &  visited,
std::vector< ObjectCalcer * > &  all 
)

Definition at line 73 of file calcpaths.cc.

std::vector<ObjectCalcer*> sideOfTreePath ( const std::vector< ObjectCalcer * > &  from,
const ObjectCalcer *  to 
)

This function returns all objects on the side of the path through the dependency tree from from down to to .

This means that we look for any objects that don't depend on any of the objects in from themselves, but of which one of the direct children does. We need this function for Locus stuff...

Definition at line 222 of file calcpaths.cc.

static bool visit ( const ObjectCalcer *  o,
const std::vector< ObjectCalcer * > &  from,
std::vector< ObjectCalcer * > &  ret 
)
static

Definition at line 193 of file calcpaths.cc.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:40 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