
2 changed files with 45 additions and 14 deletions
@ -1,16 +1,35 @@ |
|||
#include "PityModel.hh" |
|||
//#include "PityUnit.hh"
|
|||
#include "iostream" |
|||
|
|||
using namespace std; |
|||
namespace pEp { |
|||
namespace PityTest11 { |
|||
bool PityModel::log_enabled = true; |
|||
bool PityModel::debug_log_enabled = true; |
|||
|
|||
PityModel::PityModel(const string& name) : name(name) {} |
|||
PityModel::PityModel(const std::string& name, int nodesCount) : |
|||
_name{ name }, _nodes_count{ nodesCount }, _root_unit{ nullptr, name, nullptr, this } |
|||
{ |
|||
|
|||
for (int i = 0; i < nodesCount; i++) { |
|||
_nodes.emplace_back(PityNode(*this, i)); |
|||
// _nodes.emplace_back(*this, i);
|
|||
} |
|||
} |
|||
|
|||
std::string PityModel::getName() const |
|||
{ |
|||
return _name; |
|||
} |
|||
|
|||
const std::string& PityModel::getName() const |
|||
std::vector<PityNode> PityModel::getNodes() const |
|||
{ |
|||
return name; |
|||
return _nodes; |
|||
} |
|||
} // namespace Test
|
|||
|
|||
PityUnit<PityModel>& PityModel::rootUnit() |
|||
{ |
|||
return _root_unit; |
|||
} |
|||
|
|||
} // namespace PityTest11
|
|||
} // namespace pEp
|
|||
|
Loading…
Reference in new issue