#line 1 "jointpoint_api/main.cc" #ifndef __ac_FIRST__home_Tom_aspectcX43X43__ #define __ac_FIRST__home_Tom_aspectcX43X43__ #define __ac_FIRST_FILE__home_Tom_aspectcX43X43_jointpoint_api_main_cc__ #ifndef __ac_have_predefined_includes__ #define __ac_have_predefined_includes__ #endif // __ac_have_predefined_includes__ #ifndef __ac_h_ #define __ac_h_ #ifdef __cplusplus namespace AC { typedef const char* Type; enum JPType { CALL = 262144, EXECUTION = 16777216, CONSTRUCTION = 33554432, DESTRUCTION = 67108864 }; enum Protection { PROT_NONE, PROT_PRIVATE, PROT_PROTECTED, PROT_PUBLIC }; enum Specifiers { SPEC_NONE = 0x0 , SPEC_STATIC = 0x1, SPEC_MUTABLE = 0x2, SPEC_VIRTUAL = 0x4 }; struct Action { void **_args; void *_result; void *_entity; void *_target; void *_that; void *_fptr; void (*_wrapper)(Action &); inline void trigger () { _wrapper (*this); } }; template struct ResultBuffer { char _data[sizeof (T)]; void operator = (const T& t) { *this = (const ResultBuffer &)t; } }; template struct TL { typedef T type; typedef N next; enum { ARGS = next::ARGS + 1 }; }; struct TLE { enum { ARGS = 0 }; }; template struct Referred { typedef T type; }; template struct Referred { typedef T type; }; template struct Arg { typedef typename Arg::Type Type; typedef typename Referred::type ReferredType; }; template struct Arg { typedef typename TL::type Type; typedef typename Referred::type ReferredType; }; template int ttest(...); template char ttest(typename T::__TI const volatile *); template struct HasTypeInfo { enum { RET=((sizeof(ttest(0))==1)?1:0) }; }; template::RET> struct TypeInfo { enum { AVAILABLE = 0, BASECLASSES = 0, MEMBERS = 0, FUNCTIONS = 0, CONSTRUCTORS = 0, DESTRUCTORS = 0 }; typedef T That; }; template struct TypeInfo : T::__TI { enum { AVAILABLE = 1 }; }; template struct RT {}; template RT rt_deduce (const T&) { return RT(); } template RT rt_deduce (const volatile T&) { return RT(); } struct Cnv { template operator RT() const { return RT(); }}; #define __AC_TYPEOF(expr) (1?AC::Cnv():AC::rt_deduce(expr)) template struct CFlow { static int &instance () { static int counter = 0; return counter; } CFlow () { instance ()++; } ~CFlow () { instance ()--; } static bool active () { return instance () > 0; } }; #ifdef __acdef_float template struct _FloatN { BASE val; _FloatN() {} _FloatN(const BASE& v) : val(v) {} operator BASE() const { return val; } }; #endif } #ifdef __acdef_float typedef AC::_FloatN _Float32; typedef AC::_FloatN _Float32x; typedef AC::_FloatN _Float64; typedef AC::_FloatN _Float128; typedef AC::_FloatN _Float64x; #endif #if defined(__acweaving) && defined(__ARM_NEON) typedef __attribute__ ((__neon_vector_type__ (4))) float __Float32x4_t; typedef __attribute__ ((__neon_vector_type__ (2))) double __Float64x2_t; #endif #endif // __cplusplus #endif // __ac_h_ class Example; #endif // __ac_FIRST__home_Tom_aspectcX43X43__ #line 96 "main.acc" #ifndef __ac_fwd_Example__ #define __ac_fwd_Example__ class Example; namespace AC { template __attribute((always_inline)) inline void invoke_Example_Example__a0_before (JoinPoint *tjp); } #endif #ifndef __ac_need__home_Tom_aspectcX43X43_jointpoint_api_Example_ah__ #define __ac_need__home_Tom_aspectcX43X43_jointpoint_api_Example_ah__ #endif #line 1 "jointpoint_api/main.cc" #line 1 "jointpoint_api/main.cc" #include #include #line 118 "main.acc" __attribute__((always_inline)) inline void __exec_old_give_int(int i); template struct TJP__Z8give_inti_0 { typedef TJP__Z8give_inti_0 __TJP; typedef TResult Result; typedef TThat That; typedef TTarget Target; typedef TEntity Entity; enum { DIMS = 0 }; typedef void * MemberPtr; enum { ARGS = TArgs::ARGS }; template struct Arg : AC::Arg {}; static const AC::JPType JPTYPE = (AC::JPType)16777216; struct Res { typedef TResult Type; typedef TResult ReferredType; }; void *_args[ARGS]; inline void * arg (int n) {return _args[n];} template typename Arg::ReferredType *arg () { return (typename Arg::ReferredType*)arg (I); } }; #line 5 "jointpoint_api/main.cc" #line 5 "jointpoint_api/main.cc" void give_int(int i) #line 152 "main.acc" { typedef TJP__Z8give_inti_0< void, void, void, void (int), AC::TL< int, AC::TLE > > __TJP; __TJP tjp; tjp._args[0] = (void*)&i; AC::invoke_Example_Example__a0_before<__TJP> (&tjp); ::__exec_old_give_int(i); } __attribute__((always_inline)) inline void __exec_old_give_int(int i) #line 5 "jointpoint_api/main.cc" #line 5 "jointpoint_api/main.cc" { std::cout << "Got the Int!" << std::endl; } int main(){ give_int(42); return 0; } #line 173 "main.acc" #ifndef __ac_have_predefined_includes__ /*** begin of aspect includes ***/ // commented out by ac++: #include "Example.ah" /*** end of aspect includes ***/ #endif #line 12 "jointpoint_api/main.cc" #line 12 "jointpoint_api/main.cc" #ifdef __ac_FIRST_FILE__home_Tom_aspectcX43X43_jointpoint_api_main_cc__ #ifdef __ac_need__home_Tom_aspectcX43X43_jointpoint_api_Example_ah__ #ifndef __ac_have__home_Tom_aspectcX43X43_jointpoint_api_Example_ah__ #define __ac_have__home_Tom_aspectcX43X43_jointpoint_api_Example_ah__ // commented out by ac++: #include "Example.ah" #line 1 "jointpoint_api/Example.ah" #ifndef __EXAMPLE_AH__ #define __EXAMPLE_AH__ // commented out by ac++: #include class Example { #line 196 "main.acc" public: template struct __BYPASSExample {}; template friend struct __BYPASSExample; private: #line 6 "jointpoint_api/Example.ah" #line 6 "jointpoint_api/Example.ah" public: template void __a0_before(JoinPoint *tjp) { //print first parameter of give_int() std::cout << *tjp->template arg<0>() << std::endl; } #line 211 "main.acc" public: static Example *aspectof () { static Example __instance; return &__instance; } static Example *aspectOf () { return aspectof (); } private: #line 13 "jointpoint_api/Example.ah" #line 13 "jointpoint_api/Example.ah" } #line 227 "main.acc" ; namespace AC { template __attribute((always_inline)) inline void invoke_Example_Example__a0_before (JoinPoint *tjp) { ::Example::aspectof()->__a0_before (tjp); } } #line 13 "jointpoint_api/Example.ah" #line 13 "jointpoint_api/Example.ah" ; #endif #line 18 "jointpoint_api/main.cc" #endif #endif #undef __ac_FIRST__home_Tom_aspectcX43X43__ #undef __ac_FIRST_FILE__home_Tom_aspectcX43X43_jointpoint_api_main_cc__ #endif // __ac_FIRST_FILE__home_Tom_aspectcX43X43_jointpoint_api_main_cc__