CARLA
ActorFactory.h
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 #pragma once
8 
9 #include "carla/Memory.h"
12 #include "carla/rpc/Actor.h"
13 
14 namespace carla {
15 namespace client {
16 
17  class Actor;
18 
19 namespace detail {
20 
21  class ActorFactory {
22  public:
23 
24  /// Create an Actor based on the provided @a actor_description. @a episode
25  /// must point to the episode in which the actor is living.
26  ///
27  /// Do not call this class directly, use Simulator::MakeActor.
28  ///
29  /// If @a garbage_collection_policy is GarbageCollectionPolicy::Enabled, the
30  /// shared pointer returned is provided with a custom deleter that calls
31  /// Destroy() on the actor.
33  EpisodeProxy episode,
34  rpc::Actor actor_description,
35  GarbageCollectionPolicy garbage_collection_policy);
36  };
37 
38 } // namespace detail
39 } // namespace client
40 } // namespace carla
static SharedPtr< Actor > MakeActor(EpisodeProxy episode, rpc::Actor actor_description, GarbageCollectionPolicy garbage_collection_policy)
Create an Actor based on the provided actor_description.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
Definition: Memory.h:20
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
carla::SharedPtr< cc::Actor > Actor