-
Notifications
You must be signed in to change notification settings - Fork 1
/
MetaMethodSignature.h
49 lines (37 loc) · 1.05 KB
/
MetaMethodSignature.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _METAMETHODSIGNATURE_H
#define _METAMETHODSIGNATURE_H
#include <string>
#include <vector>
#include "Tokenizer.h"
#include "MetaMethodArgument.h"
namespace clang
{
class CompilerInstance;
class FunctionDecl;
}
class MetaMethodSignature
{
public:
// Create an invalid signature
MetaMethodSignature() : mValid(false)
{
}
///
/// Parses a connect call meta method reference signature from a string
///
MetaMethodSignature(std::string str, clang::CompilerInstance &instance);
///
/// Parses a declaration signature from a Clang function decl
///
MetaMethodSignature(const clang::FunctionDecl *decl, clang::CompilerInstance &instance);
bool isValid() const { return mValid; }
std::string methodName() const { return mMethodName; }
const std::vector<MetaMethodArgument> &arguments() const { return mArguments; }
std::string spelling() const;
private:
bool parseConnectCallRefTokens(TokenVector::const_iterator begin, TokenVector::const_iterator end);
bool mValid;
std::string mMethodName;
std::vector<MetaMethodArgument> mArguments;
};
#endif