2009-10-26 12:41:13 +01:00
|
|
|
#ifndef GENTEMPLATEINSTANCE_H
|
|
|
|
|
#define GENTEMPLATEINSTANCE_H
|
|
|
|
|
|
|
|
|
|
#include <TypeVisitor.h>
|
|
|
|
|
#include <NameVisitor.h>
|
|
|
|
|
#include <FullySpecifiedType.h>
|
|
|
|
|
|
2009-10-26 17:54:32 +01:00
|
|
|
#include "LookupContext.h"
|
|
|
|
|
|
2009-10-26 12:41:13 +01:00
|
|
|
#include <QtCore/QList>
|
|
|
|
|
#include <QtCore/QPair>
|
|
|
|
|
|
|
|
|
|
namespace CPlusPlus {
|
|
|
|
|
|
2009-10-26 17:54:32 +01:00
|
|
|
class CPLUSPLUS_EXPORT GenTemplateInstance
|
2009-10-26 12:41:13 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2009-10-26 17:54:32 +01:00
|
|
|
typedef QList< QPair<Identifier *, FullySpecifiedType> > Substitution;
|
2009-10-26 12:41:13 +01:00
|
|
|
|
|
|
|
|
public:
|
2009-10-26 17:54:32 +01:00
|
|
|
GenTemplateInstance(const LookupContext &context, const Substitution &substitution);
|
|
|
|
|
|
|
|
|
|
FullySpecifiedType operator()(Symbol *symbol);
|
|
|
|
|
|
|
|
|
|
Control *control() const;
|
|
|
|
|
int findSubstitution(Identifier *id) const;
|
2009-10-26 12:41:13 +01:00
|
|
|
|
|
|
|
|
private:
|
2009-10-26 17:54:32 +01:00
|
|
|
Symbol *_symbol;
|
|
|
|
|
LookupContext _context;
|
2009-10-26 12:41:13 +01:00
|
|
|
const Substitution _substitution;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // end of namespace CPlusPlus
|
|
|
|
|
|
|
|
|
|
#endif // GENTEMPLATEINSTANCE_H
|