Remove include folder
This commit is contained in:
parent
401226f094
commit
a1e98443c7
|
@ -9,10 +9,9 @@ set(GCC_COVERAGE_COMPILE_FLAGS "-fdeclspec")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
||||||
|
|
||||||
add_library(clAugeas SHARED
|
add_library(clAugeas SHARED
|
||||||
include/augSettings.cpp
|
augSettings.cpp
|
||||||
include/augSettings.h
|
augSettings.h
|
||||||
|
main.cpp main.h)
|
||||||
main.cpp main.h include/pair.cpp)
|
|
||||||
|
|
||||||
target_link_libraries(clAugeas augeas)
|
target_link_libraries(clAugeas augeas)
|
||||||
|
|
||||||
|
|
18
main.cpp
18
main.cpp
|
@ -131,10 +131,9 @@ CLAPI const char* get_tree(
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map <std::string, std::string> stdBindList;
|
|
||||||
std::map <std::string ,std::string>::iterator pos;
|
std::map <std::string ,std::string>::iterator pos;
|
||||||
|
|
||||||
std::stringstream rstream;
|
std::stringstream ss;
|
||||||
|
|
||||||
|
|
||||||
char line[256];
|
char line[256];
|
||||||
|
@ -160,22 +159,11 @@ CLAPI const char* get_tree(
|
||||||
value.erase(value.begin());
|
value.erase(value.begin());
|
||||||
value.erase(value.end() - 1);
|
value.erase(value.end() - 1);
|
||||||
|
|
||||||
rstream << ";K;" << key << ";VAL;" << value << ";ENDL;";
|
ss << ";K;" << key << ";VAL;" << value << ";ENDL;";
|
||||||
|
|
||||||
stdBindList.insert(std::pair<std::string,std::string>(key,value)); // 2
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(out);
|
fclose(out);
|
||||||
|
return strdup(ss.str().c_str());
|
||||||
|
|
||||||
for (pos = stdBindList.begin();pos!=stdBindList.end();pos++)
|
|
||||||
{
|
|
||||||
std::cout << "Key: " << pos->first << ";" << " Value: " << pos->second << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return strdup(rstream.str().c_str());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CLAPI void free_str(char* str) {
|
CLAPI void free_str(char* str) {
|
||||||
|
|
2
main.h
2
main.h
|
@ -3,7 +3,7 @@
|
||||||
#include "augeas.h"
|
#include "augeas.h"
|
||||||
#include "map"
|
#include "map"
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "include/augSettings.h"
|
#include "augSettings.h"
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define CLAPI __declspec(dllexport)
|
#define CLAPI __declspec(dllexport)
|
||||||
|
|
Loading…
Reference in New Issue