CSCE412_Project3_LoadBalancer
Loading...
Searching...
No Matches
RequestQueue Class Reference

A class representing a queue of requests. More...

#include <RequestQueue.h>

Public Member Functions

void addRequest (Request request)
 Adds a request to the queue.
 
bool isEmpty ()
 Checks if the queue is empty.
 
Request getNextRequest ()
 Gets the next request from the queue.
 
void printRequestQueue ()
 Prints the request queue.
 

Public Attributes

queue< Request > requests
 

Detailed Description

A class representing a queue of requests.

The RequestQueue class provides functionality to add requests, check if the queue is empty, get the next request, and print the request queue.

Member Function Documentation

◆ addRequest()

void RequestQueue::addRequest ( Request request)

Adds a request to the queue.

Adds a request to the request queue.

Parameters
requestThe request to be added.

◆ getNextRequest()

Request RequestQueue::getNextRequest ( )

Gets the next request from the queue.

Retrieves the next request from the request queue.

Returns
The next request in the queue.

◆ isEmpty()

bool RequestQueue::isEmpty ( )

Checks if the queue is empty.

Checks if the request queue is empty.

Returns
True if the queue is empty, false otherwise.
True if the request queue is empty, false otherwise.

◆ printRequestQueue()

void RequestQueue::printRequestQueue ( )

Prints the request queue.

Prints all the requests in the request queue.

This function prints the contents of the request queue to the standard output.

Member Data Documentation

◆ requests

queue<Request> RequestQueue::requests

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