Update path to xapp descriptor. Add schema parser library
[ric-app/mc.git] / schemaparser / mc_keys.cc
diff --git a/schemaparser/mc_keys.cc b/schemaparser/mc_keys.cc
new file mode 100644 (file)
index 0000000..51201f5
--- /dev/null
@@ -0,0 +1,31 @@
+#include<stdlib.h>
+#include<stdio.h>
+#include<string.h>
+
+#include <sdl/syncstorage.hpp>
+
+
+//     data type definitions from sdl
+using Namespace = std::string;
+using Key = std::string;
+using Data = std::vector<uint8_t>;
+using DataMap = std::map<Key, Data>;
+using Keys = std::set<Key>;
+
+int main(int argc, char **argv){
+
+       Namespace ns("mcnib");  
+       std::string prefix = "";
+       if(argc>1){
+               prefix = argv[1];
+       }
+
+       std::unique_ptr<shareddatalayer::SyncStorage> sdl(shareddatalayer::SyncStorage::create());
+
+       Keys K = sdl->findKeys(ns, prefix);     // just the prefix
+       
+       for(auto si=K.begin();si!=K.end();++si){
+               printf("%s\n",(*si).c_str());
+       }
+
+}