Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/onionhammer/clibpp

Easy way to 'Mock' C++ interface
https://github.com/onionhammer/clibpp

cplusplus cpp nim

Last synced: about 2 months ago
JSON representation

Easy way to 'Mock' C++ interface

Awesome Lists containing this project

README

        

clibpp
======

Easy way to 'Mock' C++ interface

Outline the C++ class
---------------------
```nimrod
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
-----------------
```nimrod
# Test interface
test.output()

var item: test
echo item.multiply(5, 9)
echo item.fieldName
echo item.max(2, 10)
echo item.notherName
```