• Stars
    star
    31
  • Rank 792,361 (Top 17 %)
  • Language
    C++
  • License
    Other
  • Created almost 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📑 Yet another ini config parser for modern C++

C++ INI Parser

C/C++ CI codecov

Yet another .ini parser for modern c++ (made for cpp17), inspired and extend from inih.

Example

The config.ini's content is something looks like:

[section1]
any=5

[section2]
any_vec = 1 2 3
#include "ini/ini.h"

int main() {
    inih::INIReader r{"./test/fixtures/config.ini"};

    // Get and parse the ini value
    const auto& v1 = r.Get<std::string>("section1", "any"); // "5"
    const auto& v2 = r.Get<int>("section1", "any"); // 5
    const auto& v3 = r.Get<double>("section1", "any"); // 5.0
    const auto& v4 = r.GetVector<float>("section2", "any_vec"); // [1.0, 2.0, 3.0]
    const auto& v5 = r.GetVector<std::string>("section2", "any_vec"); // ["1", "2", "3"]

    // And also support writing to new ini file.
    r.InsertEntry("new_section", "key1", 5); // Create new entry
    inih::INIWriter::write("output.ini", r); // Dump ini to file

    return 0;
}

To learn more, please refer to test folder, it covered ALL utilities.

Install

Simply copy the header file ini/ini.h to your project, then done.

More Repositories

1

Coherent-Line-Drawing

🖼✨Automatically generates line drawing from a photograph
C++
547
star
2

DeepCORAL

🧠 A PyTorch implementation of 'Deep CORAL: Correlation Alignment for Deep Domain Adaptation.', ECCV 2016
Python
214
star
3

panoramas-image-stitching

🖼 Stitching images into 360 panoramas
Python
202
star
4

HDR-imaging

An implementation of "Paul E. Debevec, Jitendra Malik, Recovering High Dynamic Range Radiance Maps from Photographs, SIGGRAPH 1997."
Jupyter Notebook
76
star
5

ssarcandy-vim

My vim settings and plugins, compatible with MacVim in OSX
Vim Script
14
star
6

breakout-env

🎮 A configurable Breakout environment for reinforcement learning
Python
10
star
7

colorblocks-react-native

🎮 A fun puzzle game for both iOS and Android devices, implemented with React Native.
JavaScript
7
star
8

openGL_Telescope_Model

A 3D Telescope simulator implement with openGL & glut
C++
6
star
9

node-apod

"Astronomy Picture of the Day" scraper for node, support multi-language
JavaScript
4
star
10

Light-Field-Image-Synthetic

Synthetic all refocused images
Python
3
star
11

eth-chart

realtime maicoin ETH price
JavaScript
3
star
12

hostat

🛠 A simple CLI tool to print out host status in one line.
Go
3
star
13

nccu30

政大三十大講堂宣傳網站
JavaScript
3
star
14

n-puzzle-solver-with-CV

C++
3
star
15

colorblocks-react

A fun puzzle game implemented with React.js
JavaScript
3
star
16

ssarcandy.github.io

my blog
Less
3
star
17

hexo-tag-photozoom

A Hexo tag plugin for image zooming, with a zooming effect similar to Medium.
JavaScript
3
star
18

ob-hover

HTML
2
star
19

docker-swarm-couchdb

2
star
20

USFB-with-CV

use background subtraction to detect user action
C++
2
star
21

Advance_n-puzzle_Solver

n-puzzle solver with obstacles, or with more than 1 space
C++
1
star
22

timing-attack

Prove of Concept for Timing Attack
C++
1
star
23

phancer-tester

Auto enhance your photo using phancer website
JavaScript
1
star
24

Ultimate-Shooting-Flappy-Bird

A simple 2D Game implement by glut (openGL)
C++
1
star
25

VirtualExam

C#
1
star
26

myNote

Python
1
star
27

slack-for-APOD

slack bot that post Astronomy Picture of the Day
JavaScript
1
star