next up previous contents index
Next: Cluster Graph Layout Algorithms Up: Layout Algorithms Previous: Layout Algorithms ( LayoutModule   Contents   Index


Grid Layout Algorithms ( GridLayoutModule )

Baseclasses


\begin{picture}(8,4)
\thicklines
\put(0,3){\framebox (5,1){\bf AGDModule}}\...
...ector(0,-1){1}}\put(2,0){\framebox (6,1){\bf GridLayoutModule}}
\end{picture}

Definition

The class GridLayoutModule extends the standard interface of layout algorithms by specialized call functions for grid layout algorithms.

Grid layout algorithms can be implemented by directly deriving from GridLayoutModule and overriding all pure virtual methods of the standard interface of LayoutModule and of the extended standard interface of GridLayoutModule. More convenient is to derive from GridLayoutModuleImpl with a suitable implementation concept class. This is explained in detail in Chapter Chapter Implementation of Layout Algorithms, where we also give a comprehensive example (see Sect. Implementation of Grid Layout Algorithms). In the latter case, only one method (do_call()) has to be overridden.

Exchangeable Modules Each grid layout algorithm has a module option for its grid coordinate mapper. Deriving classes must also copy the mapper option when implementing the clone method (see Sect. Implementation of Grid Layout Algorithms for an example).

$ \bullet$
mapper
a GridCoordinateMapper option used for translating grid coordinates into real coordinates.

guaranteed precondition: $ \emptyset$
required postcondition: $ \emptyset$
initial module: MaxAllMapper

#include < AGD/GridLayoutModule.h >

Initialization

GridLayoutModule L initializes a grid layout module. Sets the grid coordinate mapper to MaxAllMapper,

GridLayoutModule L(const PreCond& P, const PostCond& Q, const GridCoordinateMapper& M)
    initializes a grid layout module. Sets the grid coordinate mapper to M.

Operations

Extended Standard Interface

void L.call_grid(const leda_graph& G, GridLayout& gl)
    calls L for graph G. Returns the grid layout in gl.

The following call interfaces are not supported by all layout algorithms. The general postcondition (L.postcondition(0)) declares, which call interfaces are supported.

void L.call_grid(const leda_graph& G, leda_face f, GridLayout& gl)
    calls L for graph G and external face f. Returns the grid layout in gl. Precondition: key : : planar$ \_$map$ \_$callable $ \in$ post(0), G represents a planar map, and f is nil or a face in G.

void L.call_grid(PlaneGraphCopy& PG, leda_face f, GridLayout& gl)
    calls L for planarized graph PG and external face f. Returns the grid layout gl. Precondition: key : : PlaneGraphCopy$ \_$callable $ \in$ post(0), f is nil or a face in PG.


IRect L.bounding_box() returns the bounding box of the computed grid layout. Precondition: call_grid has been called before.


next up previous contents index
Next: Cluster Graph Layout Algorithms Up: Layout Algorithms Previous: Layout Algorithms ( LayoutModule   Contents   Index

© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13