CARLA
 
载入中...
搜索中...
未找到
StreamStateBase.h
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9#include "carla/NonCopyable.h"
12
13#include <memory>
14
15namespace carla {
16
17 class BufferPool;
18
19namespace streaming {
20namespace detail {
21
22 /// Shared state among all the copies of a stream. Provides access to the
23 /// underlying server session(s) if active.
24 class StreamStateBase : private NonCopyable {
25 public:
26
27 explicit StreamStateBase(const token_type &token);
28
30
31 const token_type &token() const {
32 return _token;
33 }
34
36
37 virtual void ConnectSession(std::shared_ptr<Session> session) = 0;
38
39 virtual void DisconnectSession(std::shared_ptr<Session> session) = 0;
40
41 virtual void ClearSessions() = 0;
42
43 private:
44
46
47 const std::shared_ptr<BufferPool> _buffer_pool;
48 };
49
50} // namespace detail
51} // namespace streaming
52} // namespace carla
A piece of raw data.
Inherit (privately) to suppress copy/move construction and assignment.
Shared state among all the copies of a stream.
virtual void DisconnectSession(std::shared_ptr< Session > session)=0
virtual void ConnectSession(std::shared_ptr< Session > session)=0
const std::shared_ptr< BufferPool > _buffer_pool
Serializes a stream endpoint.
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133