CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
Memory.h
Go to the documentation of this file.
1
// Copyright (c) 2026 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 <memory>
10
#include <utility>
11
12
namespace
carla
{
13
14
template
<
typename
T>
15
using
SharedPtr
= std::shared_ptr<T>;
16
17
template
<
typename
T>
18
using
WeakPtr
= std::weak_ptr<T>;
19
20
template
<
typename
T>
21
using
EnableSharedFromThis
= std::enable_shared_from_this<T>;
22
23
template
<
typename
T,
typename
... Args>
24
static
inline
auto
MakeShared
(Args &&... args) {
25
return
std::make_shared<T>(std::forward<Args>(args)...);
26
}
27
28
}
// namespace carla
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
carla::WeakPtr
std::weak_ptr< T > WeakPtr
Definition
Memory.h:18
carla::EnableSharedFromThis
std::enable_shared_from_this< T > EnableSharedFromThis
Definition
Memory.h:21
carla::SharedPtr
std::shared_ptr< T > SharedPtr
Definition
Memory.h:15
carla::MakeShared
static auto MakeShared(Args &&... args)
Definition
Memory.h:24
Generated by
1.18.0