Simple support for reflecting rsForEach().
BUG=4203264
Change-Id: Idf722ee3fb07c8e46ac0c4628e753ff2fa6840cf
diff --git a/slang_rs_context.h b/slang_rs_context.h
index 91b1aa1..c49f2d5 100644
--- a/slang_rs_context.h
+++ b/slang_rs_context.h
@@ -48,6 +48,7 @@
class RSExportable;
class RSExportVar;
class RSExportFunc;
+ class RSExportForEach;
class RSExportType;
class RSContext {
@@ -59,6 +60,7 @@
typedef std::list<RSExportable*> ExportableList;
typedef std::list<RSExportVar*> ExportVarList;
typedef std::list<RSExportFunc*> ExportFuncList;
+ typedef std::list<RSExportForEach*> ExportForEachList;
typedef llvm::StringMap<RSExportType*> ExportTypeMap;
private:
@@ -88,6 +90,7 @@
ExportVarList mExportVars;
ExportFuncList mExportFuncs;
+ ExportForEachList mExportForEach;
ExportTypeMap mExportTypes;
public:
@@ -162,6 +165,15 @@
}
inline bool hasExportFunc() const { return !mExportFuncs.empty(); }
+ typedef ExportForEachList::const_iterator const_export_foreach_iterator;
+ const_export_foreach_iterator export_foreach_begin() const {
+ return mExportForEach.begin();
+ }
+ const_export_foreach_iterator export_foreach_end() const {
+ return mExportForEach.end();
+ }
+ inline bool hasExportForEach() const { return !mExportForEach.empty(); }
+
typedef ExportTypeMap::iterator export_type_iterator;
typedef ExportTypeMap::const_iterator const_export_type_iterator;
export_type_iterator export_types_begin() { return mExportTypes.begin(); }