Fix: update the correct pre-built script to cmake-sonar.sh
[ric-app/mc.git] / schemaparser / mc_keys.cc
1 #include<stdlib.h>
2 #include<stdio.h>
3 #include<string.h>
4
5 #include <sdl/syncstorage.hpp>
6
7
8 //      data type definitions from sdl
9 using Namespace = std::string;
10 using Key = std::string;
11 using Data = std::vector<uint8_t>;
12 using DataMap = std::map<Key, Data>;
13 using Keys = std::set<Key>;
14
15 int main(int argc, char **argv){
16
17         Namespace ns("mcnib");  
18         std::string prefix = "";
19         if(argc>1){
20                 prefix = argv[1];
21         }
22
23         std::unique_ptr<shareddatalayer::SyncStorage> sdl(shareddatalayer::SyncStorage::create());
24
25         Keys K = sdl->findKeys(ns, prefix);     // just the prefix
26         
27         for(auto si=K.begin();si!=K.end();++si){
28                 printf("%s\n",(*si).c_str());
29         }
30
31 }