ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
test_controlledconnection.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017-2020 German Aerospace Center (DLR).
3  * Eclipse ADORe, Automated Driving Open Research https://eclipse.org/adore
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License 2.0 which is available at
7  * http://www.eclipse.org/legal/epl-2.0.
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  * Daniel Heß - unit tests for controlledconnection.h
13  *********************************************************************************/
14 #pragma once
16 #include <vector>
17 
18 namespace adore
19 {
20 namespace env
21 {
22 namespace test
23 {
27  class TestConnectionFeed: public adore::mad::AFeed<adore::env::ControlledConnection>
28  {
29  public:
31  std::vector<T> data_;
32  virtual bool hasNext() const override
33  {
34  return data_.size()>0;
35  }
36  virtual void getNext(T& value) override
37  {
38  value = data_.back();
39  data_.pop_back();
40  }
41  virtual void getLatest(T& value) override
42  {
43  //method is not important
44  value = data_.back();
45  data_.pop_back();
46  }
47 
48 
49 
50  };
51 }
52 }
53 }
Definition: controlledconnection.h:81
Definition: test_controlledconnection.h:28
virtual void getNext(T &value) override
Definition: test_controlledconnection.h:36
virtual void getLatest(T &value) override
Definition: test_controlledconnection.h:41
std::vector< T > data_
Definition: test_controlledconnection.h:31
virtual bool hasNext() const override
Definition: test_controlledconnection.h:32
adore::env::ControlledConnection T
Definition: test_controlledconnection.h:30
Definition: com_patterns.h:29
Definition: areaofeffectconverter.h:20