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

« back to all changes in this revision

Viewing changes to Puma/src/infos/acinfos/ACSliceInfo.h

  • 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:
28
28
class ACAspectInfo;
29
29
class CT_ClassSliceDecl;
30
30
class CT_Intro;
 
31
class Unit;
31
32
 
32
33
/** \file 
33
34
 *  Representation of an AspectC++ 'slice'.
41
42
class ACSliceInfo {
42
43
  CObjectInfo       *_object;
43
44
  CT_ClassSliceDecl *_def_node;
44
 
  Array<CT_Intro*>  _members; // non-inline slice members
 
45
  Unit              *_pattern;        // inline member patterns (in 1 unit)
 
46
  Unit              *_base_pattern;   // base class intro part
 
47
  Array<CT_Intro*>  _members;         // non-inline slice members
 
48
  Array<Unit*>      _member_patterns; // non-inline member patterns
 
49
  Array<Unit*>      _member_units;    // non-inline member units (ah files)
45
50
  bool              _in_advice;
46
51
      
47
52
public:
51
56
  /** Construct a slice info object.
52
57
   *  \param oi The object info of the slice declaration, e.g. class info. */
53
58
  ACSliceInfo (CObjectInfo *oi) :
54
 
    _object (oi), _def_node ((CT_ClassSliceDecl *)0) {}
 
59
    _object (oi), _def_node ((CT_ClassSliceDecl *)0),
 
60
    _pattern (0), _base_pattern (0) {}
55
61
 
 
62
  /** Desctructor: delete all pattern units */
 
63
  ~ACSliceInfo ();
 
64
  
56
65
  /** Get the name of the slice. */
57
66
  const char *name () { return _object->Name (); }
58
67
  /** Get the object info of the slice declaration. */
60
69
 
61
70
  /** Set the slice definition syntax tree node.
62
71
   *  \param node The slice syntax tree node. */
63
 
  void def_node (CT_ClassSliceDecl *node) { _def_node = node; }
 
72
  void def_node (CT_ClassSliceDecl *node);
64
73
  /** Get the syntax tree node of the slice definition. */
65
74
  CT_ClassSliceDecl *def_node () { return _def_node; }
66
75
  
67
76
  /** Add a non-inline slice member.
68
77
   *  \param node The new member. */
69
 
  void add_member (CT_Intro *i) { _members.append (i); }
 
78
  void add_member (CT_Intro *i);
70
79
  
71
80
  /** Get the number of non-inline slice members. */
72
81
  int members () const { return _members.length (); }
74
83
  /** Get the ith non-inline slice member. */
75
84
  CT_Intro *member (int i) const { return _members.lookup (i); }
76
85
  
 
86
  /** Get the ith non-inline slice member code pattern. */
 
87
  const Unit *member_pattern (int i) const { return _member_patterns.lookup (i); }
 
88
  
 
89
  /** Get the ith non-inline slice member unit. */
 
90
  const Unit *member_unit (int i) const { return _member_units.lookup (i); }
 
91
  
77
92
  /** Set a flag to determine if this definition is part of an advice decl
78
93
   *  \param a true, iff this definition is location within 'advice .. : ..'. */
79
94
  void in_advice (bool a) { _in_advice = a; }
86
101
  
87
102
  /** Get the definition of this slice or return 0 if there is no definition */
88
103
  ACSliceInfo *definition () const;
 
104
  
 
105
  /** Get the base class pattern of this slice as a unit */
 
106
  const Unit *base_pattern () const { return _base_pattern; }
 
107
 
 
108
  /** Get the inline member pattern of this slice as a unit */
 
109
  const Unit *pattern () const { return _pattern; }
89
110
};
90
111
 
91
112