Compare commits

..

No commits in common. 'dev' and 'cmake' have entirely different histories.
dev ... cmake

  1. 3
      README.md
  2. 1
      example/config.cfg
  3. 3
      src/config.cpp
  4. 3
      test/test.cpp

@ -13,11 +13,10 @@ Easily load variable configuration parameters into your program using this libra
- Predefined necessary keys and enabled validation
- Strict configuration file format
- Comments in configuration file supported
- Update config file from program
## Installation
Just download the latest release and use cmake build system
Just download the latest release and unzip it into your project. You can turn it on with:
```c++
#include "config/lib/config.hpp"

@ -10,4 +10,3 @@ DinioServer1Port=5000;
DinioServer2Port=4048;
DinioGetIPURL=http://lab-it.ddns.net/getip/index.php; #ovo ide na više A recorda i više servera pod istim domenom
# DinioGetIPURL2=http://ns-hl.ddns.net/getip/index.php;
Baba2=Janja;

@ -14,10 +14,7 @@ marcelb::config::config(const string _configFilePath, const vector<string> _nece
string marcelb::config::operator[](const string& key) {
if (element.count(key)) {
return element[key];
}
return "";
}
void marcelb::config::update(const string& key, const string& value) {

@ -1,6 +1,5 @@
#include <iostream>
#include "../lib/config.hpp"
#include <unistd.h>
using namespace std;
using namespace marcelb;
@ -13,6 +12,6 @@ int main() {
mycfg.update("Baba2", "Janja");
cout << mycfg["Baba"];
sleep(10000);
return 0;
}
Loading…
Cancel
Save