aboutsummaryrefslogtreecommitdiff
path: root/src/brussel.codegen.comp/test/examples/TestClass.hpp.txt
blob: 3eed8db9d40e6fb0e162bc34f7d7ddeaa092c476 (plain)
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
38
#include <TestClass.gph.inl>

class MyClass {
    BRUSSEL_CLASS()

public:
    BRUSSEL_PROPERTY(GETTER GetName, SETTER SetName)
    std::string name;

    BRUSSEL_PROPERTY(GETTER auto, SETTER auto)
    std::string tag;

    BRUSSEL_PROPERTY()
    int foo;

    BRUSSEL_PROPERTY()
    int bar;

public:
    const std::string& GetName() const { return name; }
    void SetName(std::string name) { this->name = std::move(name); }
};

namespace MyNamespace {
struct Base {
    BRUSSEL_CLASS(InheritanceHiearchy)
};

struct DerviedFoo : public Base {
    BRUSSEL_CLASS()
};

struct DerviedBar : Base {
    BRUSSEL_CLASS()
};
}

#include <TestClass.gh.inl>