Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on:
push:
branches:
- "master"
- "develop"
- "feature/*"
pull_request:
branches:
- "develop"
- "master"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# cppIni - A C++20/23 library for reading and writing INI files

[![Build](https://github.com/Master92/cppIni/actions/workflows/build.yaml/badge.svg)](https://github.com/Master92/cppIni/actions/workflows/build.yaml)
![License](https://img.shields.io/github/license/Master92/cppIni)
![GitHub stars](https://img.shields.io/github/stars/Master92/cppIni?label=%E2%AD%90%20Stars)

## Features

This project is a library for reading and writing INI files. It is written in C++20 and uses the STL.
It is tested with GCC 13, Clang 16 and MSVC 19.36. It should work with any compiler that supports C++20.

## Usage

``` cpp
#include <cppIni/cppIni.hpp>

Inifile ini("test.ini");
```

## License

cppIni is licensed under the MIT license. See [COPYING](https://github.com/Master92/cppIni/COPYING) for more information.
18 changes: 18 additions & 0 deletions include/cppIni/cppIni.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <cppIni/cppini_export.h>
Expand Down
18 changes: 18 additions & 0 deletions src/Entry.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "Entry.h"
#include "Section.h"

Expand Down
18 changes: 18 additions & 0 deletions src/Entry.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <string>
Expand Down
18 changes: 18 additions & 0 deletions src/File.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "File.h"

#include <fstream>
Expand Down
18 changes: 18 additions & 0 deletions src/File.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include "Section.h"
Expand Down
18 changes: 18 additions & 0 deletions src/Section.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "Section.h"

#include <algorithm>
Expand Down
18 changes: 18 additions & 0 deletions src/Section.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include "Entry.h"
Expand Down
18 changes: 18 additions & 0 deletions src/cppIni.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include <cppIni/cppIni.h>

int one()
Expand Down
18 changes: 18 additions & 0 deletions tests/ConstructionTest.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#include <doctest/doctest.h>
Expand Down
18 changes: 18 additions & 0 deletions tests/EntryTest.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include <doctest/doctest.h>
#include <sstream>
#include <vector>
Expand Down
18 changes: 18 additions & 0 deletions tests/FileTest.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include <doctest/doctest.h>
#include <cstring>

Expand Down
18 changes: 18 additions & 0 deletions tests/SectionTest.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* cppIni - C++17/20/23 library for dealing with settings files
* Copyright (C) 2023 Nils Hofmann <nils.friedchen@googlemail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include <doctest/doctest.h>

#include "../src/Section.h"
Expand Down