Baseclasses
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).
guaranteed precondition: | ![]() |
required postcondition: | ![]() |
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![]() ![]() ![]() |
||
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![]() ![]() |
IRect | L.bounding_box() | returns the bounding box of the computed grid layout. Precondition: call_grid has been called before. |
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13