source: finroc_core/port/tUriConnectOptions.h @ 427:0a7e413412e9

17.03
Last change on this file since 427:0a7e413412e9 was 427:0a7e413412e9, checked in by Max Reichardt <mreichardt@…>, 3 years ago

Unifies and optimizes serialization of tConnectOptions and tUriConnectOptions (for uniform handling on Java side). Makes sure that auto-set flags erroneously set by user are ignored.

File size: 3.3 KB
Line 
1//
2// You received this file as part of Finroc
3// A framework for intelligent robot control
4//
5// Copyright (C) Finroc GbR (finroc.org)
6//
7// This program is free software; you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation; either version 2 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License along
18// with this program; if not, write to the Free Software Foundation, Inc.,
19// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20//
21//----------------------------------------------------------------------
22/*!\file    core/port/tUriConnectOptions.h
23 *
24 * \author  Max Reichardt
25 *
26 * \date    2017-01-28
27 *
28 * \brief   Contains tUriConnectOptions
29 *
30 * \b tUriConnectOptions
31 *
32 * Connect options for URI connectors.
33 * They allow to specify additional parameters as key/value pairs.
34 * These parameter are scheme-specific - and could be e.g. QoS parameters.
35 *
36 */
37//----------------------------------------------------------------------
38#ifndef __core__port__tUriConnectOptions_h__
39#define __core__port__tUriConnectOptions_h__
40
41//----------------------------------------------------------------------
42// External includes (system with <>, local with "")
43//----------------------------------------------------------------------
44
45//----------------------------------------------------------------------
46// Internal includes with ""
47//----------------------------------------------------------------------
48#include "core/port/tConnectOptions.h"
49
50//----------------------------------------------------------------------
51// Namespace declaration
52//----------------------------------------------------------------------
53namespace finroc
54{
55namespace core
56{
57
58//----------------------------------------------------------------------
59// Forward declarations / typedefs / enums
60//----------------------------------------------------------------------
61
62//----------------------------------------------------------------------
63// Class declaration
64//----------------------------------------------------------------------
65//! Connect options for URI connectors
66/*!
67 * Connect options for URI connectors.
68 * They allow to specify additional parameters as key/value pairs.
69 * These parameter are scheme-specific - and could be e.g. QoS parameters.
70 */
71struct tUriConnectOptions : public tConnectOptions
72{
73  using tConnectOptions::tConnectOptions;
74
75  /*! Additional parameters as key/value pairs */
76  std::map<std::string, std::string> parameters;
77
78};
79
80// implemented in tConnectOptions.cpp (for locality of change - serialization of both classes is compatible)
81rrlib::serialization::tOutputStream& operator << (rrlib::serialization::tOutputStream& stream, const tUriConnectOptions& options);
82rrlib::serialization::tInputStream& operator >> (rrlib::serialization::tInputStream& stream, tUriConnectOptions& options);
83
84//----------------------------------------------------------------------
85// End of namespace declaration
86//----------------------------------------------------------------------
87}
88}
89
90
91#endif
Note: See TracBrowser for help on using the repository browser.