Adaptagrams
orthogonal_topology.h
1 /*
2  * vim: ts=4 sw=4 et tw=0 wm=0
3  *
4  * libtopology - Classes used in generating and managing topology constraints.
5  *
6  * Copyright (C) 2012 Monash University
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  * See the file LICENSE.LGPL distributed with the library.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  *
18  * Author: Michael Wybrow
19 */
20 
21 
22 #ifndef AVOID_ORTHOGLAYOUT_H
23 #define AVOID_ORTHOGLAYOUT_H
24 
25 #include "libcola/cola.h"
26 
27 namespace topology {
28 
37 class AvoidTopologyAddon : public Avoid::TopologyAddonInterface
38 {
39  public:
67  const double moveLimit = 120);
68 
70  Avoid::TopologyAddonInterface *clone(void) const;
71 
72  void improveOrthogonalTopology(Avoid::Router *router);
73  bool outputCode(FILE *fp) const;
74  bool outputDeletionCode(FILE *fp) const;
75 
76  private:
77  vpsc::Rectangles m_rectangles;
78  cola::CompoundConstraints m_constraints;
79  cola::RootCluster *m_cluster_hierarchy;
80  cola::VariableIDMap m_id_map;
81  double m_move_limit;
82 };
83 
84 
85 }
86 
87 #endif
libtopology: Extensions for topology preservation for libcola and libavoid libraries.
Definition: shape.h:41
Holds a mapping between two sets of Variable indices.
Definition: compound_constraints.h:93
This class can be passed to libavoid to extend it to provide orthogonal topology improvement function...
Definition: orthogonal_topology.h:37
std::vector< Rectangle * > Rectangles
A vector of pointers to Rectangle objects.
Definition: rectangle.h:246
Holds the cluster hierarchy specification for a diagram.
Definition: cluster.h:172
The Router class represents a libavoid router instance.
Definition: router.h:386
std::vector< CompoundConstraint * > CompoundConstraints
A vector of pointers to CompoundConstraint objects.
Definition: compound_constraints.h:259
AvoidTopologyAddon(vpsc::Rectangles &rs, cola::CompoundConstraints &cs, cola::RootCluster *ch, cola::VariableIDMap &map, const double moveLimit=120)
Constructs a AvoidTopologyAddon instance for a set of COLA diagram constraints.
Definition: orthogonal_topology.cpp:1682