Class CarParkingSpace
The
CarParkingSpace is located somewhere and can hold IParkingCars up to its capacity
extent.
Inheritance
System.Object
CarParkingSpace
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SOHCarModel.Parking
Assembly: SOHCarModel.dll
Syntax
public class CarParkingSpace : IVectorFeature, IModalChoiceConsumer
Properties
| Improve this Doc View SourceCapacity
Describes the total capacity ignoring the current occupancy.
Declaration
public int Capacity { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
HasCapacity
Determines if any free parking spaces are currently available.
Declaration
public bool HasCapacity { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Occupied
Defines if the whole car parking space is occupied for any reason (ignoring the currently parked cars).
These can still leave, but new ones can not enter.
Declaration
public bool Occupied { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ParkingVehicles
Provides all currently parked cars.
Declaration
public ConcurrentDictionary<IParkingCar, byte> ParkingVehicles { get; }
Property Value
| Type | Description |
|---|---|
| Mars.Common.Core.Collections.NonBlockingDictionary.ConcurrentDictionary<IParkingCar, System.Byte> |
Position
The centroid of this parking space.
Declaration
public Position Position { get; }
Property Value
| Type | Description |
|---|---|
| Position |
VectorStructured
Gets or sets the concrete feature data.
Declaration
public VectorStructuredData VectorStructured { get; set; }
Property Value
| Type | Description |
|---|---|
| VectorStructuredData |
Methods
| Improve this Doc View SourceCanConsume()
The
CarParkingSpace is located somewhere and can hold IParkingCars up to its capacity
extent.
Declaration
public bool CanConsume()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Enter(IParkingCar)
Enter the parking spot with a car and "consume" its required space.
Declaration
public bool Enter(IParkingCar car)
Parameters
| Type | Name | Description |
|---|---|---|
| IParkingCar | car | The car that is parked in this spot. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if a parking spot could be found, false otherwise (Beware: the car is not parked here). |
Init(ILayer, VectorStructuredData)
The
CarParkingSpace is located somewhere and can hold IParkingCars up to its capacity
extent.
Declaration
public void Init(ILayer layer, VectorStructuredData data)
Parameters
| Type | Name | Description |
|---|---|---|
| ILayer | layer | |
| VectorStructuredData | data |
Leave(IParkingCar)
Leave the parking spot with given car.
Declaration
public bool Leave(IParkingCar car)
Parameters
| Type | Name | Description |
|---|---|---|
| IParkingCar | car | The car that leaves this spot. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if car is not on this parking space any more. |
Update(VectorStructuredData)
Initializes the
ParkingSpace with the feature information.
Declaration
public void Update(VectorStructuredData data)
Parameters
| Type | Name | Description |
|---|---|---|
| VectorStructuredData | data |