1
// This file is part of PUMA.
2
// Copyright (C) 1999-2003 The PUMA developer team.
4
// This program is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU General Public License as
6
// published by the Free Software Foundation; either version 2 of
7
// the License, or (at your option) any later version.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public
15
// License along with this program; if not, write to the Free
16
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19
#include "Puma/Unit.h"
20
#include "Puma/Source.h"
21
#include "Puma/SysCall.h"
22
#include "Puma/FileUnit.h"
23
#include "Puma/FileSource.h"
24
#include "Puma/ErrorStream.h"
25
#include "Puma/UnitManager.h"
26
#include "Puma/Tokenizer.h"
2
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/src/UnitManager.cc"
3
#ifndef __ac_FIRST__var_tmp_aspectc4343_debian_Puma_gen45release_step1__
4
#define __ac_FIRST__var_tmp_aspectc4343_debian_Puma_gen45release_step1__
5
#define __ac_FIRST_FILE__var_tmp_aspectc4343_debian_Puma_gen45release_step1_src_UnitManager_cc__
6
#endif // __ac_FIRST__var_tmp_aspectc4343_debian_Puma_gen45release_step1__
8
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/src/UnitManager.cc"
10
#line 11 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
16
typedef const char* Type;
17
enum JPType { CALL = 0x0004, EXECUTION = 0x0008, CONSTRUCTION = 0x0010, DESTRUCTION = 0x0020 };
19
void **_args; void *_result; void *_target; void *_that; void *_fptr;
20
void (*_wrapper)(Action &);
21
inline void trigger () { _wrapper (*this); }
23
struct AnyResultBuffer {};
24
template <typename T> struct ResultBuffer : public AnyResultBuffer {
25
char _data[sizeof (T)];
26
~ResultBuffer () { ((T*)_data)->T::~T(); }
27
operator T& () const { return *(T*)_data; }
29
template <typename T, typename N> struct TL {
30
typedef T type; typedef N next; enum { ARGS = next::ARGS + 1 };
32
struct TLE { enum { ARGS = 0 }; };
33
template <typename T> struct Referred { typedef T type; };
34
template <typename T> struct Referred<T &> { typedef T type; };
35
template <typename TL, int I> struct Arg {
36
typedef typename Arg<typename TL::next, I - 1>::Type Type;
37
typedef typename Referred<Type>::type ReferredType;
39
template <typename TL> struct Arg<TL, 0> {
40
typedef typename TL::type Type;
41
typedef typename Referred<Type>::type ReferredType;
43
template <class Aspect, int Index>
45
static int &instance () {
46
static int counter = 0;
49
CFlow () { instance ()++; }
50
~CFlow () { instance ()--; }
51
static bool active () { return instance () > 0; }
54
inline void * operator new (__SIZE_TYPE__, AC::AnyResultBuffer *p) { return p; }
55
inline void operator delete (void *, AC::AnyResultBuffer *) { } // for VC++
59
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/src/UnitManager.cc"
61
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/src/UnitManager.cc"
63
#line 64 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
65
#ifndef __ac_fwd_PragmaOnceUnitState__
66
#define __ac_fwd_PragmaOnceUnitState__
67
class PragmaOnceUnitState;
69
template <class JoinPoint>
70
__attribute((always_inline)) inline void invoke_PragmaOnceUnitState_PragmaOnceUnitState_a0_after (JoinPoint *tjp);
71
template <class JoinPoint>
72
__attribute((always_inline)) inline void invoke_PragmaOnceUnitState_PragmaOnceUnitState_a1_after (JoinPoint *tjp);
76
#ifndef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
77
#define __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
80
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/src/UnitManager.cc"
81
// This file is part of PUMA.
82
// Copyright (C) 1999-2003 The PUMA developer team.
84
// This program is free software; you can redistribute it and/or
85
// modify it under the terms of the GNU General Public License as
86
// published by the Free Software Foundation; either version 2 of
87
// the License, or (at your option) any later version.
89
// This program is distributed in the hope that it will be useful,
90
// but WITHOUT ANY WARRANTY; without even the implied warranty of
91
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
92
// GNU General Public License for more details.
94
// You should have received a copy of the GNU General Public
95
// License along with this program; if not, write to the Free
96
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
100
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Unit.h"
101
// This file is part of PUMA.
102
// Copyright (C) 1999-2003 The PUMA developer team.
104
// This program is free software; you can redistribute it and/or
105
// modify it under the terms of the GNU General Public License as
106
// published by the Free Software Foundation; either version 2 of
107
// the License, or (at your option) any later version.
109
// This program is distributed in the hope that it will be useful,
110
// but WITHOUT ANY WARRANTY; without even the implied warranty of
111
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
112
// GNU General Public License for more details.
114
// You should have received a copy of the GNU General Public
115
// License along with this program; if not, write to the Free
116
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
123
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/List.h"
124
// This file is part of PUMA.
125
// Copyright (C) 1999-2003 The PUMA developer team.
127
// This program is free software; you can redistribute it and/or
128
// modify it under the terms of the GNU General Public License as
129
// published by the Free Software Foundation; either version 2 of
130
// the License, or (at your option) any later version.
132
// This program is distributed in the hope that it will be useful,
133
// but WITHOUT ANY WARRANTY; without even the implied warranty of
134
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
135
// GNU General Public License for more details.
137
// You should have received a copy of the GNU General Public
138
// License along with this program; if not, write to the Free
139
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
146
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ListElement.h"
147
// This file is part of PUMA.
148
// Copyright (C) 1999-2003 The PUMA developer team.
150
// This program is free software; you can redistribute it and/or
151
// modify it under the terms of the GNU General Public License as
152
// published by the Free Software Foundation; either version 2 of
153
// the License, or (at your option) any later version.
155
// This program is distributed in the hope that it will be useful,
156
// but WITHOUT ANY WARRANTY; without even the implied warranty of
157
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
158
// GNU General Public License for more details.
160
// You should have received a copy of the GNU General Public
161
// License along with this program; if not, write to the Free
162
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
165
#ifndef __list_element_h__
166
#define __list_element_h__
168
// Base class for objects that may be inserted into a List. Lists
169
// autonomously delete or copy list element. So it's necessary to
170
// define a destructor and a duplicate method in the derived
181
#line 182 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
186
class WinImportHandler;
190
class WinMemberExplSpec;
191
class WinTypeKeywords;
194
class ExtACBuilderCoupling;
195
class ExtACSyntaxCoupling;
199
class PragmaOnceUnitState;
204
#line 34 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ListElement.h"
206
#line 207 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
207
friend class ::CCExprResolve;
208
friend class ::CExprResolve;
209
friend class ::WinIfExists;
210
friend class ::WinImportHandler;
211
friend class ::WinMacros;
212
friend class ::WinAsm;
213
friend class ::WinDeclSpecs;
214
friend class ::WinMemberExplSpec;
215
friend class ::WinTypeKeywords;
216
friend class ::WinFriend;
217
friend class ::ExtAC;
218
friend class ::ExtACBuilderCoupling;
219
friend class ::ExtACSyntaxCoupling;
220
friend class ::ExtACTree;
221
friend class ::ExtACKeywords;
222
friend class ::ExtGnu;
223
friend class ::PragmaOnceUnitState;
224
friend class ::PragmaOnce;
225
friend class ::CMatchSyntax;
227
#line 34 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ListElement.h"
236
ListElement () : _belonging_to ((List*)0) {}
237
virtual ~ListElement () { assert (! _belonging_to); };
239
virtual ListElement *duplicate () = 0;
240
List *belonging_to () const { return _belonging_to; }
246
#endif /* __list_element_h__ */
248
#line 24 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/List.h"
253
#line 254 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
258
class WinImportHandler;
262
class WinMemberExplSpec;
263
class WinTypeKeywords;
266
class ExtACBuilderCoupling;
267
class ExtACSyntaxCoupling;
271
class PragmaOnceUnitState;
276
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/List.h"
278
#line 279 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
279
friend class ::CCExprResolve;
280
friend class ::CExprResolve;
281
friend class ::WinIfExists;
282
friend class ::WinImportHandler;
283
friend class ::WinMacros;
284
friend class ::WinAsm;
285
friend class ::WinDeclSpecs;
286
friend class ::WinMemberExplSpec;
287
friend class ::WinTypeKeywords;
288
friend class ::WinFriend;
289
friend class ::ExtAC;
290
friend class ::ExtACBuilderCoupling;
291
friend class ::ExtACSyntaxCoupling;
292
friend class ::ExtACTree;
293
friend class ::ExtACKeywords;
294
friend class ::ExtGnu;
295
friend class ::PragmaOnceUnitState;
296
friend class ::PragmaOnce;
297
friend class ::CMatchSyntax;
299
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/List.h"
305
List () : _first ((ListElement*)0), _last ((ListElement*)0) {}
309
List &operator = (const List &);
310
List &operator += (const List &);
311
List operator + (const List &);
315
void append (ListElement &);
316
void prepend (ListElement &);
317
void insert (ListElement *at, ListElement &element);
318
void remove (ListElement *element);
319
void kill (ListElement *from, ListElement *to = (ListElement*)0)
320
{ List discard; cut (discard, from, to); }
322
void cut (List &out, ListElement *from, ListElement *to = (ListElement*)0);
323
//List *cut (ListElement *from, ListElement *to = (ListElement*)0);
324
List *copy (ListElement *from = (ListElement*)0,
325
ListElement *to = (ListElement*)0);
326
void paste (ListElement *at, const List &l);
327
void paste_before (ListElement *at, const List &l);
328
void move (ListElement *at, List &l);
329
void move_before (ListElement *at, List &l);
331
bool empty () const { return _first == (ListElement*)0; }
332
const ListElement *first () const { return _first; }
333
const ListElement *last () const { return _last; }
334
const ListElement *next (const ListElement *element) const
335
{ return element ? element->_next : 0; }
336
const ListElement *prev (const ListElement *element) const
337
{ return element ? element->_prev : 0; }
343
#endif /* __list_h__ */
345
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Printable.h"
346
// This file is part of PUMA.
347
// Copyright (C) 1999-2003 The PUMA developer team.
349
// This program is free software; you can redistribute it and/or
350
// modify it under the terms of the GNU General Public License as
351
// published by the Free Software Foundation; either version 2 of
352
// the License, or (at your option) any later version.
354
// This program is distributed in the hope that it will be useful,
355
// but WITHOUT ANY WARRANTY; without even the implied warranty of
356
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
357
// GNU General Public License for more details.
359
// You should have received a copy of the GNU General Public
360
// License along with this program; if not, write to the Free
361
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
364
#ifndef __printable_h__
365
#define __printable_h__
374
#line 375 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
379
class WinImportHandler;
383
class WinMemberExplSpec;
384
class WinTypeKeywords;
387
class ExtACBuilderCoupling;
388
class ExtACSyntaxCoupling;
392
class PragmaOnceUnitState;
397
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Printable.h"
399
#line 400 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
400
friend class ::CCExprResolve;
401
friend class ::CExprResolve;
402
friend class ::WinIfExists;
403
friend class ::WinImportHandler;
404
friend class ::WinMacros;
405
friend class ::WinAsm;
406
friend class ::WinDeclSpecs;
407
friend class ::WinMemberExplSpec;
408
friend class ::WinTypeKeywords;
409
friend class ::WinFriend;
410
friend class ::ExtAC;
411
friend class ::ExtACBuilderCoupling;
412
friend class ::ExtACSyntaxCoupling;
413
friend class ::ExtACTree;
414
friend class ::ExtACKeywords;
415
friend class ::ExtGnu;
416
friend class ::PragmaOnceUnitState;
417
friend class ::PragmaOnce;
418
friend class ::CMatchSyntax;
420
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Printable.h"
423
virtual ~Printable () {}
424
virtual void print (ostream &os) const = 0;
428
inline ostream &operator << (ostream &os, const Printable &object) {
436
#endif /* __printable_h__ */
438
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
440
#line 441 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
442
#ifndef __ac_fwd_PragmaOnceUnitState__
443
#define __ac_fwd_PragmaOnceUnitState__
444
class PragmaOnceUnitState;
446
template <class JoinPoint>
447
__attribute((always_inline)) inline void invoke_PragmaOnceUnitState_PragmaOnceUnitState_a0_after (JoinPoint *tjp);
448
template <class JoinPoint>
449
__attribute((always_inline)) inline void invoke_PragmaOnceUnitState_PragmaOnceUnitState_a1_after (JoinPoint *tjp);
453
#ifndef __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
454
#define __ac_need__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
457
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
458
// This file is part of PUMA.
459
// Copyright (C) 1999-2003 The PUMA developer team.
461
// This program is free software; you can redistribute it and/or
462
// modify it under the terms of the GNU General Public License as
463
// published by the Free Software Foundation; either version 2 of
464
// the License, or (at your option) any later version.
466
// This program is distributed in the hope that it will be useful,
467
// but WITHOUT ANY WARRANTY; without even the implied warranty of
468
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
469
// GNU General Public License for more details.
471
// You should have received a copy of the GNU General Public
472
// License along with this program; if not, write to the Free
473
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
476
#ifndef __UnitState__
477
#define __UnitState__
479
// The state of a unit:
480
// 1. modified by manipulations and not updated at the class registry
481
// 2. modified by manipulations and updated at the class registry
482
// 3. unmodified by manipulations and not updated at the class registry
483
// 4. unmodified by manipulations and updated at the class registry
489
#line 490 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
494
class WinImportHandler;
498
class WinMemberExplSpec;
499
class WinTypeKeywords;
502
class ExtACBuilderCoupling;
503
class ExtACSyntaxCoupling;
507
class PragmaOnceUnitState;
512
#line 31 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
514
#line 515 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
517
#ifndef __ac_guard__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
518
#define __ac_guard__var_tmp_aspectc4343_debian_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
520
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
521
// This file is part of PUMA.
522
// Copyright (C) 1999-2003 The PUMA developer team.
524
// This program is free software; you can redistribute it and/or
525
// modify it under the terms of the GNU General Public License as
526
// published by the Free Software Foundation; either version 2 of
527
// the License, or (at your option) any later version.
529
// This program is distributed in the hope that it will be useful,
530
// but WITHOUT ANY WARRANTY; without even the implied warranty of
531
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
532
// GNU General Public License for more details.
534
// You should have received a copy of the GNU General Public
535
// License along with this program; if not, write to the Free
536
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
539
#ifndef __PragmaOnceUnitState__
540
#define __PragmaOnceUnitState__
543
#line 544 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
547
class WinImportHandler;
551
class WinMemberExplSpec;
552
class WinTypeKeywords;
555
class ExtACBuilderCoupling;
556
class ExtACSyntaxCoupling;
563
#line 22 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
564
class PragmaOnceUnitState {
565
#line 566 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
568
static PragmaOnceUnitState *aspectof () {
569
static PragmaOnceUnitState __instance;
572
static PragmaOnceUnitState *aspectOf () {
577
#line 22 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
579
#line 580 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
580
friend class ::CCExprResolve;
581
friend class ::CExprResolve;
582
friend class ::WinIfExists;
583
friend class ::WinImportHandler;
584
friend class ::WinMacros;
585
friend class ::WinAsm;
586
friend class ::WinDeclSpecs;
587
friend class ::WinMemberExplSpec;
588
friend class ::WinTypeKeywords;
589
friend class ::WinFriend;
590
friend class ::ExtAC;
591
friend class ::ExtACBuilderCoupling;
592
friend class ::ExtACSyntaxCoupling;
593
friend class ::ExtACTree;
594
friend class ::ExtACKeywords;
595
friend class ::ExtGnu;
596
friend class ::PragmaOnce;
597
friend class ::CMatchSyntax;
599
#line 22 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
601
/******************************************************/
602
/* specific #pragma once unit state */
603
/******************************************************/
605
// pointcut definitions
607
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
611
#line 37 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
614
// initialize new state flag
616
#line 3 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
618
public: template<class JoinPoint> void __a0_after
619
#line 40 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
621
#line 40 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
623
#line 40 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
625
#line 626 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
627
JoinPoint *&thisJoinPoint = tjp;
629
#line 40 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
631
#line 632 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
633
typedef typename JoinPoint::That __JP_That;
634
typedef typename JoinPoint::Target __JP_Target;
635
typedef typename JoinPoint::Result __JP_Result;
637
#line 40 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
639
thisJoinPoint->that ()->_once = false;
641
#line 642 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
645
#line 42 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
648
// initialize new flag for all managed units
650
#line 3 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
652
public: template<class JoinPoint> void __a1_after
653
#line 45 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
655
#line 45 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
657
#line 45 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
659
#line 660 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
661
typedef typename JoinPoint::That __JP_That;
662
typedef typename JoinPoint::Target __JP_Target;
663
typedef typename JoinPoint::Result __JP_Result;
665
#line 45 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
667
// go through the whole unit hash table and reset the
668
// `#pragma once' state of the units
670
#line 48 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
672
for (iter = tjp->that()->_umap.begin (); iter != tjp->that()->_umap.end (); ++iter)
673
(*iter).second->state ().onlyOnce (false);
675
#line 676 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
679
#line 51 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
683
// this aspect should never be instantiated directly
684
PragmaOnceUnitState () {}
686
#line 687 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
689
template <class JoinPoint>
690
__attribute((always_inline)) inline void invoke_PragmaOnceUnitState_PragmaOnceUnitState_a0_after (JoinPoint *tjp) {
691
::PragmaOnceUnitState::aspectof()->__a0_after (tjp);
693
template <class JoinPoint>
694
__attribute((always_inline)) inline void invoke_PragmaOnceUnitState_PragmaOnceUnitState_a1_after (JoinPoint *tjp) {
695
::PragmaOnceUnitState::aspectof()->__a1_after (tjp);
699
#line 56 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
703
#endif /* __PragmaOnceUnitState__ */
705
#line 8 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
709
#line 31 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
711
#line 712 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
712
friend class ::CCExprResolve;
713
friend class ::CExprResolve;
714
friend class ::WinIfExists;
715
friend class ::WinImportHandler;
716
friend class ::WinMacros;
717
friend class ::WinAsm;
718
friend class ::WinDeclSpecs;
719
friend class ::WinMemberExplSpec;
720
friend class ::WinTypeKeywords;
721
friend class ::WinFriend;
722
friend class ::ExtAC;
723
friend class ::ExtACBuilderCoupling;
724
friend class ::ExtACSyntaxCoupling;
725
friend class ::ExtACTree;
726
friend class ::ExtACKeywords;
727
friend class ::ExtGnu;
728
friend class ::PragmaOnceUnitState;
729
friend class ::PragmaOnce;
730
friend class ::CMatchSyntax;
732
#line 31 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
740
#line 741 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
741
public: __attribute__((always_inline)) inline void __exec_old_C1();
743
#line 37 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
746
bool isModified () const;
747
bool isUpdated () const;
748
long lastModified () const;
750
// Is modified and has to be updated.
752
void lastModified (long);
757
#line 32 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/aspects/PragmaOnceUnitState.ah"
761
bool onlyOnce ( ) const { return _once ; }
762
void onlyOnce ( bool v ) { _once = v ; }
763
#line 48 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
765
#line 766 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
767
template <typename TResult, typename TThat, typename TTarget, typename TArgs> struct TJP__ZN4Puma9UnitStateC1ERKN4PumaE9UnitState_0 {
768
typedef TJP__ZN4Puma9UnitStateC1ERKN4PumaE9UnitState_0 __TJP;
769
typedef TResult Result;
771
typedef TTarget Target;
772
enum { ARGS = TArgs::ARGS };
773
template <int I> struct Arg : AC::Arg<TArgs, I> {};
774
static const int JPID = 3280;
775
static const AC::JPType JPTYPE = (AC::JPType)16;
778
typedef void ReferredType;
783
inline That *that() {return (That*)_that;}
788
#line 48 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
790
#line 791 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
793
inline UnitState (const Puma::UnitState & arg0) : _modified (arg0._modified), _updated (arg0._updated), _lastModified (arg0._lastModified), _once (arg0._once) {
794
typedef TJP__ZN4Puma9UnitStateC1ERKN4PumaE9UnitState_0< void, ::Puma::UnitState , ::Puma::UnitState , AC::TL< const ::Puma::UnitState & , AC::TLE > > __TJP;
796
tjp._that = (__TJP::That*)this;
797
AC::invoke_PragmaOnceUnitState_PragmaOnceUnitState_a0_after<__TJP> (&tjp);
801
#line 48 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
805
#line 806 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
808
template <typename TResult, typename TThat, typename TTarget, typename TArgs> struct TJP__ZN4Puma9UnitStateC1Ev_0 {
809
typedef TJP__ZN4Puma9UnitStateC1Ev_0 __TJP;
810
typedef TResult Result;
812
typedef TTarget Target;
813
enum { ARGS = TArgs::ARGS };
814
template <int I> struct Arg : AC::Arg<TArgs, I> {};
815
static const int JPID = 3256;
816
static const AC::JPType JPTYPE = (AC::JPType)16;
819
typedef void ReferredType;
824
inline That *that() {return (That*)_that;}
829
#line 50 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
830
inline UnitState::UnitState ()
832
#line 833 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
834
typedef TJP__ZN4Puma9UnitStateC1Ev_0< void, ::Puma::UnitState , ::Puma::UnitState , AC::TLE > __TJP;
836
tjp._that = (__TJP::That*)this;
837
this->__exec_old_C1();
838
AC::invoke_PragmaOnceUnitState_PragmaOnceUnitState_a0_after<__TJP> (&tjp);
841
__attribute__((always_inline)) inline void Puma::UnitState::__exec_old_C1()
842
#line 51 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitState.h"
843
{ _modified = false; _updated = false; _lastModified = 0; }
845
inline bool UnitState::isModified () const
846
{ return _modified; }
847
inline bool UnitState::isUpdated () const
849
inline long UnitState::lastModified () const
850
{ return _lastModified; }
852
inline void UnitState::modified ()
853
{ _modified = true; _updated = false; _lastModified = 0; }
854
inline void UnitState::unmodified ()
855
{ _modified = false; }
856
inline void UnitState::updated ()
858
inline void UnitState::lastModified (long when)
859
{ _lastModified = when; }
864
#endif /* __UnitState__ */
866
#line 26 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Unit.h"
871
#line 872 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
876
class WinImportHandler;
880
class WinMemberExplSpec;
881
class WinTypeKeywords;
884
class ExtACBuilderCoupling;
885
class ExtACSyntaxCoupling;
889
class PragmaOnceUnitState;
894
#line 29 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Unit.h"
895
class Unit : public List, public Printable {
896
#line 897 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
897
friend class ::CCExprResolve;
898
friend class ::CExprResolve;
899
friend class ::WinIfExists;
900
friend class ::WinImportHandler;
901
friend class ::WinMacros;
902
friend class ::WinAsm;
903
friend class ::WinDeclSpecs;
904
friend class ::WinMemberExplSpec;
905
friend class ::WinTypeKeywords;
906
friend class ::WinFriend;
907
friend class ::ExtAC;
908
friend class ::ExtACBuilderCoupling;
909
friend class ::ExtACSyntaxCoupling;
910
friend class ::ExtACTree;
911
friend class ::ExtACKeywords;
912
friend class ::ExtGnu;
913
friend class ::PragmaOnceUnitState;
914
friend class ::PragmaOnce;
915
friend class ::CMatchSyntax;
917
#line 29 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Unit.h"
923
Unit () : List (), _name ((char*)0) {}
924
Unit (const List &list) : List (list), _name ((char*)0) {}
926
virtual void name (const char *);
927
char *name () const { return _name; }
928
virtual void print (ostream &os) const;
929
virtual bool isFile () const { return false; }
930
virtual bool isMacroExp () const { return false; }
931
UnitState &state () { return _state; }
937
#endif /* __unit_h__ */
939
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Source.h"
940
// This file is part of PUMA.
941
// Copyright (C) 1999-2003 The PUMA developer team.
943
// This program is free software; you can redistribute it and/or
944
// modify it under the terms of the GNU General Public License as
945
// published by the Free Software Foundation; either version 2 of
946
// the License, or (at your option) any later version.
948
// This program is distributed in the hope that it will be useful,
949
// but WITHOUT ANY WARRANTY; without even the implied warranty of
950
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
951
// GNU General Public License for more details.
953
// You should have received a copy of the GNU General Public
954
// License along with this program; if not, write to the Free
955
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
965
#line 966 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
970
class WinImportHandler;
974
class WinMemberExplSpec;
975
class WinTypeKeywords;
978
class ExtACBuilderCoupling;
979
class ExtACSyntaxCoupling;
983
class PragmaOnceUnitState;
988
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Source.h"
990
#line 991 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
991
friend class ::CCExprResolve;
992
friend class ::CExprResolve;
993
friend class ::WinIfExists;
994
friend class ::WinImportHandler;
995
friend class ::WinMacros;
996
friend class ::WinAsm;
997
friend class ::WinDeclSpecs;
998
friend class ::WinMemberExplSpec;
999
friend class ::WinTypeKeywords;
1000
friend class ::WinFriend;
1001
friend class ::ExtAC;
1002
friend class ::ExtACBuilderCoupling;
1003
friend class ::ExtACSyntaxCoupling;
1004
friend class ::ExtACTree;
1005
friend class ::ExtACKeywords;
1006
friend class ::ExtGnu;
1007
friend class ::PragmaOnceUnitState;
1008
friend class ::PragmaOnce;
1009
friend class ::CMatchSyntax;
1011
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Source.h"
1015
virtual ~Source () {}
1016
virtual int read (char *dest, int n) = 0;
1017
virtual int size () { return -1; }
1023
#endif /* __source_h__ */
1025
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SysCall.h"
1026
// This file is part of PUMA.
1027
// Copyright (C) 1999-2003 The PUMA developer team.
1029
// This program is free software; you can redistribute it and/or
1030
// modify it under the terms of the GNU General Public License as
1031
// published by the Free Software Foundation; either version 2 of
1032
// the License, or (at your option) any later version.
1034
// This program is distributed in the hope that it will be useful,
1035
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1036
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1037
// GNU General Public License for more details.
1039
// You should have received a copy of the GNU General Public
1040
// License along with this program; if not, write to the Free
1041
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1042
// MA 02111-1307 USA
1044
#ifndef __SysCall_h__
1045
#define __SysCall_h__
1047
// Encapsulate some system calls.
1052
#include <sys/stat.h>
1053
#include <sys/types.h>
1062
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Filename.h"
1063
// This file is part of PUMA.
1064
// Copyright (C) 1999-2003 The PUMA developer team.
1066
// This program is free software; you can redistribute it and/or
1067
// modify it under the terms of the GNU General Public License as
1068
// published by the Free Software Foundation; either version 2 of
1069
// the License, or (at your option) any later version.
1071
// This program is distributed in the hope that it will be useful,
1072
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1073
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1074
// GNU General Public License for more details.
1076
// You should have received a copy of the GNU General Public
1077
// License along with this program; if not, write to the Free
1078
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1079
// MA 02111-1307 USA
1081
#ifndef __filename_h__
1082
#define __filename_h__
1085
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SmartPtr.h"
1086
// This file is part of PUMA.
1087
// Copyright (C) 1999-2003 The PUMA developer team.
1089
// This program is free software; you can redistribute it and/or
1090
// modify it under the terms of the GNU General Public License as
1091
// published by the Free Software Foundation; either version 2 of
1092
// the License, or (at your option) any later version.
1094
// This program is distributed in the hope that it will be useful,
1095
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1096
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1097
// GNU General Public License for more details.
1099
// You should have received a copy of the GNU General Public
1100
// License along with this program; if not, write to the Free
1101
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1102
// MA 02111-1307 USA
1104
#ifndef __smart_ptr_h__
1105
#define __smart_ptr_h__
1108
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/RefCnt.h"
1109
// This file is part of PUMA.
1110
// Copyright (C) 1999-2003 The PUMA developer team.
1112
// This program is free software; you can redistribute it and/or
1113
// modify it under the terms of the GNU General Public License as
1114
// published by the Free Software Foundation; either version 2 of
1115
// the License, or (at your option) any later version.
1117
// This program is distributed in the hope that it will be useful,
1118
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1119
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1120
// GNU General Public License for more details.
1122
// You should have received a copy of the GNU General Public
1123
// License along with this program; if not, write to the Free
1124
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1125
// MA 02111-1307 USA
1127
#ifndef __ref_cnt_h__
1128
#define __ref_cnt_h__
1134
#line 1135 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1136
class CCExprResolve;
1139
class WinImportHandler;
1143
class WinMemberExplSpec;
1144
class WinTypeKeywords;
1147
class ExtACBuilderCoupling;
1148
class ExtACSyntaxCoupling;
1150
class ExtACKeywords;
1152
class PragmaOnceUnitState;
1157
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/RefCnt.h"
1159
#line 1160 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1160
friend class ::CCExprResolve;
1161
friend class ::CExprResolve;
1162
friend class ::WinIfExists;
1163
friend class ::WinImportHandler;
1164
friend class ::WinMacros;
1165
friend class ::WinAsm;
1166
friend class ::WinDeclSpecs;
1167
friend class ::WinMemberExplSpec;
1168
friend class ::WinTypeKeywords;
1169
friend class ::WinFriend;
1170
friend class ::ExtAC;
1171
friend class ::ExtACBuilderCoupling;
1172
friend class ::ExtACSyntaxCoupling;
1173
friend class ::ExtACTree;
1174
friend class ::ExtACKeywords;
1175
friend class ::ExtGnu;
1176
friend class ::PragmaOnceUnitState;
1177
friend class ::PragmaOnce;
1178
friend class ::CMatchSyntax;
1180
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/RefCnt.h"
1185
RefCnt () : _counter (0) {}
1186
virtual ~RefCnt () {}
1188
void ref () { _counter++; }
1189
void deref () { _counter--; }
1190
int counter () { return _counter; }
1196
#endif /* __ref_cnt_h__ */
1198
#line 24 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SmartPtr.h"
1203
#line 1204 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1205
class CCExprResolve;
1208
class WinImportHandler;
1212
class WinMemberExplSpec;
1213
class WinTypeKeywords;
1216
class ExtACBuilderCoupling;
1217
class ExtACSyntaxCoupling;
1219
class ExtACKeywords;
1221
class PragmaOnceUnitState;
1226
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SmartPtr.h"
1228
#line 1229 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1229
friend class ::CCExprResolve;
1230
friend class ::CExprResolve;
1231
friend class ::WinIfExists;
1232
friend class ::WinImportHandler;
1233
friend class ::WinMacros;
1234
friend class ::WinAsm;
1235
friend class ::WinDeclSpecs;
1236
friend class ::WinMemberExplSpec;
1237
friend class ::WinTypeKeywords;
1238
friend class ::WinFriend;
1239
friend class ::ExtAC;
1240
friend class ::ExtACBuilderCoupling;
1241
friend class ::ExtACSyntaxCoupling;
1242
friend class ::ExtACTree;
1243
friend class ::ExtACKeywords;
1244
friend class ::ExtGnu;
1245
friend class ::PragmaOnceUnitState;
1246
friend class ::PragmaOnce;
1247
friend class ::CMatchSyntax;
1249
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SmartPtr.h"
1254
SmartPtr () : _data ((RefCnt*)0) {}
1255
~SmartPtr () { clear (); }
1256
SmartPtr (const SmartPtr ©);
1257
SmartPtr (RefCnt *rc) : _data (rc) {}
1258
SmartPtr &operator = (const SmartPtr ©);
1260
void data (RefCnt *d);
1262
RefCnt *data () const { return _data; }
1263
bool is_defined () const { return _data != (RefCnt*)0; }
1269
#endif /* __smart_ptr_h__ */
1271
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FilenameInfo.h"
1272
// This file is part of PUMA.
1273
// Copyright (C) 1999-2003 The PUMA developer team.
1275
// This program is free software; you can redistribute it and/or
1276
// modify it under the terms of the GNU General Public License as
1277
// published by the Free Software Foundation; either version 2 of
1278
// the License, or (at your option) any later version.
1280
// This program is distributed in the hope that it will be useful,
1281
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1282
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1283
// GNU General Public License for more details.
1285
// You should have received a copy of the GNU General Public
1286
// License along with this program; if not, write to the Free
1287
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1288
// MA 02111-1307 USA
1290
#ifndef __filename_info_h__
1291
#define __filename_info_h__
1294
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/DString.h"
1295
// This file is part of PUMA.
1296
// Copyright (C) 1999-2003 The PUMA developer team.
1298
// This program is free software; you can redistribute it and/or
1299
// modify it under the terms of the GNU General Public License as
1300
// published by the Free Software Foundation; either version 2 of
1301
// the License, or (at your option) any later version.
1303
// This program is distributed in the hope that it will be useful,
1304
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1305
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1306
// GNU General Public License for more details.
1308
// You should have received a copy of the GNU General Public
1309
// License along with this program; if not, write to the Free
1310
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1311
// MA 02111-1307 USA
1313
#ifndef __DString_h__
1314
#define __DString_h__
1317
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashTable.h"
1318
// This file is part of PUMA.
1319
// Copyright (C) 1999-2003 The PUMA developer team.
1321
// This program is free software; you can redistribute it and/or
1322
// modify it under the terms of the GNU General Public License as
1323
// published by the Free Software Foundation; either version 2 of
1324
// the License, or (at your option) any later version.
1326
// This program is distributed in the hope that it will be useful,
1327
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1328
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1329
// GNU General Public License for more details.
1331
// You should have received a copy of the GNU General Public
1332
// License along with this program; if not, write to the Free
1333
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1334
// MA 02111-1307 USA
1336
#ifndef __StrHashTable_h__
1337
#define __StrHashTable_h__
1340
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashKey.h"
1341
// This file is part of PUMA.
1342
// Copyright (C) 1999-2003 The PUMA developer team.
1344
// This program is free software; you can redistribute it and/or
1345
// modify it under the terms of the GNU General Public License as
1346
// published by the Free Software Foundation; either version 2 of
1347
// the License, or (at your option) any later version.
1349
// This program is distributed in the hope that it will be useful,
1350
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1351
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1352
// GNU General Public License for more details.
1354
// You should have received a copy of the GNU General Public
1355
// License along with this program; if not, write to the Free
1356
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1357
// MA 02111-1307 USA
1359
#ifndef __StrHashKey_h__
1360
#define __StrHashKey_h__
1363
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrCol.h"
1364
// This file is part of PUMA.
1365
// Copyright (C) 1999-2003 The PUMA developer team.
1367
// This program is free software; you can redistribute it and/or
1368
// modify it under the terms of the GNU General Public License as
1369
// published by the Free Software Foundation; either version 2 of
1370
// the License, or (at your option) any later version.
1372
// This program is distributed in the hope that it will be useful,
1373
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1374
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1375
// GNU General Public License for more details.
1377
// You should have received a copy of the GNU General Public
1378
// License along with this program; if not, write to the Free
1379
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1380
// MA 02111-1307 USA
1385
// Collection of functions handling strings.
1393
#line 1394 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1395
class CCExprResolve;
1398
class WinImportHandler;
1402
class WinMemberExplSpec;
1403
class WinTypeKeywords;
1406
class ExtACBuilderCoupling;
1407
class ExtACSyntaxCoupling;
1409
class ExtACKeywords;
1411
class PragmaOnceUnitState;
1416
#line 29 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrCol.h"
1418
#line 1419 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1419
friend class ::CCExprResolve;
1420
friend class ::CExprResolve;
1421
friend class ::WinIfExists;
1422
friend class ::WinImportHandler;
1423
friend class ::WinMacros;
1424
friend class ::WinAsm;
1425
friend class ::WinDeclSpecs;
1426
friend class ::WinMemberExplSpec;
1427
friend class ::WinTypeKeywords;
1428
friend class ::WinFriend;
1429
friend class ::ExtAC;
1430
friend class ::ExtACBuilderCoupling;
1431
friend class ::ExtACSyntaxCoupling;
1432
friend class ::ExtACTree;
1433
friend class ::ExtACKeywords;
1434
friend class ::ExtGnu;
1435
friend class ::PragmaOnceUnitState;
1436
friend class ::PragmaOnce;
1437
friend class ::CMatchSyntax;
1439
#line 29 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrCol.h"
1445
// Return true if c is a white space character.
1446
static bool isSpace (const char c);
1448
// Return true if the string consists only of spaces.
1449
static bool onlySpaces (const char *);
1451
// Return true if the two strings differ not only in spaces.
1452
static bool effectivelyDifferent (const char *, const char *);
1454
// Build a string from a unit.
1455
static char *buildString (Unit *);
1457
// Duplicate a string
1458
static char *dup (const char *);
1459
static char *dup (const char *, int);
1465
#endif /* __str_col__ */
1467
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Chain.h"
1468
// This file is part of PUMA.
1469
// Copyright (C) 1999-2003 The PUMA developer team.
1471
// This program is free software; you can redistribute it and/or
1472
// modify it under the terms of the GNU General Public License as
1473
// published by the Free Software Foundation; either version 2 of
1474
// the License, or (at your option) any later version.
1476
// This program is distributed in the hope that it will be useful,
1477
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1478
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1479
// GNU General Public License for more details.
1481
// You should have received a copy of the GNU General Public
1482
// License along with this program; if not, write to the Free
1483
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1484
// MA 02111-1307 USA
1490
// implements a simple chain
1495
using namespace std;
1502
#line 1503 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1504
class CCExprResolve;
1507
class WinImportHandler;
1511
class WinMemberExplSpec;
1512
class WinTypeKeywords;
1515
class ExtACBuilderCoupling;
1516
class ExtACSyntaxCoupling;
1518
class ExtACKeywords;
1520
class PragmaOnceUnitState;
1525
#line 34 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Chain.h"
1527
#line 1528 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1528
friend class ::CCExprResolve;
1529
friend class ::CExprResolve;
1530
friend class ::WinIfExists;
1531
friend class ::WinImportHandler;
1532
friend class ::WinMacros;
1533
friend class ::WinAsm;
1534
friend class ::WinDeclSpecs;
1535
friend class ::WinMemberExplSpec;
1536
friend class ::WinTypeKeywords;
1537
friend class ::WinFriend;
1538
friend class ::ExtAC;
1539
friend class ::ExtACBuilderCoupling;
1540
friend class ::ExtACSyntaxCoupling;
1541
friend class ::ExtACTree;
1542
friend class ::ExtACKeywords;
1543
friend class ::ExtGnu;
1544
friend class ::PragmaOnceUnitState;
1545
friend class ::PragmaOnce;
1546
friend class ::CMatchSyntax;
1548
#line 34 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Chain.h"
1553
Chain () { next = 0; }
1555
void select (Chain *c) { next = c; }
1556
Chain *select () const { return next; }
1561
next = next->select ();
1566
void insert (Chain *c) {
1576
// Chain with useage/max counter
1579
class ChainCnt : public Chain {
1585
ChainCnt (const char *n) : name (n) { max = use = 0; }
1587
cout << "max list " << name << ": " << max << endl;
1591
Chain *c = Chain::unlink ();
1597
void insert (Chain *c) {
1610
#endif /* __Chain_h__ */
1612
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashKey.h"
1617
#line 1618 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1619
class CCExprResolve;
1622
class WinImportHandler;
1626
class WinMemberExplSpec;
1627
class WinTypeKeywords;
1630
class ExtACBuilderCoupling;
1631
class ExtACSyntaxCoupling;
1633
class ExtACKeywords;
1635
class PragmaOnceUnitState;
1640
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashKey.h"
1641
class StrHashKey : public Chain {
1642
#line 1643 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1643
friend class ::CCExprResolve;
1644
friend class ::CExprResolve;
1645
friend class ::WinIfExists;
1646
friend class ::WinImportHandler;
1647
friend class ::WinMacros;
1648
friend class ::WinAsm;
1649
friend class ::WinDeclSpecs;
1650
friend class ::WinMemberExplSpec;
1651
friend class ::WinTypeKeywords;
1652
friend class ::WinFriend;
1653
friend class ::ExtAC;
1654
friend class ::ExtACBuilderCoupling;
1655
friend class ::ExtACSyntaxCoupling;
1656
friend class ::ExtACTree;
1657
friend class ::ExtACKeywords;
1658
friend class ::ExtGnu;
1659
friend class ::PragmaOnceUnitState;
1660
friend class ::PragmaOnce;
1661
friend class ::CMatchSyntax;
1663
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashKey.h"
1665
unsigned int m_Magic;
1669
StrHashKey () : m_Len (0), m_Str (0) {}
1672
StrHashKey (int m, const char *s, int l) :
1673
m_Magic (m), m_Len (l), m_Str (StrCol::dup (s, l)) {}
1674
~StrHashKey () { if (m_Str) delete[] m_Str; }
1676
unsigned int getMagic () const { return m_Magic; }
1677
unsigned int length () const { return m_Len; }
1678
const char *c_str () const { return m_Str; }
1684
#endif /* __StrHashKey_h__ */
1686
#line 23 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashTable.h"
1693
#line 1694 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1695
class CCExprResolve;
1698
class WinImportHandler;
1702
class WinMemberExplSpec;
1703
class WinTypeKeywords;
1706
class ExtACBuilderCoupling;
1707
class ExtACSyntaxCoupling;
1709
class ExtACKeywords;
1711
class PragmaOnceUnitState;
1716
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashTable.h"
1717
class StrHashTable {
1718
#line 1719 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1719
friend class ::CCExprResolve;
1720
friend class ::CExprResolve;
1721
friend class ::WinIfExists;
1722
friend class ::WinImportHandler;
1723
friend class ::WinMacros;
1724
friend class ::WinAsm;
1725
friend class ::WinDeclSpecs;
1726
friend class ::WinMemberExplSpec;
1727
friend class ::WinTypeKeywords;
1728
friend class ::WinFriend;
1729
friend class ::ExtAC;
1730
friend class ::ExtACBuilderCoupling;
1731
friend class ::ExtACSyntaxCoupling;
1732
friend class ::ExtACTree;
1733
friend class ::ExtACKeywords;
1734
friend class ::ExtGnu;
1735
friend class ::PragmaOnceUnitState;
1736
friend class ::PragmaOnce;
1737
friend class ::CMatchSyntax;
1739
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/StrHashTable.h"
1741
StrHashKey *_emptyKey;
1745
_emptyKey = insert ("");
1749
StrHashKey *empty () const { assert (_emptyKey); return _emptyKey; }
1750
StrHashKey *insert (const char *);
1751
void remove (StrHashKey *);
1754
enum { STRHASHTABLE_SIZE=0xffff };
1757
Chain m_Table[STRHASHTABLE_SIZE];
1759
StrHashKey *find (unsigned int, const char *, unsigned int);
1760
unsigned int hash (const char *, unsigned int &);
1766
#endif /* __StrHashTable_h__ */
1768
#line 23 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/DString.h"
1774
extern StrHashTable ___str_dict;
1777
#line 1778 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1779
class CCExprResolve;
1782
class WinImportHandler;
1786
class WinMemberExplSpec;
1787
class WinTypeKeywords;
1790
class ExtACBuilderCoupling;
1791
class ExtACSyntaxCoupling;
1793
class ExtACKeywords;
1795
class PragmaOnceUnitState;
1800
#line 30 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/DString.h"
1802
#line 1803 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1803
friend class ::CCExprResolve;
1804
friend class ::CExprResolve;
1805
friend class ::WinIfExists;
1806
friend class ::WinImportHandler;
1807
friend class ::WinMacros;
1808
friend class ::WinAsm;
1809
friend class ::WinDeclSpecs;
1810
friend class ::WinMemberExplSpec;
1811
friend class ::WinTypeKeywords;
1812
friend class ::WinFriend;
1813
friend class ::ExtAC;
1814
friend class ::ExtACBuilderCoupling;
1815
friend class ::ExtACSyntaxCoupling;
1816
friend class ::ExtACTree;
1817
friend class ::ExtACKeywords;
1818
friend class ::ExtGnu;
1819
friend class ::PragmaOnceUnitState;
1820
friend class ::PragmaOnce;
1821
friend class ::CMatchSyntax;
1823
#line 30 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/DString.h"
1829
m_Key = ___str_dict.empty ();
1832
DString (const char *s) {
1834
m_Key = ___str_dict.empty ();
1836
m_Key = ___str_dict.insert (s);
1840
DString (const DString &s) : m_Key (s.m_Key) {
1844
DString &operator = (const DString &s) {
1850
DString &operator = (const char *s) {
1852
m_Key = ___str_dict.empty ();
1854
m_Key = ___str_dict.insert (s);
1860
bool operator == (const DString &s) const {
1861
assert (m_Key && s.m_Key);
1862
return m_Key == s.m_Key;
1864
bool operator != (const DString &s) const {
1865
assert (m_Key && s.m_Key);
1866
return m_Key != s.m_Key;
1869
const char *c_str() const {
1871
return m_Key->c_str ();
1873
unsigned int length () const {
1875
return m_Key->length ();
1877
bool empty () const {
1879
return m_Key->length () == 0;
1881
unsigned int magic () const {
1883
return m_Key->getMagic ();
1886
operator const char *() const {
1891
static void clearDict() {
1892
___str_dict.clear ();
1899
#endif /* __DString_h__ */
1901
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FilenameInfo.h"
1906
#line 1907 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1908
class CCExprResolve;
1911
class WinImportHandler;
1915
class WinMemberExplSpec;
1916
class WinTypeKeywords;
1919
class ExtACBuilderCoupling;
1920
class ExtACSyntaxCoupling;
1922
class ExtACKeywords;
1924
class PragmaOnceUnitState;
1929
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FilenameInfo.h"
1930
class FilenameInfo : public RefCnt {
1931
#line 1932 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1932
friend class ::CCExprResolve;
1933
friend class ::CExprResolve;
1934
friend class ::WinIfExists;
1935
friend class ::WinImportHandler;
1936
friend class ::WinMacros;
1937
friend class ::WinAsm;
1938
friend class ::WinDeclSpecs;
1939
friend class ::WinMemberExplSpec;
1940
friend class ::WinTypeKeywords;
1941
friend class ::WinFriend;
1942
friend class ::ExtAC;
1943
friend class ::ExtACBuilderCoupling;
1944
friend class ::ExtACSyntaxCoupling;
1945
friend class ::ExtACTree;
1946
friend class ::ExtACKeywords;
1947
friend class ::ExtGnu;
1948
friend class ::PragmaOnceUnitState;
1949
friend class ::PragmaOnce;
1950
friend class ::CMatchSyntax;
1952
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FilenameInfo.h"
1959
FilenameInfo () : _path ((const char*)0), _root ((const char*)0) {}
1961
void name (const char *n);
1962
// void name (const DString &dsn) { _name = dsn; }
1963
const char *name () const { return _name.c_str (); }
1964
const char *path ();
1965
const char *root ();
1966
bool is_absolute () const;
1967
bool operator == (const FilenameInfo &rc) const {
1968
return _name == rc._name;
1975
#endif /* __filename_info_h__ */
1977
#line 26 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Filename.h"
1982
#line 1983 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
1984
class CCExprResolve;
1987
class WinImportHandler;
1991
class WinMemberExplSpec;
1992
class WinTypeKeywords;
1995
class ExtACBuilderCoupling;
1996
class ExtACSyntaxCoupling;
1998
class ExtACKeywords;
2000
class PragmaOnceUnitState;
2005
#line 29 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Filename.h"
2006
class Filename : public SmartPtr, public Printable {
2007
#line 2008 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2008
friend class ::CCExprResolve;
2009
friend class ::CExprResolve;
2010
friend class ::WinIfExists;
2011
friend class ::WinImportHandler;
2012
friend class ::WinMacros;
2013
friend class ::WinAsm;
2014
friend class ::WinDeclSpecs;
2015
friend class ::WinMemberExplSpec;
2016
friend class ::WinTypeKeywords;
2017
friend class ::WinFriend;
2018
friend class ::ExtAC;
2019
friend class ::ExtACBuilderCoupling;
2020
friend class ::ExtACSyntaxCoupling;
2021
friend class ::ExtACTree;
2022
friend class ::ExtACKeywords;
2023
friend class ::ExtGnu;
2024
friend class ::PragmaOnceUnitState;
2025
friend class ::PragmaOnce;
2026
friend class ::CMatchSyntax;
2028
#line 29 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Filename.h"
2030
FilenameInfo *info () const { return (FilenameInfo*)data (); }
2034
Filename (const char *n) { name (n); }
2035
Filename &operator = (const char *n) { name (n); return *this; }
2036
bool operator ~ () const { return info () != 0; }
2037
void name (const char *n);
2038
const char *name () const;
2039
const char *path () const;
2040
const char *root () const;
2041
bool is_absolute () const;
2042
bool operator == (const Filename &f) const;
2043
bool operator != (const Filename &f) const { return !(*this == f); }
2044
virtual void print (ostream &os) const { if (info ()) os << name (); }
2050
#endif /* __filename_h__ */
2052
#line 38 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SysCall.h"
2058
#line 2059 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2060
class CCExprResolve;
2063
class WinImportHandler;
2067
class WinMemberExplSpec;
2068
class WinTypeKeywords;
2071
class ExtACBuilderCoupling;
2072
class ExtACSyntaxCoupling;
2074
class ExtACKeywords;
2076
class PragmaOnceUnitState;
2081
#line 42 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SysCall.h"
2083
#line 2084 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2084
friend class ::CCExprResolve;
2085
friend class ::CExprResolve;
2086
friend class ::WinIfExists;
2087
friend class ::WinImportHandler;
2088
friend class ::WinMacros;
2089
friend class ::WinAsm;
2090
friend class ::WinDeclSpecs;
2091
friend class ::WinMemberExplSpec;
2092
friend class ::WinTypeKeywords;
2093
friend class ::WinFriend;
2094
friend class ::ExtAC;
2095
friend class ::ExtACBuilderCoupling;
2096
friend class ::ExtACSyntaxCoupling;
2097
friend class ::ExtACTree;
2098
friend class ::ExtACKeywords;
2099
friend class ::ExtGnu;
2100
friend class ::PragmaOnceUnitState;
2101
friend class ::PragmaOnce;
2102
friend class ::CMatchSyntax;
2104
#line 42 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SysCall.h"
2106
friend class SysCall;
2114
bool is_dir () const {
2116
return _S_IFDIR & _info.st_mode;
2118
return S_ISDIR (_info.st_mode);
2121
time_t modi_time () const { return _info.st_mtime; }
2122
int size () const { return _info.st_size; }
2128
DIR (long h) : _handle (h) {}
2132
typedef DIR *DirHandle;
2133
typedef FILE *FileHandle;
2138
#line 2139 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2140
class CCExprResolve;
2143
class WinImportHandler;
2147
class WinMemberExplSpec;
2148
class WinTypeKeywords;
2151
class ExtACBuilderCoupling;
2152
class ExtACSyntaxCoupling;
2154
class ExtACKeywords;
2156
class PragmaOnceUnitState;
2161
#line 74 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SysCall.h"
2163
#line 2164 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2164
friend class ::CCExprResolve;
2165
friend class ::CExprResolve;
2166
friend class ::WinIfExists;
2167
friend class ::WinImportHandler;
2168
friend class ::WinMacros;
2169
friend class ::WinAsm;
2170
friend class ::WinDeclSpecs;
2171
friend class ::WinMemberExplSpec;
2172
friend class ::WinTypeKeywords;
2173
friend class ::WinFriend;
2174
friend class ::ExtAC;
2175
friend class ::ExtACBuilderCoupling;
2176
friend class ::ExtACSyntaxCoupling;
2177
friend class ::ExtACTree;
2178
friend class ::ExtACKeywords;
2179
friend class ::ExtGnu;
2180
friend class ::PragmaOnceUnitState;
2181
friend class ::PragmaOnce;
2182
friend class ::CMatchSyntax;
2184
#line 74 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/SysCall.h"
2186
static void printerror (ErrorSink *, const char *,
2187
const char * = (const char *)0);
2188
static void printerror (ErrorSink *, const char *, int);
2193
// create temporary file name, needs to be freed by caller
2194
static const char* mktemp (const char *prefix, ErrorSink * = (ErrorSink *)0);
2196
// open/create/close file with exclusive file locking
2197
static int open_excl (const char *, int, ErrorSink * = (ErrorSink *)0);
2198
static int create_excl (const char *, int, ErrorSink * = (ErrorSink *)0);
2199
static bool close_excl (int, ErrorSink * = (ErrorSink *)0);
2201
// open/create/close file
2202
static int open (const char *, int, ErrorSink * = (ErrorSink *)0);
2203
static int create (const char *, int, ErrorSink * = (ErrorSink *)0);
2204
static bool close (int, ErrorSink * = (ErrorSink *)0);
2206
// read from file descriptor
2207
static long read (int, void *, size_t, ErrorSink * = (ErrorSink *)0);
2210
static bool stat (const char *, FileInfo &, ErrorSink * = (ErrorSink *)0);
2211
static bool fstat (int, FileInfo &, ErrorSink * = (ErrorSink *)0);
2212
static char* readlink (const char*, char*, size_t, ErrorSink * = (ErrorSink *)0);
2214
// open/close file stream
2215
static FileHandle fopen (const char *, const char *, ErrorSink * = (ErrorSink *)0);
2216
static bool fclose (FileHandle, ErrorSink * = (ErrorSink *)0);
2218
// open/close directory stream
2219
static DirHandle opendir (const char *, ErrorSink * = (ErrorSink *)0);
2220
static bool closedir (DirHandle, ErrorSink * = (ErrorSink *)0);
2222
// read from directory stream
2223
static const char *readdir (DirHandle, ErrorSink * = (ErrorSink *)0);
2226
static bool chdir (const char *, ErrorSink * = (ErrorSink *)0);
2229
static bool mkdir (const char *, ErrorSink * = (ErrorSink *)0);
2231
// get current working directory
2232
static char *getcwd (char *, size_t, ErrorSink * = (ErrorSink *)0);
2235
static time_t time (time_t *, ErrorSink * = (ErrorSink *)0);
2237
// platform depended path handling
2238
static void MakeUnixPath (char*);
2239
static void MakeDosPath (char*);
2242
// normalize an absolute Win32 filename of an exisiting file
2243
static bool normalize (Filename filename, Filename &norm, ErrorSink *err);
2246
// return a canonical path name for an exisiting file
2247
static bool canonical (Filename filename, Filename &result, ErrorSink * = 0);
2253
#endif /* __SysCall_h__ */
2255
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileUnit.h"
2256
// This file is part of PUMA.
2257
// Copyright (C) 1999-2003 The PUMA developer team.
2259
// This program is free software; you can redistribute it and/or
2260
// modify it under the terms of the GNU General Public License as
2261
// published by the Free Software Foundation; either version 2 of
2262
// the License, or (at your option) any later version.
2264
// This program is distributed in the hope that it will be useful,
2265
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2266
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2267
// GNU General Public License for more details.
2269
// You should have received a copy of the GNU General Public
2270
// License along with this program; if not, write to the Free
2271
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2272
// MA 02111-1307 USA
2274
#ifndef __FileUnit__
2275
#define __FileUnit__
2277
// Special Unit for files. Knows its last save location and the
2278
// absolute path of the corresponding file.
2281
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileUnit.h"
2288
#line 2289 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2290
class CCExprResolve;
2293
class WinImportHandler;
2297
class WinMemberExplSpec;
2298
class WinTypeKeywords;
2301
class ExtACBuilderCoupling;
2302
class ExtACSyntaxCoupling;
2304
class ExtACKeywords;
2306
class PragmaOnceUnitState;
2311
#line 32 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileUnit.h"
2312
class FileUnit : public Unit {
2313
#line 2314 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2314
friend class ::CCExprResolve;
2315
friend class ::CExprResolve;
2316
friend class ::WinIfExists;
2317
friend class ::WinImportHandler;
2318
friend class ::WinMacros;
2319
friend class ::WinAsm;
2320
friend class ::WinDeclSpecs;
2321
friend class ::WinMemberExplSpec;
2322
friend class ::WinTypeKeywords;
2323
friend class ::WinFriend;
2324
friend class ::ExtAC;
2325
friend class ::ExtACBuilderCoupling;
2326
friend class ::ExtACSyntaxCoupling;
2327
friend class ::ExtACTree;
2328
friend class ::ExtACKeywords;
2329
friend class ::ExtGnu;
2330
friend class ::PragmaOnceUnitState;
2331
friend class ::PragmaOnce;
2332
friend class ::CMatchSyntax;
2334
#line 32 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileUnit.h"
2336
char *_lastLocation;
2337
char *_absolutePath;
2345
FileUnit (const List &);
2346
virtual ~FileUnit ();
2348
virtual void name (const char *);
2349
void setLocation (const char *);
2351
char *lastLocation () const;
2352
char *absolutePath () const;
2353
bool isFile () const;
2355
// Generates the absolute pathname to the file.
2356
static char *absolutePath (const char *);
2357
static char *resolvePath (const char *);
2359
// File belongs to given project?
2360
bool belongsTo (Project &);
2363
inline FileUnit::FileUnit () :
2365
_lastLocation ((char*)0),
2366
_absolutePath ((char*)0),
2370
inline FileUnit::FileUnit (Unit &unit) :
2372
_lastLocation ((char*)0),
2373
_absolutePath ((char*)0),
2377
inline FileUnit::FileUnit (const List &list) :
2379
_lastLocation ((char*)0),
2380
_absolutePath ((char*)0),
2384
inline FileUnit::~FileUnit ()
2385
{ if (_lastLocation) delete[] _lastLocation;
2386
if (_absolutePath) delete[] _absolutePath; }
2388
inline char *FileUnit::lastLocation () const
2389
{ return _lastLocation; }
2390
inline char *FileUnit::absolutePath () const
2391
{ return _absolutePath; }
2392
inline bool FileUnit::isFile () const
2398
#endif /* __FileUnit__ */
2400
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileSource.h"
2401
// This file is part of PUMA.
2402
// Copyright (C) 1999-2003 The PUMA developer team.
2404
// This program is free software; you can redistribute it and/or
2405
// modify it under the terms of the GNU General Public License as
2406
// published by the Free Software Foundation; either version 2 of
2407
// the License, or (at your option) any later version.
2409
// This program is distributed in the hope that it will be useful,
2410
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2411
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2412
// GNU General Public License for more details.
2414
// You should have received a copy of the GNU General Public
2415
// License along with this program; if not, write to the Free
2416
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2417
// MA 02111-1307 USA
2419
#ifndef __file_source_h__
2420
#define __file_source_h__
2423
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorSink.h"
2424
// This file is part of PUMA.
2425
// Copyright (C) 1999-2003 The PUMA developer team.
2427
// This program is free software; you can redistribute it and/or
2428
// modify it under the terms of the GNU General Public License as
2429
// published by the Free Software Foundation; either version 2 of
2430
// the License, or (at your option) any later version.
2432
// This program is distributed in the hope that it will be useful,
2433
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2434
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2435
// GNU General Public License for more details.
2437
// You should have received a copy of the GNU General Public
2438
// License along with this program; if not, write to the Free
2439
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2440
// MA 02111-1307 USA
2442
#ifndef __error_sink_h__
2443
#define __error_sink_h__
2445
// This is an interface for classes that may be used to consume error
2446
// messages during a process where many errors can occur like parsing
2448
// The error information is handed over to the ErrorSink in stream-like
2449
// style. Different severities of errors are predefined and can be used
2450
// to classify error information that follows. Also a location can be
2451
// handed over to the ErrorSink to specify where the error was found
2452
// (filename, line, etc.). The error information itself can be of any
2453
// standard data type or anything that is "Printable".
2454
// Specializations of this class could either build and print error
2455
// messages or collect them for a later processing.
2458
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorSeverity.h"
2459
// This file is part of PUMA.
2460
// Copyright (C) 1999-2003 The PUMA developer team.
2462
// This program is free software; you can redistribute it and/or
2463
// modify it under the terms of the GNU General Public License as
2464
// published by the Free Software Foundation; either version 2 of
2465
// the License, or (at your option) any later version.
2467
// This program is distributed in the hope that it will be useful,
2468
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2469
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2470
// GNU General Public License for more details.
2472
// You should have received a copy of the GNU General Public
2473
// License along with this program; if not, write to the Free
2474
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2475
// MA 02111-1307 USA
2477
#ifndef __error_severity_h__
2478
#define __error_severity_h__
2480
// Severity of errors: represented by a short integer and a text
2486
#line 2487 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2488
class CCExprResolve;
2491
class WinImportHandler;
2495
class WinMemberExplSpec;
2496
class WinTypeKeywords;
2499
class ExtACBuilderCoupling;
2500
class ExtACSyntaxCoupling;
2502
class ExtACKeywords;
2504
class PragmaOnceUnitState;
2509
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorSeverity.h"
2510
class ErrorSeverity {
2511
#line 2512 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2512
friend class ::CCExprResolve;
2513
friend class ::CExprResolve;
2514
friend class ::WinIfExists;
2515
friend class ::WinImportHandler;
2516
friend class ::WinMacros;
2517
friend class ::WinAsm;
2518
friend class ::WinDeclSpecs;
2519
friend class ::WinMemberExplSpec;
2520
friend class ::WinTypeKeywords;
2521
friend class ::WinFriend;
2522
friend class ::ExtAC;
2523
friend class ::ExtACBuilderCoupling;
2524
friend class ::ExtACSyntaxCoupling;
2525
friend class ::ExtACTree;
2526
friend class ::ExtACKeywords;
2527
friend class ::ExtGnu;
2528
friend class ::PragmaOnceUnitState;
2529
friend class ::PragmaOnce;
2530
friend class ::CMatchSyntax;
2532
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorSeverity.h"
2534
unsigned short _severity;
2538
ErrorSeverity (unsigned short s = 0, const char* t = (const char*)0) :
2539
_severity (s), _text (t) {}
2540
ErrorSeverity (const ErrorSeverity &s) :
2541
_severity (s._severity), _text (s._text) {}
2542
ErrorSeverity &operator =(const ErrorSeverity &s)
2543
{ _severity = s._severity; _text = s._text; return *this; }
2545
int operator < (const ErrorSeverity &s) const
2546
{ return _severity < s._severity; }
2547
int operator > (const ErrorSeverity &s) const
2548
{ return _severity > s._severity; }
2549
int operator <= (const ErrorSeverity &s) const
2550
{ return _severity < s._severity || _severity == s._severity; }
2551
int operator >= (const ErrorSeverity &s) const
2552
{ return _severity > s._severity || _severity == s._severity; }
2553
int operator == (const ErrorSeverity &s) const
2554
{ return _severity == s._severity; }
2555
int operator != (const ErrorSeverity &s) const
2556
{ return _severity != s._severity; }
2557
const char *text () const
2561
extern const ErrorSeverity sev_none;
2562
extern const ErrorSeverity sev_message;
2563
extern const ErrorSeverity sev_warning;
2564
extern const ErrorSeverity sev_error;
2565
extern const ErrorSeverity sev_fatal;
2570
#endif /* __error_severity_h__ */
2572
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Location.h"
2573
// This file is part of PUMA.
2574
// Copyright (C) 1999-2003 The PUMA developer team.
2576
// This program is free software; you can redistribute it and/or
2577
// modify it under the terms of the GNU General Public License as
2578
// published by the Free Software Foundation; either version 2 of
2579
// the License, or (at your option) any later version.
2581
// This program is distributed in the hope that it will be useful,
2582
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2583
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2584
// GNU General Public License for more details.
2586
// You should have received a copy of the GNU General Public
2587
// License along with this program; if not, write to the Free
2588
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2589
// MA 02111-1307 USA
2591
#ifndef __location_h__
2592
#define __location_h__
2595
#line 24 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Location.h"
2600
#line 2601 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2602
class CCExprResolve;
2605
class WinImportHandler;
2609
class WinMemberExplSpec;
2610
class WinTypeKeywords;
2613
class ExtACBuilderCoupling;
2614
class ExtACSyntaxCoupling;
2616
class ExtACKeywords;
2618
class PragmaOnceUnitState;
2623
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Location.h"
2625
#line 2626 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2626
friend class ::CCExprResolve;
2627
friend class ::CExprResolve;
2628
friend class ::WinIfExists;
2629
friend class ::WinImportHandler;
2630
friend class ::WinMacros;
2631
friend class ::WinAsm;
2632
friend class ::WinDeclSpecs;
2633
friend class ::WinMemberExplSpec;
2634
friend class ::WinTypeKeywords;
2635
friend class ::WinFriend;
2636
friend class ::ExtAC;
2637
friend class ::ExtACBuilderCoupling;
2638
friend class ::ExtACSyntaxCoupling;
2639
friend class ::ExtACTree;
2640
friend class ::ExtACKeywords;
2641
friend class ::ExtGnu;
2642
friend class ::PragmaOnceUnitState;
2643
friend class ::PragmaOnce;
2644
friend class ::CMatchSyntax;
2646
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Location.h"
2653
Location () : _filename (), _line (0), _column (0) {}
2654
Location (Filename f, int l, int c = 0) { setup (f, l, c); }
2655
void setup (Filename f, int l, int c = 0) {
2660
const Filename &filename () const { return _filename; }
2661
int line () const { return _line; }
2662
int column () const { return _column; }
2663
bool operator == (const Location &l) const {
2664
return filename () == l.filename () && line () == l.line () &&
2665
column () == l.column ();
2667
bool operator != (const Location &l) const { return ! (*this == l); }
2668
bool operator < (const Location &l) const {
2669
// TODO: does it make sense to compare the filenames? better assert?
2670
if (filename () != l.filename ())
2672
return line () < l.line () && column () < l.column ();
2676
inline std::ostream &operator << (std::ostream &os, const Location &loc) {
2677
#ifdef VISUAL_STUDIO
2678
os << loc.filename () << "(" << loc.line () << ")";
2680
os << loc.filename () << ":" << loc.line ();
2686
#endif /* __location_h__ */
2688
#line 38 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorSink.h"
2693
#line 2694 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2695
class CCExprResolve;
2698
class WinImportHandler;
2702
class WinMemberExplSpec;
2703
class WinTypeKeywords;
2706
class ExtACBuilderCoupling;
2707
class ExtACSyntaxCoupling;
2709
class ExtACKeywords;
2711
class PragmaOnceUnitState;
2716
#line 41 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorSink.h"
2718
#line 2719 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2719
friend class ::CCExprResolve;
2720
friend class ::CExprResolve;
2721
friend class ::WinIfExists;
2722
friend class ::WinImportHandler;
2723
friend class ::WinMacros;
2724
friend class ::WinAsm;
2725
friend class ::WinDeclSpecs;
2726
friend class ::WinMemberExplSpec;
2727
friend class ::WinTypeKeywords;
2728
friend class ::WinFriend;
2729
friend class ::ExtAC;
2730
friend class ::ExtACBuilderCoupling;
2731
friend class ::ExtACSyntaxCoupling;
2732
friend class ::ExtACTree;
2733
friend class ::ExtACKeywords;
2734
friend class ::ExtGnu;
2735
friend class ::PragmaOnceUnitState;
2736
friend class ::PragmaOnce;
2737
friend class ::CMatchSyntax;
2739
#line 41 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorSink.h"
2742
virtual ~ErrorSink () {}
2743
virtual ErrorSink &operator << (const char *) = 0;
2744
virtual ErrorSink &operator << (long) = 0;
2745
virtual ErrorSink &operator << (unsigned) = 0;
2746
virtual ErrorSink &operator << (int) = 0;
2747
virtual ErrorSink &operator << (short) = 0;
2748
virtual ErrorSink &operator << (char) = 0;
2749
virtual ErrorSink &operator << (double) = 0;
2750
virtual ErrorSink &operator << (const ErrorSeverity &) = 0;
2751
virtual ErrorSink &operator << (Location) = 0;
2752
virtual ErrorSink &operator << (const Printable &) = 0;
2753
virtual ErrorSink &operator << (void (*f)(ErrorSink &)) = 0;
2754
virtual void endMessage () = 0;
2757
void endMessage (ErrorSink &);
2762
#endif /* __error_sink_h__ */
2764
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FdSource.h"
2765
// This file is part of PUMA.
2766
// Copyright (C) 1999-2003 The PUMA developer team.
2768
// This program is free software; you can redistribute it and/or
2769
// modify it under the terms of the GNU General Public License as
2770
// published by the Free Software Foundation; either version 2 of
2771
// the License, or (at your option) any later version.
2773
// This program is distributed in the hope that it will be useful,
2774
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2775
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2776
// GNU General Public License for more details.
2778
// You should have received a copy of the GNU General Public
2779
// License along with this program; if not, write to the Free
2780
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2781
// MA 02111-1307 USA
2783
#ifndef __fd_source_h__
2784
#define __fd_source_h__
2787
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FdSource.h"
2792
#line 2793 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2794
class CCExprResolve;
2797
class WinImportHandler;
2801
class WinMemberExplSpec;
2802
class WinTypeKeywords;
2805
class ExtACBuilderCoupling;
2806
class ExtACSyntaxCoupling;
2808
class ExtACKeywords;
2810
class PragmaOnceUnitState;
2815
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FdSource.h"
2816
class FdSource : public Source {
2817
#line 2818 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2818
friend class ::CCExprResolve;
2819
friend class ::CExprResolve;
2820
friend class ::WinIfExists;
2821
friend class ::WinImportHandler;
2822
friend class ::WinMacros;
2823
friend class ::WinAsm;
2824
friend class ::WinDeclSpecs;
2825
friend class ::WinMemberExplSpec;
2826
friend class ::WinTypeKeywords;
2827
friend class ::WinFriend;
2828
friend class ::ExtAC;
2829
friend class ::ExtACBuilderCoupling;
2830
friend class ::ExtACSyntaxCoupling;
2831
friend class ::ExtACTree;
2832
friend class ::ExtACKeywords;
2833
friend class ::ExtGnu;
2834
friend class ::PragmaOnceUnitState;
2835
friend class ::PragmaOnce;
2836
friend class ::CMatchSyntax;
2838
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FdSource.h"
2843
FdSource () : _fd (-1) {}
2844
FdSource (int fdesc) : _fd (fdesc) {}
2845
virtual ~FdSource () {}
2847
virtual int read (char *dest, int n)
2848
{ return SysCall::read (_fd, dest, n); }
2850
void fd (int fdesc) { _fd = fdesc; }
2851
int fd () { return _fd; }
2855
return (SysCall::fstat (_fd, fileinfo)) ? fileinfo.size () : -1;
2862
#endif /* __fd_source_h__ */
2864
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileSource.h"
2871
#line 2872 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2873
class CCExprResolve;
2876
class WinImportHandler;
2880
class WinMemberExplSpec;
2881
class WinTypeKeywords;
2884
class ExtACBuilderCoupling;
2885
class ExtACSyntaxCoupling;
2887
class ExtACKeywords;
2889
class PragmaOnceUnitState;
2894
#line 32 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileSource.h"
2895
class FileSource : public FdSource {
2896
#line 2897 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2897
friend class ::CCExprResolve;
2898
friend class ::CExprResolve;
2899
friend class ::WinIfExists;
2900
friend class ::WinImportHandler;
2901
friend class ::WinMacros;
2902
friend class ::WinAsm;
2903
friend class ::WinDeclSpecs;
2904
friend class ::WinMemberExplSpec;
2905
friend class ::WinTypeKeywords;
2906
friend class ::WinFriend;
2907
friend class ::ExtAC;
2908
friend class ::ExtACBuilderCoupling;
2909
friend class ::ExtACSyntaxCoupling;
2910
friend class ::ExtACTree;
2911
friend class ::ExtACKeywords;
2912
friend class ::ExtGnu;
2913
friend class ::PragmaOnceUnitState;
2914
friend class ::PragmaOnce;
2915
friend class ::CMatchSyntax;
2917
#line 32 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/FileSource.h"
2920
FileSource (const char *name, ErrorSink *err = (ErrorSink*)0)
2921
{ fd (SysCall::open (name, O_RDONLY, err)); }
2923
{ SysCall::close (fd ()); }
2925
virtual int read (char *dest, int n)
2926
{ return FdSource::read (dest, n); }
2932
#endif /* __file_source_h__ */
2934
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorStream.h"
2935
// This file is part of PUMA.
2936
// Copyright (C) 1999-2003 The PUMA developer team.
2938
// This program is free software; you can redistribute it and/or
2939
// modify it under the terms of the GNU General Public License as
2940
// published by the Free Software Foundation; either version 2 of
2941
// the License, or (at your option) any later version.
2943
// This program is distributed in the hope that it will be useful,
2944
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2945
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2946
// GNU General Public License for more details.
2948
// You should have received a copy of the GNU General Public
2949
// License along with this program; if not, write to the Free
2950
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2951
// MA 02111-1307 USA
2953
#ifndef __error_stream_h__
2954
#define __error_stream_h__
2956
// An ErrorStream is a special ErrorSink that prints out an error message
2957
// as soon as it complete. It also stores the maximum error severity.
2958
// The ErrorStream can be reset to it's initial state.
2962
#line 30 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorStream.h"
2963
using namespace std;
2969
#line 2970 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2971
class CCExprResolve;
2974
class WinImportHandler;
2978
class WinMemberExplSpec;
2979
class WinTypeKeywords;
2982
class ExtACBuilderCoupling;
2983
class ExtACSyntaxCoupling;
2985
class ExtACKeywords;
2987
class PragmaOnceUnitState;
2992
#line 35 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorStream.h"
2993
class ErrorStream : public ErrorSink {
2994
#line 2995 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
2995
friend class ::CCExprResolve;
2996
friend class ::CExprResolve;
2997
friend class ::WinIfExists;
2998
friend class ::WinImportHandler;
2999
friend class ::WinMacros;
3000
friend class ::WinAsm;
3001
friend class ::WinDeclSpecs;
3002
friend class ::WinMemberExplSpec;
3003
friend class ::WinTypeKeywords;
3004
friend class ::WinFriend;
3005
friend class ::ExtAC;
3006
friend class ::ExtACBuilderCoupling;
3007
friend class ::ExtACSyntaxCoupling;
3008
friend class ::ExtACTree;
3009
friend class ::ExtACKeywords;
3010
friend class ::ExtGnu;
3011
friend class ::PragmaOnceUnitState;
3012
friend class ::PragmaOnce;
3013
friend class ::CMatchSyntax;
3015
#line 35 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/ErrorStream.h"
3018
ErrorSeverity _max_severity;
3019
ErrorSeverity _curr_severity;
3021
bool _have_location;
3022
std::ostringstream *_msg;
3029
ErrorStream (std::ostream &s = cerr) : _ostream (&s), _msg ((std::ostringstream*)0)
3030
{ reset (); _silently = false; }
3031
virtual ~ErrorStream () { delete _msg; }
3033
ErrorStream &operator << (const char *);
3034
ErrorStream &operator << (long);
3035
ErrorStream &operator << (unsigned);
3036
ErrorStream &operator << (int);
3037
ErrorStream &operator << (short);
3038
ErrorStream &operator << (char);
3039
ErrorStream &operator << (double);
3040
ErrorStream &operator << (const ErrorSeverity &);
3041
ErrorStream &operator << (Location);
3042
ErrorStream &operator << (const Printable &);
3043
ErrorStream &operator << (void (*f)(ErrorSink &));
3050
ErrorSeverity severity () const { return _max_severity; }
3056
#endif /* __error_stream_h__ */
3058
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitManager.h"
3059
// This file is part of PUMA.
3060
// Copyright (C) 1999-2003 The PUMA developer team.
3062
// This program is free software; you can redistribute it and/or
3063
// modify it under the terms of the GNU General Public License as
3064
// published by the Free Software Foundation; either version 2 of
3065
// the License, or (at your option) any later version.
3067
// This program is distributed in the hope that it will be useful,
3068
// but WITHOUT ANY WARRANTY; without even the implied warranty of
3069
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3070
// GNU General Public License for more details.
3072
// You should have received a copy of the GNU General Public
3073
// License along with this program; if not, write to the Free
3074
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
3075
// MA 02111-1307 USA
3077
#ifndef __UnitManager__
3078
#define __UnitManager__
3080
// Class UnitManager helps you to have control of all units built.
3083
#line 25 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitManager.h"
3087
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitManager.h"
3088
using namespace std;
3090
#line 31 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitManager.h"
3099
#line 3100 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
3101
class CCExprResolve;
3104
class WinImportHandler;
3108
class WinMemberExplSpec;
3109
class WinTypeKeywords;
3112
class ExtACBuilderCoupling;
3113
class ExtACSyntaxCoupling;
3115
class ExtACKeywords;
3117
class PragmaOnceUnitState;
3122
#line 38 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitManager.h"
3124
#line 3125 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
3125
friend class ::CCExprResolve;
3126
friend class ::CExprResolve;
3127
friend class ::WinIfExists;
3128
friend class ::WinImportHandler;
3129
friend class ::WinMacros;
3130
friend class ::WinAsm;
3131
friend class ::WinDeclSpecs;
3132
friend class ::WinMemberExplSpec;
3133
friend class ::WinTypeKeywords;
3134
friend class ::WinFriend;
3135
friend class ::ExtAC;
3136
friend class ::ExtACBuilderCoupling;
3137
friend class ::ExtACSyntaxCoupling;
3138
friend class ::ExtACTree;
3139
friend class ::ExtACKeywords;
3140
friend class ::ExtGnu;
3141
friend class ::PragmaOnceUnitState;
3142
friend class ::PragmaOnce;
3143
friend class ::CMatchSyntax;
3145
#line 38 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitManager.h"
3148
typedef map<string, Unit*> UMap;
3150
ErrorStream *_err; // For error messages.
3151
list<Unit*> _nonames; // Noname units list.
3152
mutable UMap _umap; // Named units, map supports fast lookup by name
3153
typedef UMap::value_type UMapPair;
3154
Tokenizer *_tokenizer; // File scanner.
3157
UnitManager (ErrorStream &err) : _err (&err), _tokenizer (0) {}
3159
// Destructor: Delete all units.
3160
virtual ~UnitManager ();
3162
// Get the unit hash table.
3163
UMap &getTable () const { return _umap; }
3164
typedef UMap::iterator UMapIter;
3166
// Get/Set the file scanner that is used by newUnit
3167
Tokenizer *tokenizer () const { return _tokenizer; }
3168
void tokenizer (Tokenizer *t) { _tokenizer = t; }
3170
// Add a unit to manager.
3171
void addUnit (Unit *unit);
3173
// Remove (and destroy) a unit from hash table. If the name
3174
// is NULL remove all (but not the nonames).
3175
void removeUnit (const char *name = (const char*) 0, bool = false,
3176
bool destroy = true) const;
3178
// Empty a unit. Don't remove from hash table.
3179
// Preserve the last save location information.
3180
void closeUnit (const char *name = (const char*) 0, bool = false) const;
3182
// Build and add a new unit.
3183
Unit *newUnit (const char *, Source *in = (Source*) 0, bool = false);
3185
// Get a unit by name.
3186
Unit *getUnit (const char *name, bool = false) const;
3188
// Print given unit to the given outstream. If no
3189
// name is given, print all units.
3190
void print (const char *name = (const char*) 0, bool = false,
3191
ostream &out = cout) const;
3193
// Destroy all noname units.
3194
void removeNonames ();
3196
// Initialize the unit manager and the managed
3197
// units for the next parse process.
3199
#line 3200 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
3200
public: __attribute__((always_inline)) inline void __exec_old_init();
3202
#line 90 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/UnitManager.h"
3209
#endif /* __UnitManager__ */
3211
#line 1 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Tokenizer.h"
3212
// This file is part of PUMA.
3213
// Copyright (C) 1999-2003 The PUMA developer team.
3215
// This program is free software; you can redistribute it and/or
3216
// modify it under the terms of the GNU General Public License as
3217
// published by the Free Software Foundation; either version 2 of
3218
// the License, or (at your option) any later version.
3220
// This program is distributed in the hope that it will be useful,
3221
// but WITHOUT ANY WARRANTY; without even the implied warranty of
3222
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3223
// GNU General Public License for more details.
3225
// You should have received a copy of the GNU General Public
3226
// License along with this program; if not, write to the Free
3227
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
3228
// MA 02111-1307 USA
3230
#ifndef __Tokenizer_h__
3231
#define __Tokenizer_h__
3233
// Tokenizer interface. Tokenizer read input from a "Source" and
3234
// form tokens, which used to fill a "Unit".
3237
#line 28 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Tokenizer.h"
3242
#line 3243 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
3244
class CCExprResolve;
3247
class WinImportHandler;
3251
class WinMemberExplSpec;
3252
class WinTypeKeywords;
3255
class ExtACBuilderCoupling;
3256
class ExtACSyntaxCoupling;
3258
class ExtACKeywords;
3260
class PragmaOnceUnitState;
3265
#line 31 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Tokenizer.h"
3267
#line 3268 "/var/tmp/aspectc++/debian/Puma/gen-release/step2/src/UnitManager.cc"
3268
friend class ::CCExprResolve;
3269
friend class ::CExprResolve;
3270
friend class ::WinIfExists;
3271
friend class ::WinImportHandler;
3272
friend class ::WinMacros;
3273
friend class ::WinAsm;
3274
friend class ::WinDeclSpecs;
3275
friend class ::WinMemberExplSpec;
3276
friend class ::WinTypeKeywords;
3277
friend class ::WinFriend;
3278
friend class ::ExtAC;
3279
friend class ::ExtACBuilderCoupling;
3280
friend class ::ExtACSyntaxCoupling;
3281
friend class ::ExtACTree;
3282
friend class ::ExtACKeywords;
3283
friend class ::ExtGnu;
3284
friend class ::PragmaOnceUnitState;
3285
friend class ::PragmaOnce;
3286
friend class ::CMatchSyntax;
3288
#line 31 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/inc/Puma/Tokenizer.h"
3291
virtual ~Tokenizer () {}
3292
virtual void fill_unit (Source &in, Unit &unit) = 0;
3298
#endif /* __Tokenizer_h__ */
3300
#line 27 "/var/tmp/aspectc++/debian/Puma/gen-release/step1/src/UnitManager.cc"
27
3301
#include <string.h>
28
3302
#include <assert.h>