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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#include <memory>
#include <vector>
namespace pyzables {
//===========================================================================
class SomeDummy1 {};
class SomeDummy2 {};
//===========================================================================
class MyBase {
public:
virtual ~MyBase();
};
class MyDerived : public MyBase {
public:
virtual ~MyDerived();
};
MyBase* GimeDerived();
//===========================================================================
class Countable {
public:
Countable() { ++sInstances; }
Countable(const Countable&) { ++sInstances; }
Countable& operator=(const Countable&) { return *this; }
~Countable() { --sInstances; }
public:
virtual const char* say_hi() { return "Hi!"; }
public:
unsigned int m_check = 0xcdcdcdcd;
public:
static int sInstances;
};
typedef std::shared_ptr<Countable> SharedCountable_t;
extern SharedCountable_t mine;
void renew_mine();
SharedCountable_t gime_mine();
SharedCountable_t* gime_mine_ptr();
SharedCountable_t& gime_mine_ref();
unsigned int pass_mine_sp(SharedCountable_t p);
unsigned int pass_mine_sp_ref(SharedCountable_t& p);
unsigned int pass_mine_sp_ptr(SharedCountable_t* p);
unsigned int pass_mine_rp(Countable);
unsigned int pass_mine_rp_ref(const Countable&);
unsigned int pass_mine_rp_ptr(const Countable*);
Countable* gime_naked_countable();
} // namespace pyzables
|