00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CPPTEMPLATEPARAMETERLIST_H
00020 #define CPPTEMPLATEPARAMETERLIST_H
00021
00022 #include <dtoolbase.h>
00023
00024 #include "cppDeclaration.h"
00025
00026 #include <vector>
00027 #include <string>
00028
00029 class CPPScope;
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class CPPTemplateParameterList {
00040 public:
00041 CPPTemplateParameterList();
00042
00043 string get_string() const;
00044 void build_subst_decl(const CPPTemplateParameterList &formal_params,
00045 CPPDeclaration::SubstDecl &subst,
00046 CPPScope *current_scope, CPPScope *global_scope) const;
00047
00048 bool is_fully_specified() const;
00049 bool is_tbd() const;
00050
00051 bool operator == (const CPPTemplateParameterList &other) const;
00052 bool operator != (const CPPTemplateParameterList &other) const;
00053 bool operator < (const CPPTemplateParameterList &other) const;
00054
00055 CPPTemplateParameterList *substitute_decl(CPPDeclaration::SubstDecl &subst,
00056 CPPScope *current_scope,
00057 CPPScope *global_scope);
00058
00059 void output(ostream &out, CPPScope *scope) const;
00060 void write_formal(ostream &out, CPPScope *scope) const;
00061
00062 typedef vector<CPPDeclaration *> Parameters;
00063 Parameters _parameters;
00064 };
00065
00066 inline ostream &
00067 operator << (ostream &out, const CPPTemplateParameterList &plist) {
00068 plist.output(out, (CPPScope *)NULL);
00069 return out;
00070 }
00071
00072
00073
00074
00075 class CPPTPLCompare {
00076 public:
00077 bool operator () (const CPPTemplateParameterList *a,
00078 const CPPTemplateParameterList *b) const {
00079 return (*a) < (*b);
00080 }
00081 };
00082
00083 #endif
00084
00085