Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
owf684 authored Feb 9, 2024
1 parent 9b652e4 commit 877c92a
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions README.md
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.

0 comments on commit 877c92a

Please sign in to comment.