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

« back to all changes in this revision

Viewing changes to AspectC++/MatchTemplateArg.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:
37
37
  virtual ~MatchTemplateArg () {}
38
38
  virtual void print (ostream &out) const = 0;
39
39
  virtual bool matches (DeducedArgument *arg) const = 0;
 
40
  virtual bool matches (MatchTemplateArg &arg) const = 0;
40
41
  virtual MatchTemplateArg *clone () const = 0;
 
42
  virtual bool is_any () const { return false; }
41
43
  virtual bool is_ellipses () const { return false; }
 
44
  virtual bool is_type () const { return false; }
 
45
  virtual bool is_value () const { return false; }
42
46
};
43
47
 
44
48
// streamed output for template argument match expressions
76
80
    out << ">";
77
81
  }
78
82
  bool matches (CTemplateInstance *instance) const;
 
83
  bool matches (MatchTemplateArgList &mtal) const;
79
84
};
80
85
 
81
 
inline ostream &operator << (ostream &out, MatchTemplateArgList &mtal) {
 
86
inline ostream &operator << (ostream &out, const MatchTemplateArgList &mtal) {
82
87
  mtal.print (out);
83
88
  return out;
84
89
}
89
94
public:
90
95
  void print (ostream &out) const { out << "%"; }
91
96
  bool matches (DeducedArgument *arg) const { return true; }
 
97
  bool matches (MatchTemplateArg &arg) const { return true; }
92
98
  MTA_Any *clone () const { return new MTA_Any (*this); }
 
99
  bool is_any () const { return true; }
93
100
};
94
101
 
95
102
 
100
107
  void print (ostream &out) const { out << "..."; }
101
108
  // TODO: not correct
102
109
  bool matches (DeducedArgument *arg) const { return true; }
 
110
  bool matches (MatchTemplateArg &arg) const { return true; }
103
111
  MTA_Ellipses *clone () const { return new MTA_Ellipses (*this); }
104
112
  bool is_ellipses () const { return true; }
105
113
};
113
121
  MTA_Type (const MatchTypeRef mt) : _match_type (mt) {}
114
122
  void print (ostream &out) const { out << _match_type; }
115
123
  bool matches (DeducedArgument *arg) const;
 
124
  bool matches (MatchTemplateArg &arg) const;
116
125
  MTA_Type *clone () const { return new MTA_Type (*this); }
 
126
  bool is_type () const { return true; }
117
127
};
118
128
 
119
129
 
124
134
  MTA_Value (long long val) : _val (val) {}
125
135
  void print (ostream &out) const { out << _val; }
126
136
  bool matches (DeducedArgument *arg) const;
 
137
  bool matches (MatchTemplateArg &arg) const;
127
138
  MTA_Value *clone () const { return new MTA_Value (*this); }
 
139
  bool is_value () const { return true; }
128
140
};
129
141
 
130
142
#endif // __MatchTemplateArg_h__