~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to ddd/Graph.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: Graph.h,v 1.19 1999/08/19 11:27:30 andreas Exp $
 
1
// $Id$
2
2
// Graph Class
3
3
 
4
4
// Copyright (C) 1995 Technische Universitaet Braunschweig, Germany.
29
29
#ifndef _DDD_Graph_h
30
30
#define _DDD_Graph_h
31
31
 
32
 
#ifdef __GNUG__
33
 
#pragma interface
34
 
#endif
35
 
 
36
32
#include "assert.h"
37
33
#include "GraphGC.h"
38
34
#include "GraphNode.h"
48
44
    GraphNode *_firstNode;      // circular list (0 if empty)
49
45
    GraphEdge *_firstEdge;      // circular list (0 if empty)
50
46
 
51
 
    Graph& operator = (const Graph&) { assert(0); return *this; }
 
47
    Graph& operator = (const Graph&);
52
48
 
53
 
    void begin_color(ostream& os, const PrintGC& gc,
 
49
    void begin_color(std::ostream& os, const PrintGC& gc,
54
50
                     unsigned short red,
55
51
                     unsigned short green,
56
52
                     unsigned short blue) const;
57
 
    void end_color(ostream& os, const PrintGC& gc) const;
 
53
    void end_color(std::ostream& os, const PrintGC& gc) const;
58
54
 
59
55
 
60
56
protected:
185
181
    }
186
182
 
187
183
    // Printing
188
 
    void _print(ostream& os, const GraphGC& gc) const;
189
 
    void _printHeader(ostream& os, const GraphGC& gc) const
 
184
    void _print(std::ostream& os, const GraphGC& gc) const;
 
185
    void _printHeader(std::ostream& os, const GraphGC& gc) const
190
186
    {
191
187
        Box::_printHeader(os, region(gc, gc.printSelectedNodesOnly), 
192
188
                          *gc.printGC);
193
189
    }
194
 
    void _printTrailer(ostream& os, const GraphGC& gc) const
 
190
    void _printTrailer(std::ostream& os, const GraphGC& gc) const
195
191
    {
196
192
        Box::_printTrailer(os, region(gc, gc.printSelectedNodesOnly),
197
193
                           *gc.printGC);
198
194
    }
199
195
 
200
196
    // Custom printing function
201
 
    void print(ostream& os, const GraphGC& gc = GraphGC()) const
 
197
    void print(std::ostream& os, const GraphGC& gc = GraphGC()) const
202
198
    {
203
199
        _printHeader(os, gc);
204
200
        _print(os, gc);
213
209
};
214
210
 
215
211
// I/O
216
 
extern ostream& operator << (ostream& s, const Graph& g);
 
212
extern std::ostream& operator << (std::ostream& s, const Graph& g);
217
213
 
218
214
#endif // _DDD_Graph_h
219
215
// DON'T ADD ANYTHING BEHIND THIS #endif