~ubuntu-branches/ubuntu/wily/aspectc++/wily

« back to all changes in this revision

Viewing changes to AspectC++/AdviceInfo.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-06-15 10:17:02 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090615101702-qsr30iptwbxylmo2
Tags: 1.0pre4~svn.20090615-1
* New upstream release.
* don't ignore errors in the postrm script
* avoid spurious creation of empty dir ./usr/sbin/
* improve short descriptions of libpuma-doc and libpuma-dev
* bump Standards-Version to 3.8.1
* bump debhelper compat level to level 7 (latest in stable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "Puma/CSemDatabase.h"
29
29
#include "Puma/CArgumentInfo.h"
30
30
 
 
31
#ifdef ACMODEL
 
32
AdviceInfo::AdviceInfo (AspectInfo &ai, ACM_AdviceCode &c) :
 
33
#else
31
34
AdviceInfo::AdviceInfo (AspectInfo &ai, JPL_AdviceCode &c) :
 
35
#endif
32
36
  _aspect_info (ai), _aspect (ai.loc ()), _code (c) {}
33
37
 
34
38
void AdviceInfo::gen_invocation_func (ostream &out, bool def,
54
58
    out << ">" << endl;
55
59
  }
56
60
  ostringstream suffix;
 
61
#ifdef ACMODEL
 
62
  suffix << signature(_aspect) << "_"
 
63
#else
57
64
  suffix << _aspect.signature () << "_"
 
65
#endif
58
66
         << Scope ()->Name () << "_" << (name () + 1);
59
67
       
60
68
  out << "  ";
82
90
  if (ad_cls != aspect_cls)
83
91
    out << "((::" << ad_cls->QualName () << "*)";
84
92
  // aspectof function
 
93
#ifdef ACMODEL
 
94
  out << "::" << signature (aspect ()) << "::aspectof";
 
95
#else
85
96
  out << "::" << aspect ().signature () << "::aspectof";
 
97
#endif
86
98
  // generate <JoinPoint> if necessary
87
99
  if (aspectof_tjp.type_needed () && !aspectof_tjp.pointer_needed ())
88
100
    out << "<JoinPoint>";
136
148
  bool pointer_needed = tjp.pointer_needed () || has_context ||
137
149
                        aspectof_tjp.pointer_needed ();
138
150
    
 
151
#ifdef ACMODEL
 
152
  stmt << "AC::invoke_" << signature (_aspect) << "_"
 
153
#else
139
154
  stmt << "AC::invoke_" << _aspect.signature () << "_"
 
155
#endif
140
156
       << Scope ()->Name () << "_" << (name () + 1);
141
157
       
142
158
  if (type_needed) {
167
183
    return;
168
184
      
169
185
  // generate the mapping of context variables to advice function arguments
 
186
#ifdef ACMODEL
 
187
  out << "struct Binding_" /* << jpname << "_" */ << signature(_aspect) << "_"
 
188
#else
170
189
  out << "struct Binding_" /* << jpname << "_" */ << _aspect.signature () << "_"
 
190
#endif
171
191
      << Scope ()->Name () << "_" << (name () + 1) << " {" << endl;
172
192
  out << "  typedef " /* << jpname*/ << "__TJP" << " TJP;" << endl;
173
193
  out << "  template <int I";