~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to ddd/TypeInfo.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: TypeInfo.h,v 1.16 2000/05/29 14:07:23 andreas Exp $ -*- C++ -*-
 
1
// $Id$ -*- C++ -*-
2
2
// Run-time type information
3
3
 
4
4
// Copyright (C) 1995-1997 Technische Universitaet Braunschweig, Germany.
29
29
#ifndef _DDD_TypeInfo_h
30
30
#define _DDD_TypeInfo_h
31
31
 
32
 
#ifdef __GNUG__
33
 
#pragma interface
34
 
#endif
35
 
 
36
32
#include "config.h"
37
33
 
38
34
#if HAVE_TYPEINFO
39
35
 
40
 
#define string stdstring
41
36
#include <typeinfo>
42
 
#undef string
43
37
 
44
38
// Public interface.  Defined according to: Stroustrup, the C++
45
39
// Programming Language, 2nd Ed., Section 13.5
71
65
 
72
66
// No C++ run-time type information available - realize it manually
73
67
 
74
 
#include <iostream.h>
 
68
#include <iostream>
75
69
#include <stdlib.h>
76
70
#include "assert.h"
77
71
 
172
166
 
173
167
private:
174
168
    // Data
175
 
    char *_name;                // Name of this class
 
169
    const char *_name;          // Name of this class
176
170
    BaseList _direct_bases;     // List of direct base classes
177
171
    BaseList *_all_bases;       // Ptr to list of all base classes
178
172
    unsigned int _hash;         // 1Hash code (0 if not yet built)
208
202
 
209
203
private:
210
204
    // No X(const X&)
211
 
    TypeInfo(const TypeInfo&): 
212
 
        _name(0), _direct_bases(0), _all_bases(0), _hash(0) { assert(0); }
213
 
    TypeInfo& operator = (const TypeInfo&) { assert(0); return *this; }
 
205
    TypeInfo(const TypeInfo&);
 
206
    TypeInfo& operator = (const TypeInfo&);
214
207
 
215
208
public:
216
209
#if !IMMEDIATE_TYPE_INFO
217
210
    // Construction
218
 
    TypeInfo(char *name, BaseList direct_bases, BaseList *all_bases):
 
211
    TypeInfo(const char *name, BaseList direct_bases, BaseList *all_bases):
219
212
        _name(name), _direct_bases(direct_bases), _all_bases(all_bases),
220
213
        _hash(0)
221
214
    {}
264
257
    int index;
265
258
    const BaseList bases;
266
259
 
267
 
    BaseIterator(const BaseIterator&) : index(0), bases(0) 
268
 
        { assert(0); }
269
 
    BaseIterator& operator = (const BaseIterator&) 
270
 
        { assert(0); return *this; }
 
260
    BaseIterator(const BaseIterator&);
 
261
    BaseIterator& operator = (const BaseIterator&);
271
262
 
272
263
public:
273
264
    enum mode { all, direct };