MADARA  3.1.8
TransportSettings.inl
Go to the documentation of this file.
1 #ifndef _MADARA_TRANSPORT_SETTINGS_INL_
2 #define _MADARA_TRANSPORT_SETTINGS_INL_
3 
11 #include "TransportSettings.h"
12 
13 
14 inline void
16  const std::string domain)
17 {
18  read_domains_[domain] = 1;
19 }
20 
21 inline void
23 {
24  read_domains_.clear ();
25 }
26 
27 inline void
29  std::vector<std::string> & domains) const
30 {
31  domains.clear ();
32  for (std::map <std::string, int>::const_iterator i = read_domains_.begin ();
33  i != read_domains_.end (); ++i)
34  {
35  domains.push_back (i->first);
36  }
37 }
38 
39 inline bool
41  const std::string domain) const
42 {
43  return read_domains_.find (domain) != read_domains_.end ();
44 }
45 
46 
47 inline size_t
49 {
50  return read_domains_.size ();
51 }
52 
53 #endif // _MADARA_TRANSPORT_SETTINGS_INL_
void add_read_domain(const std::string domain)
Adds a read domain to the list of domains to read from.
void clear_read_domains(void)
Clears the list of read domains.
size_t num_read_domains(void) const
Returns the number of read domains.
std::map< std::string, int > read_domains_
Any acceptable read domain is added here.
void get_read_domains(std::vector< std::string > &domains) const
Retrieves the list of read domains.
bool is_reading_domain(const std::string domain) const
Checks if a domain is in the domain read list.
static constexpr struct madara::knowledge::tags::string_t string