VIPRA Documentation
|
Parameter and Polygon qualified JSON input module. More...
#include <json.hpp>
Public Member Functions | |
void | load (std::string const &filepath) override |
Loads the JSON file from the given path. | |
template<typename data_t> | |
auto | get (std::vector< std::string > const &keys) const -> std::optional< data_t > |
Returns the value of the given key from the JSON file. | |
auto | serialize () -> std::string override |
auto | get_pedestrians () const -> std::optional< VIPRA::f3dVec > override |
auto | get_obstacles () const -> std::optional< std::vector< VIPRA::Geometry::Polygon > > override |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist. | |
auto | get_spawns () const -> std::optional< std::vector< VIPRA::Geometry::Polygon > > override |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist. | |
auto | get_objectives () const -> std::optional< std::map< std::string, std::vector< VIPRA::Geometry::Polygon > > > override |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist. | |
auto | get_areas () const -> std::optional< std::map< std::string, VIPRA::Geometry::Polygon > > override |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist. | |
void | parse (std::string const &data) override |
![]() | |
auto | get_param (std::string const &type, std::string const &moduleName, std::string const ¶mName, VIPRA::Random::Engine &engine) const -> std::optional< std::remove_cvref_t< data_t > > |
![]() | |
Serializable (const Serializable &)=default | |
Serializable (Serializable &&)=default | |
auto | operator= (const Serializable &) -> Serializable &=default |
auto | operator= (Serializable &&) -> Serializable &=default |
![]() | |
MapInput (const MapInput &)=default | |
MapInput (MapInput &&)=default | |
auto | operator= (const MapInput &) -> MapInput &=default |
auto | operator= (MapInput &&) -> MapInput &=default |
![]() | |
PedestrianInput (const PedestrianInput &)=default | |
PedestrianInput (PedestrianInput &&)=default | |
auto | operator= (const PedestrianInput &) -> PedestrianInput &=default |
auto | operator= (PedestrianInput &&) -> PedestrianInput &=default |
Static Public Member Functions | |
static constexpr auto | module_name () -> const char * |
Parameter and Polygon qualified JSON input module.
|
nodiscard |
Returns the value of the given key from the JSON file.
data_t | |
key_ts |
keys |
|
nodiscardoverridevirtual |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
data_t | |
key_ts |
key |
Implements VIPRA::Modules::MapInput.
|
nodiscardoverridevirtual |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
data_t | |
key_ts |
key |
Implements VIPRA::Modules::MapInput.
|
nodiscardoverridevirtual |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
data_t | |
key_ts |
key |
Implements VIPRA::Modules::MapInput.
|
nodiscardoverridevirtual |
Implements VIPRA::Modules::PedestrianInput.
|
nodiscardoverridevirtual |
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
data_t | |
key_ts |
key |
Implements VIPRA::Modules::MapInput.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements VIPRA::Modules::Serializable.
|
inlinenodiscardoverridevirtual |
Implements VIPRA::Modules::Serializable.