network-simulator/netsim/include/Network.hpp
2023-07-02 18:32:14 +02:00

25 lines
445 B
C++

#pragma once
#include <vector>
#include <memory>
#include <string>
#include "Device.hpp"
class Network {
public:
friend std::ostream& operator<<(std::ostream& os, const Network& network);
public:
Network(const std::string& name);
void AddDevice(std::shared_ptr<Device> device);
void SendCycle();
void ReceiveCycle();
void Cycle();
private:
std::vector<std::shared_ptr<Device>> devices;
std::string name;
};