blob: 4942f62ccf0a9c4fe8b2d55cff1993de771650d2 [file] [log] [blame]
Yingdi Yu42f66462013-10-31 17:38:22 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2013, Regents of the University of California
4 * Yingdi Yu
5 *
6 * BSD license, See the LICENSE file for more information
7 *
8 * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
9 * Alexander Afanasyev <alexander.afanasyev@ucla.edu>
10 */
11
12#ifndef TREELAYOUT_H
13#define TREELAYOUT_H
14#include <vector>
15
16class TreeLayout
17{
18public:
19 struct Coordinate
20 {
21 double x;
22 double y;
23 };
24 TreeLayout(){}
25 virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo){};
26 void setSiblingDistance(int d) {m_siblingDistance = d;}
27 void setLevelDistance(int d) {m_levelDistance = d;}
28 int getSiblingDistance() {return m_siblingDistance;}
29 int getLevelDistance() {return m_levelDistance;}
30 virtual ~TreeLayout(){}
31private:
32 int m_siblingDistance;
33 int m_levelDistance;
34};
35
36class OneLevelTreeLayout: public TreeLayout
37{
38public:
39 OneLevelTreeLayout(){}
40 virtual void setOneLevelLayout(std::vector<Coordinate> &childNodesCo);
41 virtual ~OneLevelTreeLayout(){}
42};
43#endif