~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to AspectC++/WeaverBase.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
  // relevant for the insertion of #line directives
68
68
  typedef set<WeavePos> WPSet;
69
69
  WPSet _positions;
70
 
  typedef set<WeavePos*> WPPtrSet;
71
 
  WPPtrSet _line_done;
72
 
  WPPtrSet _line_todo;
73
70
  ManipCommander _commander;
 
71
 
 
72
  typedef map<Unit*, Token*> UnitTokenMap;
 
73
  UnitTokenMap _start_token_map;
74
74
  
75
75
protected:
76
76
  ErrorSink &_err;
77
77
  LineDirectiveMgr &_line_mgr;
78
78
  BackEndProblems _problems;      
 
79
  Token *_primary_start;
 
80
  Token *_primary_end;
79
81
 
80
82
  // not a very good function
81
83
  void print_tree (ostream &out, CTree *node);
82
84
 
83
 
  // checks whether a function needs a 'this'-pointer
84
 
  bool needs_this (CFunctionInfo *func);
85
 
  
86
85
  // scope functions
87
86
  CClassInfo *cscope (CObjectInfo *obj);
88
87
  CScopeInfo *nscope (CObjectInfo *obj);
103
102
  WeaverBase (ErrorSink &e, LineDirectiveMgr &ldm) :
104
103
    _err (e), _line_mgr (ldm) {}
105
104
 
 
105
  // setup first and last token of the translation unit
 
106
  void init (Token *s, Token *e) { _primary_start = s; _primary_end = e; }
 
107
 
106
108
  // get the associate line directive manager
107
109
  LineDirectiveMgr &line_directive_mgr () const { return _line_mgr; }
108
110
  
109
111
  // set weaver parameters
110
112
  void problems (const BackEndProblems &problems) { _problems = problems; }
 
113
 
 
114
  // get weaver parameters
 
115
  const BackEndProblems &problems () const { return _problems; }
111
116
  
112
117
  // helper functions (could be regarded as Puma extensions)
113
118
  
128
133
 
129
134
  // insert a generated string a given position
130
135
  void paste (const WeavePos &pos, const string &str);
 
136
 
 
137
  // insert a generated string at the beginning of a unit
 
138
  void paste_first (Unit *unit, const string  &str);
 
139
 
 
140
  // insert the contents of a generated unit at the end of the translation
 
141
  // unit (with move)
 
142
  void paste_end (Unit *unit);
 
143
  
 
144
  // insert a generated string at the end of the translation unit (with move)
 
145
  void paste_end (const string &str);
131
146
  
132
147
  // replace the text between two positions with some new text
133
148
  void replace (const WeavePos &from, const WeavePos &to, const string &str);
153
168
  // check if there is a problem
154
169
  bool macro_problem (const WeavePos &pos);
155
170
  
 
171
  // checks whether a function needs a 'this'-pointer
 
172
  static bool needs_this (CFunctionInfo *func);
 
173
  
156
174
};
157
175
 
158
176
#endif // __WeaverBase_h__