summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/issue-807-opaque-types-methods-being-generated.hpp
blob: de98b32a158e05771ba7e126f93fc88466e04662 (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
// bindgen-flags: --allowlist-type Allowlisted --opaque-type Opaque --with-derive-hash --with-derive-partialeq --with-derive-eq -- -std=c++11

// These types are not explicitly allowlisted, but are reachable through the
// opaque type.
class Pupper {};
class Doggo {};
class SuchWow {};

// These types are not allowlisted, and would be reachable through `Opaque` if
// it were not marked opaque, but since it is, there should be no bindings
// generated for them.
class NoBindingsShouldBeGeneratedForMe1 {};
class NoBindingsShouldBeGeneratedForMe2 {};

// Exercise the different kinds of outgoing edges from an opaque type.
class Opaque
  // Base member edge.
  : public NoBindingsShouldBeGeneratedForMe1 {

protected:
    // Field edge.
    NoBindingsShouldBeGeneratedForMe2 field;

    // Constructor edge.
    Opaque(Pupper pup);

    // Inner static variable edge.
    static Doggo MAJESTIC_AF;

    // Method edge.
    SuchWow eleven_out_of_ten();
};

class Allowlisted {
    Opaque some_member;
};