| 1 |
#include "mylib.h" |
| 2 |
#include <iostream> |
| 3 |
|
| 4 |
Test::Test() { |
| 5 |
std::cout << "Test initialized" << std::endl; |
| 6 |
} |
| 7 |
|
| 8 |
Test::Test(int param) { |
| 9 |
std::cout << "Test initialized with param " << param << std::endl; |
| 10 |
} |
| 11 |
|
| 12 |
void Test::testCallFromClass() { |
| 13 |
std::cout << "Calling C++ class function from Swift is working" << std::endl; |
| 14 |
} |
| 15 |
|
| 16 |
void testCallFromSwift() { |
| 17 |
std::cout << "Calling this C++ function from Swift is working" << std::endl; |
| 18 |
} |
| 19 |
|
| 20 |
void testCallWithParam(const std::string ¶m) { |
| 21 |
std::cout << param << std::endl; |
| 22 |
} |