|
1 | | -/===============================================================================================================\ |
2 | | -| _ _ _ ___ _ _ ___ ____ | |
3 | | -| | | ___| | _____ _ _ ___( ) |_ _| \ | |_ _| _ \ __ _ _ __ ___ ___ _ __ | |
4 | | -| | | / _ \ |/ / __| | | / __|/ | || \| || || |_) / _` | '__/ __|/ _ \ '__| | |
5 | | -| | |__| __/ <\__ \ |_| \__ \ | || |\ || || __/ (_| | | \__ \ __/ | | |
6 | | -| |_____\___|_|\_\___/\__, |___/ |___|_| \_|___|_| \__,_|_| |___/\___|_| | |
7 | | -| |___/ | |
8 | | -| by Borovik Alexey | |
9 | | -\===============================================================================================================/ |
| 1 | +# Lek'sys INI Parser |
10 | 2 |
|
11 | 3 | Crossplatform all-in-one INI-file parser, written on C++ with STL |
12 | 4 |
|
13 | | -|---------------------------------------------------------------------------------------------------------------| |
14 | | -| Advantages | |
15 | | -|---------------------------------------------------------------------------------------------------------------| |
16 | | - |
17 | | -• Residents in single file - iniparser.hpp. Simply include it to your project and use |
18 | | -• Crossplatform (Windows & POSIX) |
19 | | -• Nice and easy-to-use C++ interface |
20 | | -• Extends standart INI interface with: |
21 | | - -> Arrays (comma-separated values) support |
22 | | - -> Nested sections [parent.child] support |
23 | | - -> File includes (;#include <file_path>) |
24 | | -• Can be used to save and load any user-defined classes, as long as stream operators are provided |
25 | | -• Supports multilines |
26 | | -• Loads & saves comments |
27 | | -• MIT license |
28 | | - |
29 | | -|---------------------------------------------------------------------------------------------------------------| |
30 | | -| Usage | |
31 | | -|---------------------------------------------------------------------------------------------------------------| |
| 5 | +## Advantages |
| 6 | + |
| 7 | + - Residents in single file - iniparser.hpp. Simply include it to your project and use |
| 8 | + - Crossplatform (Windows & POSIX) |
| 9 | + - Nice and easy-to-use C++ interface |
| 10 | + - Extends standart INI interface with: |
| 11 | + - Arrays (comma-separated values) support |
| 12 | + - Nested sections [parent.child] support |
| 13 | + - File includes (;#include <file_path>) |
| 14 | + - Can be used to save and load any user-defined classes, as long as stream operators are provided |
| 15 | + - Supports multilines |
| 16 | + - Loads & saves comments |
| 17 | + - MIT license |
| 18 | + |
| 19 | +## Usage |
32 | 20 |
|
33 | 21 | Include provided iniparser.hpp to your C++ project and that is all |
34 | 22 | Usage information can be found on project's GitHub page |
35 | 23 | Look in test_app.cpp for different ways of using Leksys' IniParser |
36 | 24 | For testing purposes you can compile provided test application (see next section) |
37 | 25 |
|
38 | | -|---------------------------------------------------------------------------------------------------------------| |
39 | | -| Building Test Application | |
40 | | -|---------------------------------------------------------------------------------------------------------------| |
| 26 | +## Building Test Application |
| 27 | + |
41 | 28 | You need to install CMake before building test_app |
42 | 29 | CMake binary for your platform can be found at: |
43 | 30 | http://www.cmake.org/cmake/resources/software.html |
44 | 31 |
|
45 | | -1. POSIX (Linux, QNX, FreeBSD, MacOS) |
46 | | -In console type: |
47 | | -# mkdir build; cd build |
48 | | -# cmake <this_file_dir> |
49 | | -# make |
| 32 | +### POSIX (Linux, QNX, FreeBSD, MacOS) |
| 33 | + |
| 34 | +```sh |
| 35 | +$ mkdir build; cd build |
| 36 | +$ cmake <this_file_dir> |
| 37 | +$ make |
| 38 | +``` |
50 | 39 |
|
51 | | -2. Windows |
52 | | -Use cmake-gui application for building project files for your |
53 | | -IDE (currently supported: Visual Studio, Borland C++, CodeBlocks (MinGW), Eclipse (MinGW)). |
| 40 | +### Windows |
54 | 41 |
|
55 | | -Under QtCreator (v. 2.2.1) you can open Cmake projects directly from the |
56 | | -IDE (File -> Open Project) |
| 42 | +Use cmake-gui application for building project files for your IDE (currently supported: Visual Studio, Borland C++, CodeBlocks (MinGW), Eclipse (MinGW)). |
57 | 43 |
|
58 | | -Alternatively, if you want to build project for Visual Studio, you can |
59 | | -do it directly from the console in true-Linux style =): |
| 44 | +Under QtCreator (v. 2.2.1) you can open Cmake projects directly from the IDE (File -> Open Project) |
60 | 45 |
|
61 | | -# mkdir build; cd build |
62 | | -# cmake <this_file_dir> |
63 | | -# %VS90COMNTOOLS%\vsvars32.bat |
64 | | -# nmake |
| 46 | +Alternatively, if you want to build project for Visual Studio, you can do it directly from the console in true-Linux style =): |
| 47 | + |
| 48 | +```cmd |
| 49 | +$ mkdir build; cd build |
| 50 | +$ cmake <this_file_dir> |
| 51 | +$ %VS90COMNTOOLS%\vsvars32.bat |
| 52 | +$ nmake |
| 53 | +``` |
65 | 54 |
|
66 | 55 | Note, that if you have Visual Studio 10.0 (2010) environment variable will |
67 | 56 | be %VS100COMNTOOLS% and so on. |
68 | 57 |
|
69 | | -|---------------------------------------------------------------------------------------------------------------| |
70 | | -| Running Test Application | |
71 | | -|---------------------------------------------------------------------------------------------------------------| |
| 58 | +## Running Test Application |
| 59 | + |
72 | 60 | 1. Simply start application and ensure, that 10 first tests pass. |
73 | 61 | 2. Start application with parameters: |
74 | 62 | -i <this_file_dir>/ini-test/test1.ini -o out_file.ini |
|
0 commit comments