Type checking for C++ API.

Bug: 10427951

Change-Id: I76a6093237a3b27a0c9e6ce38997cb1e0128efb9
diff --git a/slang_rs_reflection_cpp.h b/slang_rs_reflection_cpp.h
index de7e824..948d624 100644
--- a/slang_rs_reflection_cpp.h
+++ b/slang_rs_reflection_cpp.h
@@ -19,6 +19,9 @@
 
 #include "slang_rs_reflection_base.h"
 
+#include <set>
+#include <string>
+
 namespace slang {
 
 class RSReflectionCpp : public RSReflectionBase {
@@ -40,6 +43,7 @@
     mNextExportVarSlot = 0;
     mNextExportFuncSlot = 0;
     mNextExportForEachSlot = 0;
+    mTypesToCheck.clear();
   }
 
   inline unsigned int getNextExportVarSlot() {
@@ -83,6 +87,14 @@
   void genPackVarOfType(const RSExportType *ET,
                         const char *VarName,
                         const char *FieldPackerName);
+
+  // Generate a runtime type check for VarName.
+  void genTypeCheck(const RSExportType *ET, const char *VarName);
+
+  // Generate a type instance for a given forEach argument type.
+  void genTypeInstanceFromPointer(const RSExportType *ET);
+  void genTypeInstance(const RSExportType *ET);
+
 };  // class RSReflectionCpp
 
 }   // namespace slang