// This file is part of PUMA. // Copyright (C) 1999-2003 The PUMA developer team. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of // the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public // License along with this program; if not, write to the Free // Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, // MA 02111-1307 USA #ifndef __ext_ac_builder_h_ah__ #define __ext_ac_builder_h_ah__ // ************************** // C and CC-Builder extension // ************************** // new C and CC Builder member functions slice class ExtACBuilder { bool is_advice_decl () const; public: virtual Puma::CTree *advice_decl (); virtual Puma::CTree *order_list (); virtual Puma::CTree *order_decl (); virtual Puma::CTree *pointcut_decl (); virtual Puma::CTree *slice_ref (); virtual Puma::CTree *class_slice_decl (); virtual Puma::CTree *class_slice_name (); virtual Puma::CTree *class_slice_member_decl (); virtual Puma::CTree *class_slice_member_list (); virtual Puma::CTree *pointcut_expr (); virtual Puma::CTree *intro (); }; // FIXME tagging slice class ExtACCBuilder { public: virtual Puma::CTree *tag_expr (); virtual Puma::CTree *intro (); }; /*slice class ExtACCSemExpr { public: virtual Puma::CTypeInfo *resolve (Puma::CT_TagExpr *node, Puma::CTree *base); };*/ // FIXME tagging // extension of existing builder functions aspect ExtACBuilderCoupling { pointcut cbuilder () = "Puma::CBuilder"; pointcut ccbuilder () = "Puma::CCBuilder"; // FIXME tagging pointcut ccsemexpr () = "Puma::CCSemExpr"; // FIXME tagging // bind the slice advice cbuilder () : slice ExtACBuilder; advice ccbuilder () : slice ExtACCBuilder; // FIXME tagging //advice ccsemexpr () : slice ExtACCSemExpr; // FIXME tagging // extension for member_decl advice within (derived (cbuilder ())) && execution ("% ...::member_decl()") : around () { // 1: advice_decl // 1: pointcut_decl if (tjp->that ()->is_advice_decl ()) *tjp->result () = tjp->that ()->get_node (0); else tjp->proceed (); } // FIXME tagging /*advice within (derived (cbuilder ())) && execution ("% ...::postfix_expr(...)") : after () { // Builder advice postfix_expr ... }*/ // FIXME tagging }; #endif /* __ext_ac_builder_h_ah__ */