RSB  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InRouteConfigurator.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of the RSB project
4  *
5  * Copyright (C) 2010 by Sebastian Wrede <swrede at techfak dot uni-bielefeld dot de>
6  * 2011 Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
7  *
8  * This file may be licensed under the terms of the
9  * GNU Lesser General Public License Version 3 (the ``LGPL''),
10  * or (at your option) any later version.
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the LGPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the LGPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/lgpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * The development of this software was supported by:
23  * CoR-Lab, Research Institute for Cognition and Robotics
24  * Bielefeld University
25  *
26  * ============================================================ */
27 
28 #pragma once
29 
30 #include <string>
31 #include <set>
32 
33 #include <boost/shared_ptr.hpp>
34 #include <boost/scoped_ptr.hpp>
35 #include <boost/noncopyable.hpp>
36 
37 #include <rsc/runtime/Printable.h>
38 
39 #include "rsb/rsbexports.h"
40 #include "../ParticipantConfig.h"
41 
42 namespace rsb {
43 
44 class QualityOfServiceSpec;
45 
46 class Event;
47 typedef boost::shared_ptr<Event> EventPtr;
48 class Scope;
49 
50 namespace filter {
51 class Filter;
52 typedef boost::shared_ptr<Filter> FilterPtr;
53 }
54 
55 namespace transport {
57 typedef boost::shared_ptr<InConnector> InConnectorPtr;
58 }
59 
60 namespace eventprocessing {
61 
62 class EventReceivingStrategy;
63 typedef boost::shared_ptr<EventReceivingStrategy> EventReceivingStrategyPtr;
64 
73 class RSB_EXPORT InRouteConfigurator: public virtual rsc::runtime::Printable,
74  private boost::noncopyable {
75 public:
76  typedef std::set<transport::InConnectorPtr> ConnectorSet;
77 
78  InRouteConfigurator(const Scope& scope,
79  const ParticipantConfig& config);
80  virtual ~InRouteConfigurator();
81 
82  std::string getClassName() const;
83  void printContents(std::ostream& stream) const;
84 
85  virtual void activate();
86  virtual void deactivate();
87 
88  const ParticipantConfig::EventProcessingStrategy& getReceivingStrategyConfig() const;
89 
90  EventReceivingStrategyPtr getEventReceivingStrategy() const;
91 
92  ConnectorSet getConnectors();
93 
94  void addConnector(transport::InConnectorPtr connector);
95  void removeConnector(transport::InConnectorPtr connector);
96 
97  void filterAdded(filter::FilterPtr filter);
98  void filterRemoved(filter::FilterPtr filter);
99 
107  void setQualityOfServiceSpecs(const QualityOfServiceSpec& specs);
108 private:
109 
110  class Impl;
111  boost::scoped_ptr<Impl> d;
112 
113  virtual EventReceivingStrategyPtr createEventReceivingStrategy() = 0;
114 };
115 
116 typedef boost::shared_ptr<InRouteConfigurator> InRouteConfiguratorPtr;
117 
118 }
119 }
Specification of desired quality of service settings for sending and receiving events.
boost::shared_ptr< InRouteConfigurator > InRouteConfiguratorPtr
A class responsible of configuring the route that processes incoming events from one or more InConnec...
Objects of classes which implement this interface can be used to receive events by means of one trans...
Definition: InConnector.h:50
boost::shared_ptr< Filter > FilterPtr
std::set< transport::InConnectorPtr > ConnectorSet
boost::shared_ptr< EventReceivingStrategy > EventReceivingStrategyPtr
Instances of this class describe the selection and configuration of an event processing strategy...
A class describing the configuration of Participant instances.
boost::shared_ptr< InConnector > InConnectorPtr
boost::shared_ptr< Event > EventPtr
Definition: Event.h:251
Scope is a descriptor for a hierarchical channel of the unified bus.
Definition: Scope.h:46