CSCI 3081 - Drone Delivery System
All Classes Files Functions Variables Friends Pages
Public Member Functions | Static Public Member Functions | List of all members
csci3081::GenerateId Class Reference

GenerateId class generates a static unique identifier to the customer, drone, robot, package, and battery objects. Each time GenerateNewId() is called, the id variable gets incremented. More...

#include <generate_id.h>

Public Member Functions

int ResetId ()
 

Static Public Member Functions

static int GenerateNewId ()
 

Detailed Description

GenerateId class generates a static unique identifier to the customer, drone, robot, package, and battery objects. Each time GenerateNewId() is called, the id variable gets incremented.

Member Function Documentation

◆ GenerateNewId()

int csci3081::GenerateId::GenerateNewId ( )
static

This function statically increments the ID counter to create a unique identifier.

◆ ResetId()

int csci3081::GenerateId::ResetId ( )

Warning: this function SHOULD ONLY BE CALLED during Google Test cases. This function resets the ID counter back to 0.

Returns
Current reset ID.

The documentation for this class was generated from the following files: