Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame^] | 1 | #ifndef _SLANG_COMPILER_RS_EXPORT_VAR_HPP |
| 2 | # define _SLANG_COMPILER_RS_EXPORT_VAR_HPP |
| 3 | |
| 4 | #include "llvm/ADT/StringRef.h" /* for class llvm::StringRef */ |
| 5 | |
| 6 | #include "clang/AST/Decl.h" /* for clang::VarDecl */ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | namespace slang { |
| 11 | |
| 12 | using namespace clang; |
| 13 | |
| 14 | class RSContext; |
| 15 | class RSExportType; |
| 16 | |
| 17 | class RSExportVar { |
| 18 | friend class RSContext; |
| 19 | private: |
| 20 | RSContext* mContext; |
| 21 | std::string mName; |
| 22 | const RSExportType* mET; |
| 23 | |
| 24 | RSExportVar(RSContext* Context, const VarDecl* VD, const RSExportType* ET); |
| 25 | |
| 26 | public: |
| 27 | inline const std::string& getName() const { return mName; } |
| 28 | inline const RSExportType* getType() const { return mET; } |
| 29 | inline RSContext* getRSContext() const { return mContext; } |
| 30 | |
| 31 | }; /* RSExportVar */ |
| 32 | |
| 33 | |
| 34 | } /* namespace slang */ |
| 35 | |
| 36 | #endif /* _SLANG_COMPILER_RS_EXPORT_VAR_HPP */ |