Apollo  6.0
Open source self driving car software
Public Member Functions | List of all members
apollo::canbus::VehicleFactory Class Reference

This class is a factory class that will generate different vehicle factories based on the vehicle brand. More...

#include <vehicle_factory.h>

Inheritance diagram for apollo::canbus::VehicleFactory:
Inheritance graph
Collaboration diagram for apollo::canbus::VehicleFactory:
Collaboration graph

Public Member Functions

void RegisterVehicleFactory ()
 register supported vehicle factories. More...
 
std::unique_ptr< AbstractVehicleFactoryCreateVehicle (const VehicleParameter &vehicle_parameter)
 Creates an AbstractVehicleFactory object based on vehicle_parameter. More...
 
- Public Member Functions inherited from apollo::common::util::Factory< apollo::common::VehicleBrand, AbstractVehicleFactory >
bool Register (const apollo::common::VehicleBrand &id, AbstractVehicleFactory *(*)() creator)
 Registers the class given by the creator function, linking it to id. Registration must happen prior to calling CreateObject. More...
 
bool Contains (const apollo::common::VehicleBrand &id)
 
bool Unregister (const apollo::common::VehicleBrand &id)
 Unregisters the class with the given identifier. More...
 
void Clear ()
 
bool Empty () const
 
std::unique_ptr< AbstractVehicleFactory > CreateObjectOrNull (const apollo::common::VehicleBrand &id, Args &&... args)
 Creates and transfers membership of an object of type matching id. Need to register id before CreateObject is called. May return nullptr silently. More...
 
std::unique_ptr< AbstractVehicleFactory > CreateObject (const apollo::common::VehicleBrand &id, Args &&... args)
 Creates and transfers membership of an object of type matching id. Need to register id before CreateObject is called. More...
 

Detailed Description

This class is a factory class that will generate different vehicle factories based on the vehicle brand.

Member Function Documentation

◆ CreateVehicle()

std::unique_ptr<AbstractVehicleFactory> apollo::canbus::VehicleFactory::CreateVehicle ( const VehicleParameter &  vehicle_parameter)

Creates an AbstractVehicleFactory object based on vehicle_parameter.

Parameters
vehicle_parameteris defined in vehicle_parameter.proto

◆ RegisterVehicleFactory()

void apollo::canbus::VehicleFactory::RegisterVehicleFactory ( )

register supported vehicle factories.


The documentation for this class was generated from the following file: