Skip to content

Commit

Permalink
(drivers) adding specialized types on drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Aug 25, 2024
1 parent 84a7ba4 commit afd0d53
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 17 deletions.
19 changes: 18 additions & 1 deletion include/drivers/optimize_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#define INCLUDE_DRIVERS_OPTIMIZE_DRIVER_H_
#pragma once

#include "c_types/typedefs.h"
#ifdef __cplusplus
#include <cstddef>
#include <cstdint>
using Orders_t = struct Orders_t;
using Vehicle_t = struct Vehicle_t;
using Matrix_cell_t = struct Matrix_cell_t;
using Time_multipliers_t = struct Time_multipliers_t;
using Short_vehicle_rt = struct Short_vehicle_rt;
#else
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
typedef struct Orders_t Orders_t;
typedef struct Vehicle_t Vehicle_t;
typedef struct Matrix_cell_t Matrix_cell_t;
typedef struct Time_multipliers_t Time_multipliers_t;
typedef struct Short_vehicle_rt Short_vehicle_rt;
#endif

#ifdef __cplusplus
extern "C" {
Expand Down
17 changes: 11 additions & 6 deletions include/drivers/pgr_pickDeliverEuclidean_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#define INCLUDE_DRIVERS_PGR_PICKDELIVEREUCLIDEAN_DRIVER_H_
#pragma once

/* for size-t */
#ifdef __cplusplus
# include <cstddef>
#include <cstddef>
#include <cstdint>
using Orders_t = struct Orders_t;
using Vehicle_t = struct Vehicle_t;
using Solution_rt = struct Solution_rt;
#else
# include <stddef.h>
#endif

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
typedef struct Orders_t Orders_t;
typedef struct Solution_rt Solution_rt;
typedef struct Vehicle_t Vehicle_t;
typedef struct Solution_rt Solution_rt;
#endif


#ifdef __cplusplus
extern "C" {
Expand Down
20 changes: 12 additions & 8 deletions include/drivers/pgr_pickDeliver_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#define INCLUDE_DRIVERS_PGR_PICKDELIVER_DRIVER_H_
#pragma once

/* for size-t */
#ifdef __cplusplus
# include <cstddef>
#include <cstddef>
#include <cstdint>
using Orders_t = struct Orders_t;
using Vehicle_t = struct Vehicle_t;
using Matrix_cell_t = struct Matrix_cell_t;
using Solution_rt = struct Solution_rt;
#else
# include <stddef.h>
#endif

#include "cpp_common/vehicle_t.hpp"
#include "cpp_common/matrix_cell_t.hpp"

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
typedef struct Orders_t Orders_t;
typedef struct Vehicle_t Vehicle_t;
typedef struct Matrix_cell_t Matrix_cell_t;
typedef struct Solution_rt Solution_rt;
#endif

#ifdef __cplusplus
extern "C" {
Expand Down
19 changes: 18 additions & 1 deletion include/drivers/pickDeliver_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#define INCLUDE_DRIVERS_PICKDELIVER_DRIVER_H_
#pragma once

#include "c_types/typedefs.h"
#ifdef __cplusplus
#include <cstddef>
#include <cstdint>
using Orders_t = struct Orders_t;
using Vehicle_t = struct Vehicle_t;
using Matrix_cell_t = struct Matrix_cell_t;
using Time_multipliers_t = struct Time_multipliers_t;
using Solution_rt = struct Solution_rt;
#else
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
typedef struct Orders_t Orders_t;
typedef struct Vehicle_t Vehicle_t;
typedef struct Matrix_cell_t Matrix_cell_t;
typedef struct Time_multipliers_t Time_multipliers_t;
typedef struct Solution_rt Solution_rt;
#endif

#ifdef __cplusplus
extern "C" {
Expand Down
23 changes: 22 additions & 1 deletion include/drivers/vroom_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#define INCLUDE_DRIVERS_VROOM_DRIVER_H_
#pragma once

#include "c_types/typedefs.h"
#ifdef __cplusplus
#include <cstddef>
#include <cstdint>
using Vroom_job_t = struct Vroom_job_t;
using Vroom_time_window_t = struct Vroom_time_window_t;
using Vroom_shipment_t = struct Vroom_shipment_t;
using Vroom_vehicle_t = struct Vroom_vehicle_t;
using Vroom_break_t = struct Vroom_break_t;
using Vroom_matrix_t = struct Vroom_matrix_t;
using Vroom_rt = struct Vroom_rt;
#else
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
typedef struct Vroom_job_t Vroom_job_t;
typedef struct Vroom_time_window_t Vroom_time_window_t;
typedef struct Vroom_shipment_t Vroom_shipment_t;
typedef struct Vroom_vehicle_t Vroom_vehicle_t;
typedef struct Vroom_break_t Vroom_break_t;
typedef struct Vroom_matrix_t Vroom_matrix_t;
typedef struct Vroom_rt Vroom_rt;
#endif

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit afd0d53

Please sign in to comment.