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 
19  class LongPosVector;
20 }
21 
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 
void reset()
Purge the location table.
Definition: location_table.hh:74
location_table()
Default constructor.
Definition: location_table.hh:36
Definition: geonetworking_layer.hh:32
This class provides description of GeoNetworking table.
Definition: location_table.hh:28
const bool empty() const
Indicates if the table is empty.
Definition: location_table.hh:68
std::map< const std::string, std::shared_ptr< LibItsGeoNetworking__TypesAndValues::LongPosVector > > _entries_by_mids
Definition: location_table.hh:30
std::map< const unsigned long, std::shared_ptr< LibItsGeoNetworking__TypesAndValues::LongPosVector > > _entries_by_times
Definition: location_table.hh:29
virtual ~location_table()
Default destructor.
Definition: location_table.hh:40