From 0bafd8d939245098c97ed10674331819307b96f2 Mon Sep 17 00:00:00 2001 From: Nina Dzugasova <dzugasova.nina@gmail.com> Date: Wed, 5 Dec 2018 17:07:43 +0100 Subject: [PATCH] Added ListExample and ConfigDescriptionExample. --- src/Examples/CMakeLists.txt | 3 +++ src/Examples/ConfigDescriptionExample.cpp | 5 ++++- src/Examples/ListExample.cpp | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/Examples/ListExample.cpp diff --git a/src/Examples/CMakeLists.txt b/src/Examples/CMakeLists.txt index 235f860216..2375c66931 100644 --- a/src/Examples/CMakeLists.txt +++ b/src/Examples/CMakeLists.txt @@ -24,6 +24,9 @@ target_link_libraries( ConfigDescriptionExample tnl ) ADD_EXECUTABLE( FileExample FileExample.cpp ) target_link_libraries( FileExample tnl ) +ADD_EXECUTABLE( ListExample ListExample.cpp ) +target_link_libraries( ListExample tnl ) + ADD_EXECUTABLE( LoggerExample LoggerExample.cpp ) target_link_libraries( LoggerExample tnl ) diff --git a/src/Examples/ConfigDescriptionExample.cpp b/src/Examples/ConfigDescriptionExample.cpp index 56f3e95456..a6e0bded8a 100644 --- a/src/Examples/ConfigDescriptionExample.cpp +++ b/src/Examples/ConfigDescriptionExample.cpp @@ -7,5 +7,8 @@ using namespace std; int main() { ConfigDescription confd; - + confd.template addEntry< String >("--new-entry","Specific description."); + confd.template addEntryEnum< String >("option1"); + confd.template addEntryEnum< String >("option2"); + confd.addDelimiter("-----------------------------"); } diff --git a/src/Examples/ListExample.cpp b/src/Examples/ListExample.cpp new file mode 100644 index 0000000000..4582436a44 --- /dev/null +++ b/src/Examples/ListExample.cpp @@ -0,0 +1,11 @@ +#include <iostream> +#include <TNL/ConfigDescription.h> + +using namespace TNL; +using namespace std; + +int main() +{ + List lst; + lst.Append(data); +} \ No newline at end of file -- GitLab