| 1 |
#include <memory> |
| 2 |
#include <vector> |
| 3 |
|
| 4 |
|
| 5 |
namespace pyzables { |
| 6 |
|
| 7 |
|
| 8 |
class SomeDummy1 {}; |
| 9 |
class SomeDummy2 {}; |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
class MyBase { |
| 14 |
public: |
| 15 |
virtual ~MyBase(); |
| 16 |
}; |
| 17 |
class MyDerived : public MyBase { |
| 18 |
public: |
| 19 |
virtual ~MyDerived(); |
| 20 |
}; |
| 21 |
|
| 22 |
MyBase* GimeDerived(); |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
class Countable { |
| 27 |
public: |
| 28 |
Countable() { ++sInstances; } |
| 29 |
Countable(const Countable&) { ++sInstances; } |
| 30 |
Countable& operator=(const Countable&) { return *this; } |
| 31 |
~Countable() { --sInstances; } |
| 32 |
|
| 33 |
public: |
| 34 |
virtual const char* say_hi() { return "Hi!"; } |
| 35 |
|
| 36 |
public: |
| 37 |
unsigned int m_check = 0xcdcdcdcd; |
| 38 |
|
| 39 |
public: |
| 40 |
static int sInstances; |
| 41 |
}; |
| 42 |
|
| 43 |
typedef std::shared_ptr<Countable> SharedCountable_t; |
| 44 |
extern SharedCountable_t mine; |
| 45 |
|
| 46 |
void renew_mine(); |
| 47 |
|
| 48 |
SharedCountable_t gime_mine(); |
| 49 |
SharedCountable_t* gime_mine_ptr(); |
| 50 |
SharedCountable_t& gime_mine_ref(); |
| 51 |
|
| 52 |
unsigned int pass_mine_sp(SharedCountable_t p); |
| 53 |
unsigned int pass_mine_sp_ref(SharedCountable_t& p); |
| 54 |
unsigned int pass_mine_sp_ptr(SharedCountable_t* p); |
| 55 |
|
| 56 |
unsigned int pass_mine_rp(Countable); |
| 57 |
unsigned int pass_mine_rp_ref(const Countable&); |
| 58 |
unsigned int pass_mine_rp_ptr(const Countable*); |
| 59 |
|
| 60 |
Countable* gime_naked_countable(); |
| 61 |
|
| 62 |
} |