https://github.com/funatsufumiya/ofxcontinuable
continuable for openFrameworks
https://github.com/funatsufumiya/ofxcontinuable
openframeworks-addon
Last synced: 5 months ago
JSON representation
continuable for openFrameworks
- Host: GitHub
- URL: https://github.com/funatsufumiya/ofxcontinuable
- Owner: funatsufumiya
- License: other
- Created: 2024-12-03T19:38:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-03T20:04:34.000Z (about 1 year ago)
- Last Synced: 2025-09-29T16:52:46.918Z (5 months ago)
- Topics: openframeworks-addon
- Language: C++
- Homepage:
- Size: 121 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ofxContinuable
[continuable](https://github.com/Naios/continuable) for openFrameworks (tested on v0.12.0, continuable version: 4.2.2)
- also includes [function2](https://github.com/Naios/function2) (4.2.4) as a dependency
## Usage
See [example](example). (Please use `projectGenerator` before run it)
```cpp
#include "continuable.hpp"
inline cti::continuable start_greetings(std::string) {
return cti::make_ready_continuable("world");
}
//--------------------------------------------------------------
void ofApp::setup(){
ofLogToConsole();
start_greetings("hello")
.then([](std::string response) {
ofLogNotice("ofApp") << "hello: " << response;
})
.then([]() {
ofLogNotice("ofApp") << "waiting for 200ms";
ofSleepMillis(200);
})
.then([]() {
ofLogNotice("ofApp") << "done";
});
ofLogNotice("ofApp") << "normal log test";
}
// Result:
// [notice ] ofApp: hello: world
// [notice ] ofApp: waiting for 200ms
// [notice ] ofApp: done
// [notice ] ofApp: normal log test
```
## LICENSE
- continuable: [MIT License](https://github.com/Naios/continuable/blob/4.2.2/LICENSE.txt)
- function2: [BSL-1.0 License](https://github.com/Naios/function2/blob/4.2.4/LICENSE.txt)
NOTE: No specific copyright is claimed for this repository changes (for oF binding), but the [Apache License 2.0](LICENSE_APACHE) or [MIT License](LICENSE_MIT) can be applied if necessary.