Coder Social home page Coder Social logo

vogelpapafinn / smallconfigs Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 766 KB

A small C++17 lib to handle simple config files.

License: MIT License

C++ 100.00%
library cpp cpp-lib free free2use visual-studio visual-studio-2019 cpp-programming configuration-files configs

smallconfigs's Introduction

Small Configs

With this C++ lib you can use basic configuration files. It is really easy to use and doesnt need to be compiled.

Installation

To use this lib just follow these really easy instructions:

Download or clone the repo
$ git clone https://github.com/VogelPapaFinn/SmallConfigs

Now include these two files to your project:
- config_file.h
- config_file.cpp

Include the header file where you want to use the lib:
$ #include "config_file.h"

Usage

The lib is simple to use and all of the functions are self-explanatory. Look at the documentation file for further information.

$ config_file c("config.ini")

$ c.write("att1", "value", "group")
$ c.write("foo", "bar", "root")

$ c.write_list("List1", std::array<std::string, 3>{"1", "2", "3"})
$ c.write_list("List1", std::vector<std::string>{"1", "2", "3"})
$ c.write_list("List1", std::list<std::string>{"1", "2", "3"})

$ c.get("att1")
$ c.get("att1", "root")

$ c.get_list_as_vector("List1")
$ c.get_raw_list("List1")

$ c.file_valid("config.ini")

Features

  • Choose your own filename and datatype e.g. .ini or .cfg
  • Group-System - currently everything belongs to a group
  • Lists are supported [basic atm]
  • Basic operations
    • adding attributes and values
    • changing & deleting them
    • creating & deleting groups
    • moving attributes between groups

Planned Features

  • Improved support for lists.

If you have any ideas to improve the lib create a issue or send me a message on discord.

Social Media - Contact

  • Discord: VogelPapa | Finn#0442

smallconfigs's People

Contributors

vogelpapafinn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.