[ClavaLaraApi] ClavaDataStore now has functions for options 'flags' and
'systemIncludes'
@@ -26,4 +26,49 @@ ClavaDataStore.prototype._dataStoreWrapper = function(javaDataStore) {
}
-/*** NEW WEAVER_DATA_STORE FUNCTIONS ***/
\ No newline at end of file
+/*** NEW CLAVA_DATA_STORE FUNCTIONS ***/
+
+/**
+ * @return {string} a string with the current C/C++ compiler flags.
+ */
+ClavaDataStore.prototype.getFlags = function() {
+ return this.get("Compiler Flags");
+}
+
+/**
+ * @param {string} flags - A string with C/C++ compiler flags.
+ *
+ */
+ClavaDataStore.prototype.setFlags = function(flags) {
+ checkString(flags);
+
+// if((typeof flags) === "array") {
+// flags = flags.join(" ");
+// } else {
+// checkString(flags);
+// }
+
+ this.put("Compiler Flags", flags);
+}
+
+/**
+ * @return {J#java.util.List<String>} A list with the current extra system includes.
+ */
+ClavaDataStore.prototype.getSystemIncludes = function() {
+ return this.get("library includes").getFiles();
+}
+
+/**
+ * @param {string...} flags - A variable number of strings with the extra system includes.
+ *
+ */
+ClavaDataStore.prototype.setSystemIncludes = function() {
+ var filenames = arrayFromArgs(arguments);
+ var files = [];
+ for(filename of filenames) {
+ files.push(Io.getPath(filename));
+ }
+
+ var fileList = Java.type("org.lara.interpreter.joptions.keys.FileList").newInstance(files);
+ this.put("library includes", fileList);
+}
