Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/w-mai/zongheng


https://github.com/w-mai/zongheng

Last synced: 26 days ago
JSON representation

Awesome Lists containing this project

README

        

# 纵横

ZongHeng is opposite theories of vertical and horizontal alliance of states with the state of Qin as pivot in Chinese
history.

# General Usage

[![asciicast](https://asciinema.org/a/4hVNy8g5x5BBMQtjvNM27koqs.svg)](https://asciinema.org/a/4hVNy8g5x5BBMQtjvNM27koqs)

```c++
#include "Qin.h"
#include

using namespace std;

int main() {
auto hello_str = std::string("Hello ");
auto hello = Qin::make(hello_str);
auto name = Qin::make();
auto mark = Qin::make(" !");
// 联合`变量`
auto sentence = hello + name + mark;

sentence->getter([](const string& s) {
return s + " 🤤";
});

auto name_tmp = std::string("World");
do {
// 一呼百应
*name = name_tmp;
cout << sentence->get() << endl;
} while (cin >> name_tmp);

return 0;
}

```

# Run Example

```shell
mkdir -p build && cd build
cmake .. && make -j
./example
```

# Run Test

```shell
mkdir -p build && cd build
cmake .. && make -j
ctest
```

# TODO

- [ ] Support more complex chain
- [ ] Support condition chain
- [ ] ...

# Commit Information

| means | emoji |
|----------|-------|
| feature | ❤️ |
| fix | 🤡 |
| format | 🧾 |
| refactor | ⚙️ |
| update | 🆕 |
| WIP | ⌛️ |