CARLA
LibCarla
source
carla
streaming
detail
StreamStateBase.cpp
Go to the documentation of this file.
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
#include "
carla/streaming/detail/StreamStateBase.h
"
8
9
#include "
carla/BufferPool.h
"
10
11
namespace
carla
{
12
namespace
streaming {
13
namespace
detail {
14
15
StreamStateBase::StreamStateBase
(
const
token_type
&token)
16
: _token(token),
17
_buffer_pool(
std
::make_shared<
BufferPool
>()) {}
18
19
StreamStateBase::~StreamStateBase
() =
default
;
20
21
Buffer
StreamStateBase::MakeBuffer
() {
22
auto
pool =
_buffer_pool
;
23
return
pool->Pop();
24
}
25
26
}
// namespace detail
27
}
// namespace streaming
28
}
// namespace carla
carla::streaming::detail::StreamStateBase::~StreamStateBase
virtual ~StreamStateBase()
BufferPool.h
carla::streaming::detail::StreamStateBase::StreamStateBase
StreamStateBase(const token_type &token)
Definition:
StreamStateBase.cpp:15
std
Definition:
CarlaRecorderCollision.h:30
carla::streaming::detail::StreamStateBase::_buffer_pool
const std::shared_ptr< BufferPool > _buffer_pool
Definition:
StreamStateBase.h:47
carla::streaming::detail::StreamStateBase::MakeBuffer
Buffer MakeBuffer()
Definition:
StreamStateBase.cpp:21
carla
This file contains definitions of common data structures used in traffic manager. ...
Definition:
Carla.cpp:133
carla::streaming::detail::token_type
Serializes a stream endpoint.
Definition:
detail/Token.h:61
StreamStateBase.h
carla::BufferPool
A pool of Buffer.
Definition:
BufferPool.h:30
carla::Buffer
A piece of raw data.
Definition:
carla/Buffer.h:42
Generated by
1.8.13