Browse Source

Test: PityTest - AbstractPityUnit add copy assign operator

LIB-11
heck 11 months ago
parent
commit
0baa54c330
2 changed files with 15 additions and 2 deletions
  1. +10
    -2
      test/pitytest11/src/AbstractPityUnit.cc
  2. +5
    -0
      test/pitytest11/src/AbstractPityUnit.hh

+ 10
- 2
test/pitytest11/src/AbstractPityUnit.cc View File

@ -51,6 +51,16 @@ namespace pEp {
_init();
}
AbstractPityUnit &AbstractPityUnit::operator=(const AbstractPityUnit &rhs)
{
_procUnitNr = rhs._procUnitNr;
_exec_mode = rhs._exec_mode;
_transport = rhs._transport;
_transport_endpoints = rhs._transport_endpoints;
return *this;
}
void AbstractPityUnit::_init()
{
_log_mutex = std::make_shared<fs_mutex>("log.mutex");
@ -447,7 +457,5 @@ namespace pEp {
Adapter::pEpLog::log(msg, _color());
_log_mutex->release();
}
} // namespace PityTest11
} // namespace pEp

+ 5
- 0
test/pitytest11/src/AbstractPityUnit.hh View File

@ -31,6 +31,8 @@ namespace pEp {
INHERIT
};
// Constructors
// ------------
// RootNode
explicit AbstractPityUnit(
const std::string& name,
@ -45,6 +47,9 @@ namespace pEp {
// Copy
explicit AbstractPityUnit(const AbstractPityUnit& rhs, AbstractPityUnit& self);
// copy-assign
AbstractPityUnit& operator=(const AbstractPityUnit& rhs);
AbstractPityUnit* clone() override = 0;
// Read-Write


Loading…
Cancel
Save