~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to ddd/GraphNodeI.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: GraphNodeI.h,v 1.21 2001/01/09 18:15:22 zeller Exp $
 
1
// $Id$
2
2
// GraphNode class structure
3
3
 
4
4
// Copyright (C) 1995 Technische Universitaet Braunschweig, Germany.
29
29
#ifndef _DDD_GraphNodeI_h
30
30
#define _DDD_GraphNodeI_h
31
31
 
32
 
#ifdef __GNUG__
33
 
#pragma interface
34
 
#endif
35
 
 
36
 
 
37
32
#include "UniqueId.h"
38
33
#include "Box.h"
39
34
#include "bool.h"
40
35
#include "GraphGC.h"
41
 
#include <strstream.h>
 
36
#include <sstream>
42
37
 
43
38
class GraphEdge;
44
39
class Graph;
65
60
    GraphNode *prev;            // For collectors
66
61
    Graph *graph;               // For collectors
67
62
 
68
 
    GraphNode& operator = (const GraphNode&) { assert(0); return *this; }
 
63
    GraphNode& operator = (const GraphNode&);
69
64
 
70
65
protected:
71
66
    // Copy Constructor
121
116
    virtual const BoxRegion& sensitiveRegion(const GraphGC& gc) const = 0;
122
117
    virtual string str() const 
123
118
    { 
124
 
        ostrstream os;
 
119
        std::ostringstream os;
125
120
        os << id();
126
121
        return string(os);
127
122
    }
169
164
    }
170
165
 
171
166
    // Printing
172
 
    virtual void _print(ostream&, const GraphGC&) const
 
167
    virtual void _print(std::ostream&, const GraphGC&) const
173
168
    {
174
169
        // Default: do nothing
175
170
    }
178
173
    virtual bool OK() const;
179
174
};
180
175
 
181
 
inline ostream& operator << (ostream& s, GraphNode& node)
 
176
inline std::ostream& operator << (std::ostream& s, const GraphNode& node)
182
177
{
183
178
    return s << node.str();
184
179
}