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

« back to all changes in this revision

Viewing changes to AspectC++/Condition.h

  • 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:
25
25
using namespace std;
26
26
 
27
27
#include "Puma/CClassInfo.h"
 
28
#ifdef ACMODEL
 
29
#include "Elements.h"
 
30
#else
28
31
#include "JoinPointLoc.h"
 
32
#endif
29
33
#include "TransformInfo.h"
30
34
#include "Naming.h"
31
35
using namespace Puma;
32
36
 
33
37
class PointCutExpr;
34
38
class AdviceInfo;
35
 
class  JPL_Class;
 
39
#ifdef ACMODEL
 
40
class ACM_Class;
 
41
#else
 
42
class JPL_Class;
 
43
#endif
36
44
 
37
45
typedef pair<CRecord*, string> TypeCheck;
38
46
typedef set<TypeCheck> TypeCheckSet;
214
222
    
215
223
  // create a 'that' condition, i.e. the current object is an instance
216
224
  // of a specific class that matches the argument of 'that'
 
225
#ifdef ACMODEL
 
226
  void that (ACM_Class *in_class, const string &mangled_check) {
 
227
#else
217
228
  void that (JPL_Class *in_class, const string &mangled_check) {
 
229
#endif
218
230
    TI_Class *ti = (TI_Class*)in_class->transform_info();
219
231
    stringstream cond_name;
220
232
    Naming::type_check_func (cond_name, ti->class_info (), mangled_check.c_str ());
222
234
  }
223
235
 
224
236
  // the target object is an instance of a specific class
 
237
#ifdef ACMODEL
 
238
  void target (ACM_Class *in_class, const string &mangled_check) {
 
239
#else
225
240
  void target (JPL_Class *in_class, const string &mangled_check) {
 
241
#endif
226
242
    TI_Class *ti = (TI_Class*)in_class->transform_info();
227
243
    stringstream cond_name;
228
244
    Naming::type_check_func (cond_name, ti->class_info (), mangled_check.c_str ());
257
273
    _cond = new Not (_cond);
258
274
  }
259
275
 
 
276
#ifdef ACMODEL
 
277
  void matches (const ACM_Class &cls_loc) {
 
278
#else
260
279
  void matches (const JPL_Class &cls_loc) {
 
280
#endif
261
281
    // TODO: matching should work without parser information
262
282
    CRecord *rec = ((TI_Class*)cls_loc.transform_info ())->class_info ();
263
283
    // this is a hack! I assume that the top-level node is a TypeCond.