Fahrzeuge 3: list
main.cpp File Reference
#include "fahrzeug.h"
#include <algorithm>
#include <iostream>
#include <list>
#include <numeric>
#include <typeinfo>
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

void PrintInfo (const Fahrzeug &p)
 Prints some info from a vehicle. More...
 
ostream & operator<< (ostream &s, const Fahrzeug &p)
 Prints some info from a vehicle. More...
 
bool fuel_consumption (const Fahrzeug *a, const Fahrzeug *b)
 Compares the fuel consumption between two vehicles. More...
 
float add_fuel (float x, const Fahrzeug *y)
 Adds the fuel consumption of a vehicle y to quantity x. More...
 
int main ()
 

Function Documentation

◆ add_fuel()

float add_fuel ( float  x,
const Fahrzeug y 
)

Adds the fuel consumption of a vehicle y to quantity x.

Parameters
[in]xgiven quantity
[in]ybase class pointer to vehicle
Returns
x+y.fuel

Definition at line 69 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fuel_consumption()

bool fuel_consumption ( const Fahrzeug a,
const Fahrzeug b 
)

Compares the fuel consumption between two vehicles.

Parameters
[in]abase class pointer to first vehicle
[in]bbase class pointer to second vehicle
Returns
true if a needs less fuel than b

Definition at line 55 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( )

Definition at line 74 of file main.cpp.

Here is the call graph for this function:

◆ operator<<()

ostream & operator<< ( ostream &  s,
const Fahrzeug p 
)

Prints some info from a vehicle.

Parameters
[in,out]soutput stream
[in]pa general vehicle
Returns
changed output stream

Definition at line 166 of file main.cpp.

Here is the call graph for this function:

◆ PrintInfo()

void PrintInfo ( const Fahrzeug p)

Prints some info from a vehicle.

Parameters
[in]pa general vehicle

Definition at line 154 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: