ETSI STF525 / Internal Testing test suite This project provides an internal testing test suite and its associated Test Adapter/Codec

location_table.hh
Go to the documentation of this file.
1
11 #pragma once
12
13 #include <map>
14 #include <memory>
15
16 class OCTETSTRING;
17
18 namespace LibItsGeoNetworking__TypesAndValues {
19 class LongPosVector;
20 }
21
28 class location_table {
29 std::map<const unsigned long, std::shared_ptr<LibItsGeoNetworking__TypesAndValues::LongPosVector> > _entries_by_times;
30 std::map<const std::string, std::shared_ptr<LibItsGeoNetworking__TypesAndValues::LongPosVector> > _entries_by_mids;
31
32 public:
33
36 explicit location_table() : _entries_by_times(), _entries_by_mids() { };
40 virtual ~location_table() { }; // std::shared_ptr provides memory free process
41
48 const bool has_entry(const OCTETSTRING& p_mid) const;
54 void add_entry(const LibItsGeoNetworking__TypesAndValues::LongPosVector& p_long_pos_vector);
60 const LibItsGeoNetworking__TypesAndValues::LongPosVector* get_entry(const OCTETSTRING & p_mid) const;
61
68 inline const bool empty() const { return _entries_by_mids.empty(); };
74 inline void reset() { _entries_by_mids.clear(); _entries_by_times.clear(); };
75 }; // End of class location_table
76
location_table::reset
void reset()
Purge the location table.
Definition: location_table.hh:74
location_table::location_table
location_table()
Default constructor.
Definition: location_table.hh:36
LibItsGeoNetworking__TypesAndValues
Definition: geonetworking_layer.hh:32
location_table
This class provides description of GeoNetworking table.
Definition: location_table.hh:28
location_table::empty
const bool empty() const
Indicates if the table is empty.
Definition: location_table.hh:68
location_table::_entries_by_mids
std::map< const std::string, std::shared_ptr< LibItsGeoNetworking__TypesAndValues::LongPosVector > > _entries_by_mids
Definition: location_table.hh:30
location_table::_entries_by_times
std::map< const unsigned long, std::shared_ptr< LibItsGeoNetworking__TypesAndValues::LongPosVector > > _entries_by_times
Definition: location_table.hh:29
location_table::~location_table
virtual ~location_table()
Default destructor.
Definition: location_table.hh:40