-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (31 loc) · 1.11 KB
/
main.cpp
File metadata and controls
37 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* @cond
* Filename: main.cpp
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <giri@nwrk.biz> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return Daniel Giritzer
* ----------------------------------------------------------------------------
* @endcond
*/
#include "foo.h"
#include "so/foo_manip.h" // Compiled using CLANG (C++17)
#include <string>
#include <iostream>
int main()
{
foo* fooObj = new foo("foo");
FOO_MANIP_SayFoo(fooObj);
FOO_MANIP_SetFoo(fooObj, "newFoo");
FOO_MANIP_SayFoo(fooObj);
std::cout << "fooObj->GetFoo(): " << fooObj->GetFoo() << std::endl;
// Use foo_manip.so to set m_Foo back to 'foo'
FOO_MANIP_ResetFoo(fooObj);
FOO_MANIP_SayFoo(fooObj);
std::cout << "fooObj->GetFoo(): " << fooObj->GetFoo() << std::endl;
FOO_MANIP_SetFoo(fooObj, "Schinkenstangerl");
std::string fooStr(FOO_MANIP_GetFoo(fooObj));
std::cout << fooStr << std::endl;
return 0;
}