Skip to content

File GroundArchitecture.hpp

File List > astrea > trace > trace > platforms > ground > GroundArchitecture.hpp

Go to the documentation of this file

#pragma once

#include <vector>

#include <trace/platforms/ground/GroundStation.hpp>

namespace astrea {
namespace trace {

class GroundArchitecture {
  public:
    GroundArchitecture(const std::vector<GroundStation>& groundStations) :
        _groundStations(groundStations)
    {
    }

    ~GroundArchitecture() = default;

    GroundStation& operator[](const std::size_t& idx) { return _groundStations[idx]; }

    const GroundStation& operator[](const std::size_t& idx) const { return _groundStations[idx]; }

    std::size_t size() const { return _groundStations.size(); }

    using iterator = std::vector<GroundStation>::iterator;

    using const_iterator = std::vector<GroundStation>::const_iterator;

    iterator begin() { return _groundStations.begin(); }

    iterator end() { return _groundStations.end(); }

    const_iterator begin() const { return _groundStations.begin(); }

    const_iterator end() const { return _groundStations.end(); }

    const_iterator cbegin() const { return _groundStations.begin(); }

    const_iterator cend() const { return _groundStations.end(); }

  private:
    std::vector<GroundStation> _groundStations; 
};

} // namespace trace
} // namespace astrea