Browse Source

Test: PityTest - AbstractPityUnit add setExecMode()

master
heck 4 years ago
parent
commit
f8a579fd99
  1. 8
      src/AbstractPityUnit.cc
  2. 4
      src/AbstractPityUnit.hh

8
src/AbstractPityUnit.cc

@ -42,8 +42,8 @@ namespace pEp {
{ {
_procUnitNr = rhs._procUnitNr; _procUnitNr = rhs._procUnitNr;
_exec_mode = rhs._exec_mode; _exec_mode = rhs._exec_mode;
_transport = rhs._transport; _transport = rhs._transport; // Will re-initialized in run()
_transport_endpoints = rhs._transport_endpoints; _transport_endpoints = rhs._transport_endpoints; // Will re-initialized in run()
_init(); _init();
} }
@ -75,6 +75,10 @@ namespace pEp {
return AbstractPityUnit::_global_root_dir; return AbstractPityUnit::_global_root_dir;
} }
void AbstractPityUnit::setExecMode(AbstractPityUnit::ExecutionMode execMode)
{
_exec_mode = execMode;
}
// For: // For:
// RootUnit - "<name>" // RootUnit - "<name>"

4
src/AbstractPityUnit.hh

@ -53,6 +53,7 @@ namespace pEp {
// Read-Write // Read-Write
static void setGlobalRootDir(const std::string& dir); static void setGlobalRootDir(const std::string& dir);
static std::string getGlobalRootDir(); static std::string getGlobalRootDir();
void setExecMode(ExecutionMode execMode);
// Read-Only // Read-Only
std::string getPathShort() const; std::string getPathShort() const;
@ -113,9 +114,10 @@ namespace pEp {
// Fields // Fields
// ------ // ------
static std::string _global_root_dir; static std::string _global_root_dir;
int _procUnitNr;
ExecutionMode _exec_mode; ExecutionMode _exec_mode;
int _procUnitNr;
static int _procUnitsCount; // will be increased in every constructor static int _procUnitsCount; // will be increased in every constructor
// transport // transport
std::shared_ptr<PityTransport> _transport; //only ever read via transport() std::shared_ptr<PityTransport> _transport; //only ever read via transport()
// TODO move endpoints into PityTransport // TODO move endpoints into PityTransport

Loading…
Cancel
Save