Zonr Chang | a41ce1d | 2010-10-06 02:23:12 +0800 | [diff] [blame^] | 1 | #ifndef _SLANG_COMPILER_RS_EXPORTABLE_HPP |
| 2 | #define _SLANG_COMPILER_RS_EXPORTABLE_HPP |
| 3 | |
| 4 | #include "slang_rs_context.h" |
| 5 | |
| 6 | namespace slang { |
| 7 | |
| 8 | class RSExportable { |
| 9 | public: |
| 10 | enum Kind { |
| 11 | EX_FUNC, |
| 12 | EX_TYPE, |
| 13 | EX_VAR |
| 14 | }; |
| 15 | |
| 16 | private: |
| 17 | Kind mK; |
| 18 | |
| 19 | protected: |
| 20 | RSExportable(RSContext *Context, RSExportable::Kind K) : mK(K) { |
| 21 | Context->newExportable(this); |
| 22 | return; |
| 23 | } |
| 24 | |
| 25 | public: |
| 26 | inline Kind getKind() const { return mK; } |
| 27 | |
| 28 | virtual ~RSExportable() { } |
| 29 | }; |
| 30 | |
| 31 | } |
| 32 | |
| 33 | #endif // _SLANG_COMPILER_RS_EXPORTABLE_HPP |