~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to AspectC++/AspectInfo.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include "AspectInfo.h"
20
20
#include "AdviceInfo.h"
21
 
 
22
 
#include "Puma/CFunctionInfo.h"
23
 
 
24
 
// for workaround
25
 
#include "Puma/CClassDatabase.h"
26
 
#include "Puma/CTree.h"
27
 
 
28
 
CFunctionInfo *AspectInfo::aspectof () {
29
 
  // make this better!
30
 
  CFunctionInfo *aof = ClassInfo ()->Function ("aspectof");
31
 
  if (!aof)
32
 
    aof = ClassInfo ()->Function ("aspectOf");
33
 
  return aof ? aof->DefObject () : (CFunctionInfo*)0;
34
 
 
35
 
}
36
 
 
37
 
bool AspectInfo::default_instance() {
38
 
  return ClassInfo()->Attribute("__instance");
39
 
}
40
 
 
 
21
//
 
22
//#include "Puma/CFunctionInfo.h"
 
23
//
 
24
//// for workaround
 
25
//#include "Puma/CClassDatabase.h"
 
26
//#include "Puma/CTree.h"
 
27
//
 
28
//CFunctionInfo *AspectInfo::aspectof () {
 
29
//  // make this better!
 
30
//  CFunctionInfo *aof = ClassInfo ()->Function ("aspectof");
 
31
//  if (!aof)
 
32
//    aof = ClassInfo ()->Function ("aspectOf");
 
33
//  return aof ? aof->DefObject () : (CFunctionInfo*)0;
 
34
//
 
35
//}
 
36
//
41
37
// generate the invocation function forward declarations
42
 
string AspectInfo::ifct_decls () const {
 
38
string AspectInfo::ifct_decls (const BackEndProblems &bep) const {
43
39
 
44
40
  // name of this aspect
45
41
  string me (name ());
53
49
  stringstream ifct_decls;
54
50
  for (list<AdviceInfo*>::const_iterator iter = _advice_infos.begin ();
55
51
       iter != _advice_infos.end (); ++iter) {
56
 
    (*iter)->gen_invocation_func (ifct_decls, false);
 
52
    (*iter)->gen_invocation_func (ifct_decls, false, bep);
57
53
  }
58
54
  decls += ifct_decls.str ();
59
55
  
64
60
}
65
61
 
66
62
// generate the invocation function definitions
67
 
string AspectInfo::ifct_defs () const {
 
63
string AspectInfo::ifct_defs (const BackEndProblems &bep) const {
68
64
  
69
65
  stringstream defs;
70
66
  defs << endl;
71
67
  defs << "namespace AC {" << endl;
72
68
  for (list<AdviceInfo*>::const_iterator iter = _advice_infos.begin ();
73
69
       iter != _advice_infos.end (); ++iter) {
74
 
    (*iter)->gen_invocation_func (defs, true);
 
70
    (*iter)->gen_invocation_func (defs, true, bep);
75
71
  }
76
72
  defs << "} " << endl;
77
73
  return defs.str ();