1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
// This file is part of the AspectC++ compiler 'ac++'.
// Copyright (C) 1999-2003 The 'ac++' developers (see aspectc.org)
//
// 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 __AspectInfo_h__
#define __AspectInfo_h__
#include <list>
using std::list;
#include <set>
using std::set;
#include <string>
using std::string;
#include "JoinPointLoc.h"
#include "ThisJoinPoint.h"
class BackEndProblems;
class AdviceInfo;
class AspectInfo {
JPL_Aspect &_aspect;
ThisJoinPoint _aspectof_tjp;
list<AdviceInfo*> _advice_infos;
public:
AspectInfo (JPL_Aspect &a) : _aspect (a) {}
bool operator < (const AspectInfo &right) const {
return string (_aspect.signature ()) < string (right.loc ().signature ());
}
JPL_Aspect &loc () const { return _aspect; }
const char *name () const { return _aspect.signature (); }
const ThisJoinPoint &aspectof_this_join_point () const { return _aspectof_tjp; }
ThisJoinPoint &aspectof_this_join_point () { return _aspectof_tjp; }
// the list of associated code advice nodes
list<AdviceInfo*> &advice_infos () { return _advice_infos; }
// generate the invocation function forward declarations
string ifct_decls (const BackEndProblems &) const;
// generate the invocation function definitions
string ifct_defs (const BackEndProblems &) const;
};
#endif // __AspectInfo_h__
|