lokinet/llarp/simulation/sim_context.cpp
dr7ana 46ad8d4058 Clang format include sorting + CMake
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use
- shuffled around some cmake linking to simplify dependency graph
- superfluous files removed
2023-10-24 12:11:51 -07:00

34 lines
665 B
C++

#include "sim_context.hpp"
#include <llarp.hpp>
namespace llarp
{
namespace simulate
{
Simulation::Simulation() : m_CryptoManager(new sodium::CryptoLibSodium())
{}
void
Simulation::NodeUp(llarp::Context*)
{}
Node_ptr
Simulation::AddNode(const std::string& name)
{
auto itr = m_Nodes.find(name);
if (itr == m_Nodes.end())
{
itr = m_Nodes.emplace(name, std::make_shared<llarp::Context>(shared_from_this())).first;
}
return itr->second;
}
void
Simulation::DelNode(const std::string& name)
{
m_Nodes.erase(name);
}
} // namespace simulate
} // namespace llarp