|
@ -47,10 +47,12 @@ namespace pEp { |
|
|
// copy-assign
|
|
|
// copy-assign
|
|
|
PityUnit<TestContext>& operator=(const PityUnit<TestContext>& rhs); |
|
|
PityUnit<TestContext>& operator=(const PityUnit<TestContext>& rhs); |
|
|
|
|
|
|
|
|
|
|
|
PityUnit<TestContext>& getSelf() override; |
|
|
// clone
|
|
|
// clone
|
|
|
PityUnit<TestContext>* clone() override; |
|
|
PityUnit<TestContext>* clone() override; |
|
|
|
|
|
|
|
|
// Read-Only
|
|
|
void setContext(TestContext* ctx); |
|
|
|
|
|
void setContext(TestContext ctx); |
|
|
TestContext* getContext() const; |
|
|
TestContext* getContext() const; |
|
|
|
|
|
|
|
|
protected: |
|
|
protected: |
|
@ -60,7 +62,8 @@ namespace pEp { |
|
|
void _copyContext(const PityUnit<TestContext>& rhs); |
|
|
void _copyContext(const PityUnit<TestContext>& rhs); |
|
|
|
|
|
|
|
|
// Fields
|
|
|
// Fields
|
|
|
TestContext* _ctx; // nullptr if inherited
|
|
|
// nullptr if inherited
|
|
|
|
|
|
TestContext* _ctx; |
|
|
std::shared_ptr<TestContext> _owned_ctx; // if you copy
|
|
|
std::shared_ptr<TestContext> _owned_ctx; // if you copy
|
|
|
TestFunction _test_func; |
|
|
TestFunction _test_func; |
|
|
}; |
|
|
}; |
|
|