TraveSim Adapters  0.1
Protobuf adapters for TraveSim project
teams_configurer.hpp
Go to the documentation of this file.
1 /**
2  * @file teams_configurer.hpp
3  *
4  * @author Lucas Haug <lucas.haug@thuneratz.org>
5  *
6  * @brief Configurer for the teams
7  *
8  * @date 06/2021
9  *
10  * @copyright MIT License - Copyright (c) 2021 ThundeRatz
11  *
12  */
13 
14 #include <iostream>
15 
16 #include <travesim_adapters/TeamsConfig.h>
17 
19 
20 #ifndef __TEAMS_CONFIGURER_H__
21 #define __TEAMS_CONFIGURER_H__
22 
23 namespace travesim {
24 /**
25  * @brief TeamsConfigurer class definition
26  */
27 
29  public AdapterConfigurer<travesim_adapters::TeamsConfig> {
30  public:
31  /**
32  * @brief Team color enumeration type
33  */
34  enum TeamColor {
37  };
38 
39  /**
40  * @brief Construct a new TeamsConfigurer object
41  */
42  TeamsConfigurer(void);
43 
44  /**
45  * @brief Get the configured address of a team
46  *
47  * @param color Color of the team to get the address
48  *
49  * @return std::string address string
50  */
51  std::string get_address(TeamColor color);
52 
53  /**
54  * @brief Get the configured port of a team
55  *
56  * @param color Color of the team to get the port
57  *
58  * @return uint16_t port number
59  */
60  uint16_t get_port(TeamColor color);
61 
62  /**
63  * @brief Get the specific_source config
64  *
65  * @return true if specific source is enabled, false otherwise
66  */
67  bool get_specific_source(void);
68 
69  /**
70  * @brief Output stream operator overloading
71  */
72  friend std::ostream& operator <<(std::ostream& output, const TeamsConfigurer& teams_conf);
73 };
74 } // namespace travesim
75 
76 #endif // __TEAMS_CONFIGURER_H__
bool get_specific_source(void)
Get the specific_source config.
TeamsConfigurer(void)
Construct a new TeamsConfigurer object.
uint16_t get_port(TeamColor color)
Get the configured port of a team.
TeamsConfigurer class definition.
TeamColor
Team color enumeration type.
friend std::ostream & operator<<(std::ostream &output, const TeamsConfigurer &teams_conf)
Output stream operator overloading.
Template configurer for an adapter.
std::string get_address(TeamColor color)
Get the configured address of a team.