mirror of
https://github.com/onionhammer/clibpp.git
synced 2026-01-02 06:44:44 +00:00
No description
| .gitignore | ||
| clibpp.babel | ||
| clibpp.nim | ||
| LICENSE | ||
| makefile | ||
| README.md | ||
| test.cpp | ||
| test.hpp | ||
clibpp
Easy way to 'Mock' C++ interface
Outline the C++ class
namespace somelibrary:
class(test, header: "../test.hpp"):
proc multiply[T](value, by: T): int
proc output: void {.isstatic.}
proc max[T](a, b: T): T
var fieldName, notherName: int
Use the C++ class
# Test interface
test.output()
var item: test
echo item.multiply(5, 9)
echo item.fieldName
echo item.max(2, 10)
echo item.notherName