osurs  0.0.1
Functions
io.h File Reference

Input and output of networks and its structures. More...

#include "osurs/reserve.h"
Include dependency graph for io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int import_network (Network *network, const char *filename)
 Import a network to xml. More...
 
int import_reservations (Network *network, const char *filename)
 Import reservations from xml. More...
 
int export_network (Network *network, const char *filename)
 Export a network to xml. More...
 
int export_reservations (Network *network, const char *filename)
 Export reservations of a network to xml. More...
 
int import_matsim (Network *network, const char *schedule_file, const char *vehicle_file)
 
void print_node (Node *node, int indent)
 Print node. More...
 
void print_composition (Composition *composition, int indent)
 Print composition. More...
 
void print_vehicle (Vehicle *vehicle, int indent)
 Print vehicle. More...
 
void print_stop (Stop *stop, int indent)
 Print stop. More...
 
void print_trip (Trip *trip, int indent)
 Print trip. More...
 
void print_route (Route *route, int indent)
 Print route. More...
 
void print_network (Network *network)
 Print network. More...
 
void print_connection (Connection *connection)
 Print connection. More...
 
void print_reservation (Reservation *reservation, int indent)
 Print reservation. More...
 
void print_seat (Seat *seat, int indent)
 Print seat. More...
 
void print_seat_collection (SeatCollection *collection, int indent)
 Print seat collection. More...
 

Detailed Description

Input and output of networks and its structures.

Printing osurs structures, importing and exporting networks, vehicles and reservations.

Date
: 2022-07-12
Author
: Merlin Unterfinger

Function Documentation

◆ export_network()

int export_network ( Network network,
const char *  filename 
)

Export a network to xml.

Parameters
networkThe network to export.
filenameThe file to create.
Returns
1 if success, 0 if failure.

◆ export_reservations()

int export_reservations ( Network network,
const char *  filename 
)

Export reservations of a network to xml.

Parameters
networkThe network to export the reservations.
filenameThe file to create.
Returns
1 if success, 0 if failure.

◆ import_matsim()

int import_matsim ( Network network,
const char *  schedule_file,
const char *  vehicle_file 
)
Parameters
network
schedule_file
vehicle_file
Returns
int

◆ import_network()

int import_network ( Network network,
const char *  filename 
)

Import a network to xml.

Parameters
networkThe empty network to import the content to.
filenameThe file to import.
Returns
1 if success, 0 if failure.

◆ import_reservations()

int import_reservations ( Network network,
const char *  filename 
)

Import reservations from xml.

Parameters
networkThe network to import the reservations content to.
filenameThe file to import.
Returns
1 if success, 0 if failure.

◆ print_composition()

void print_composition ( Composition composition,
int  indent 
)

Print composition.

Parameters
compositionThe composition struct to print.
indentThe indent for printing.

◆ print_connection()

void print_connection ( Connection connection)

Print connection.

Parameters
connectionThe connection struct to print.

◆ print_network()

void print_network ( Network network)

Print network.

Parameters
networkThe network struct to print.

◆ print_node()

void print_node ( Node node,
int  indent 
)

Print node.

Parameters
nodeThe node struct to print.
indentThe indent for printing.

◆ print_reservation()

void print_reservation ( Reservation reservation,
int  indent 
)

Print reservation.

Parameters
reservationThe reservation struct to print.
indentThe indent for printing.

◆ print_route()

void print_route ( Route route,
int  indent 
)

Print route.

Parameters
routeThe route struct to print.
indentThe indent for printing.

◆ print_seat()

void print_seat ( Seat seat,
int  indent 
)

Print seat.

Parameters
seatThe seat struct to print.
indentThe indent for printing.

◆ print_seat_collection()

void print_seat_collection ( SeatCollection collection,
int  indent 
)

Print seat collection.

Parameters
collectionThe seat collection struct to print.
indentThe indent for printing.

◆ print_stop()

void print_stop ( Stop stop,
int  indent 
)

Print stop.

Parameters
stopThe stop struct to print.
indentThe indent for printing.

◆ print_trip()

void print_trip ( Trip trip,
int  indent 
)

Print trip.

Parameters
tripThe trip struct to print.
indentThe indent for printing.

◆ print_vehicle()

void print_vehicle ( Vehicle vehicle,
int  indent 
)

Print vehicle.

Parameters
vehicleThe vehicle struct to print.
indentThe indent for printing.