-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# How to USE | ||
|
||
## Adding to Project | ||
|step| Action | | ||
-----|---------------------------------------------------| | ||
|1 |download source files | | ||
|2 |place source files into your project | | ||
|3 |add the include directive like so include "qadon.h"| | ||
|
||
|
||
## Qadon File Format | ||
|
||
The format of a qadon is similar to a json. All the data members live inside the curly braces { ... } | ||
The data members are seperated with spaces. No commas are necessary. The extension of the file doesn't matter either. | ||
``` | ||
{ | ||
key_1 : value_1 | ||
key_2 : value_2 | ||
key_3 : value_3 | ||
key_n : value_n | ||
} | ||
``` | ||
|
||
|
||
## Creating a Qadon | ||
``` | ||
#include "qadon.h" | ||
int main() | ||
{ | ||
// define your qadon | ||
qadon myQadon; | ||
// add data memebrs | ||
myQadon["Hello"] = "World"; | ||
myQadon["This"] = "is easy!"; | ||
myQadon["What"] = " do you think?"; | ||
// accesing data members | ||
std::string data = myQadon["Hello"] | ||
// printing all key,data pairs | ||
myQadon.print(); | ||
// Write qadon to file | ||
myQadon.write("new.qadon"); | ||
// Readon qadon file | ||
qadon read("new.qadon") | ||
return 0; | ||
} | ||
``` | ||
## Limitations | ||
The qadon data members are currently limited to strings only. I think I can easily have a mix typed qadon by using templates. That will probably come in version v0.2.0. |