Add documentation headers across system modules

This commit is contained in:
Jissin Mathew
2026-05-22 12:49:14 +05:30
parent 340f00deef
commit 500eb95f12
44 changed files with 1879 additions and 4 deletions
@@ -1,8 +1,27 @@
/*
File: AdminMenu.cpp
Description: Implements the AdminMenu class which provides the administrators console interface
in the Vehicle Service Management System. Handles menu display, user input, and
admin-specific operations such as inventory management, technician management,
service creation, combo package management, job assignment, and notifications.
Author: Trenser
Date: 19-May-2026
*/
#include "AdminMenu.h"
#include "InputHelper.h"
#include "OutputHelper.h"
#include "MenuHelper.h"
/*
Function: showMenu
Description: Displays the admin menu in a loop until the user chooses to logout.
Handles exceptions and ensures smooth user interaction.
Parameters:
- None
Returns:
- void
*/
void AdminMenu::showMenu()
{
bool isMenuActive = true;
@@ -85,6 +104,14 @@ void AdminMenu::removeComboPackage()
{
}
/*
Function: viewNotifications
Description: Displays notifications for the admin and allows deletion of notifications.
Parameters:
- None
Returns:
- void
*/
void AdminMenu::viewNotifications()
{
viewAndDeleteNotification(m_controller);
@@ -1,3 +1,12 @@
/*
File: AdminMenu.h
Description: Declares the AdminMenu class which provides the administrative console menu in the Vehicle Service Management System.
Supports operations such as inventory management, job assignment, service creation/removal, technician management,
combo package handling, notification viewing, and account management functions like logout and password change.
Author: Trenser
Date: 19-May-2026
*/
#pragma once
#include "Controller.h"
@@ -1,8 +1,27 @@
/*
File: CustomerMenu.cpp
Description: Implements the CustomerMenu class which provides the customers console interface
in the Vehicle Service Management System. Handles menu display, user input, and
customer-specific operations such as booking services, viewing history, managing payments,
invoices, and notifications.
Author: Trenser
Date: 19-May-2026
*/
#include "CustomerMenu.h"
#include "InputHelper.h"
#include "OutputHelper.h"
#include "MenuHelper.h"
/*
Function: showMenu
Description: Displays the customer menu in a loop until the user chooses to logout.
Handles exceptions and ensures smooth user interaction.
Parameters:
- None
Returns:
- void
*/
void CustomerMenu::showMenu()
{
bool isMenuActive = true;
@@ -64,11 +83,27 @@ void CustomerMenu::viewInvoices()
{
}
/*
Function: viewNotifications
Description: Displays notifications for the customer and allows deletion of notifications.
Parameters:
- None
Returns:
- void
*/
void CustomerMenu::viewNotifications()
{
viewAndDeleteNotification(m_controller);
}
/*
Function: getNotificationPreference (static helper)
Description: Helper function to configure notification preferences for a specific service.
Parameters:
- serviceName: Name of the service for which notifications are being configured.
Returns:
- bool: True if notifications are enabled, False if disabled.
*/
static bool getNotificationPreference(const std::string& serviceName)
{
int choice;
@@ -94,6 +129,14 @@ static bool getNotificationPreference(const std::string& serviceName)
}
}
/*
Function: configureNotifications
Description: Allows the customer to configure notification preferences for payment and service management.
Parameters:
- None
Returns:
- void
*/
void CustomerMenu::configureNotifications()
{
bool paymentServiceNotifications = getNotificationPreference("Payment Management Service");
@@ -1,3 +1,12 @@
/*
File: CustomerMenu.h
Description: Declares the CustomerMenu class which provides the customer-facing console menu in the Vehicle Service Management System.
Supports operations such as account management, service selection, combo package booking, viewing service history,
handling payments and invoices, and managing notifications.
Author: Trenser
Date: 19-May-2026
*/
#pragma once
#include "Controller.h"
@@ -1,3 +1,12 @@
/*
File: MenuHelper.h
Description: Provides inline utility functions to support menu operations in the Vehicle Service Management System.
Includes helper functions for selecting, displaying, and managing notifications, as well as
integrating with the controller for user interactions.
Author: Trenser
Date: 21-May-2026
*/
#pragma once
#include <iomanip>
#include "Vector.h"
@@ -6,6 +15,16 @@
#include "InputHelper.h"
#include "OutputHelper.h"
/*
Function: selectNotification
Description: Displays a list of notifications with index, ID, title, and timestamp,
then allows the user to select one by index.
Parameters:
- notifications: Vector of Notification pointers to be displayed.
Returns:
- const Notification* representing the selected notification.
- nullptr if no notifications are available or if the selection is invalid.
*/
inline const Notification* selectNotification(const util::Vector<const Notification*>& notifications)
{
if (notifications.getSize() == 0)
@@ -47,6 +66,14 @@ inline const Notification* selectNotification(const util::Vector<const Notificat
return indexedNotifications[selectedIndex];
}
/*
Function: displayNotification
Description: Displays detailed information about a single notification, including ID, title, timestamp, and message.
Parameters:
- notification: Pointer to the Notification object to be displayed.
Returns:
- void
*/
inline void displayNotification(const Notification* notification)
{
util::clear();
@@ -62,6 +89,14 @@ inline void displayNotification(const Notification* notification)
std::cout << "Message : " << notification->getMessage() << std::endl;
}
/*
Function: viewAndDeleteNotification
Description: Allows the user to view a notification and then delete it from the system using the controller.
Parameters:
- controller: Reference to the Controller object used to manage notifications.
Returns:
- void
*/
inline void viewAndDeleteNotification(Controller& controller)
{
util::clear();
@@ -1,8 +1,26 @@
/*
File: TechnicianMenu.cpp
Description: Implements the TechnicianMenu class which provides the technicians console interface
in the Vehicle Service Management System. Handles menu display, user input, and
technician-specific operations such as completing jobs and viewing notifications.
Author: Trenser
Date: 19-May-2026
*/
#include "TechnicianMenu.h"
#include "InputHelper.h"
#include "OutputHelper.h"
#include "MenuHelper.h"
/*
Function: showMenu
Description: Displays the technician menu in a loop until the user chooses to logout.
Handles exceptions and ensures smooth user interaction.
Parameters:
- None
Returns:
- void
*/
void TechnicianMenu::showMenu()
{
bool isMenuActive = true;
@@ -36,6 +54,14 @@ void TechnicianMenu::completeJob()
{
}
/*
Function: viewNotifications
Description: Displays notifications for the technician and allows deletion of notifications.
Parameters:
- None
Returns:
- void
*/
void TechnicianMenu::viewNotifications()
{
viewAndDeleteNotification(m_controller);
@@ -1,3 +1,11 @@
/*
File: TechnicianMenu.h
Description: Declares the TechnicianMenu class which provides the technician-facing console menu in the Vehicle Service Management System.
Supports operations such as viewing assigned jobs, completing jobs, and managing notifications.
Author: Trenser
Date: 19-May-2026
*/
#pragma once
#include "Controller.h"
@@ -1,7 +1,24 @@
/*
File: UserInterface.cpp
Description: Implements the UserInterface class which provides the main entry point for the Vehicle Service Management System.
Handles system checks, displays the main menu, and manages user operations such as login and customer registration.
Author: Trenser
Date: 19-May-2026
*/
#include "UserInterface.h"
#include "InputHelper.h"
#include "OutputHelper.h"
/*
Function: run
Description: Runs the Vehicle Service Management System interface.
Performs system checks, displays the main menu, and processes user input until exit.
Parameters:
- None
Returns:
- void
*/
void UserInterface::run()
{
m_controller.runSystemChecks();
@@ -27,6 +44,14 @@ void UserInterface::run()
}
}
/*
Function: handleOperation
Description: Processes the users menu choice and executes the corresponding action.
Parameters:
- choice: Integer representing the selected menu option.
Returns:
- bool: True if the menu should remain active, False if exit is selected.
*/
bool UserInterface::handleOperation(int choice)
{
switch (choice)
@@ -47,11 +72,27 @@ bool UserInterface::handleOperation(int choice)
return true;
}
/*
Function: login
Description: Handles the login process for existing users.
Parameters:
- None
Returns:
- void
*/
void UserInterface::login()
{
}
/*
Function: registerCustomer
Description: Handles the registration process for new customers.
Parameters:
- None
Returns:
- void
*/
void UserInterface::registerCustomer()
{
@@ -1,3 +1,12 @@
/*
File: UserInterface.h
Description: Declares the UserInterface class which provides the main console interface for the Vehicle Service Management System.
Handles user interactions such as login, customer registration, and role-based menu navigation
for Admin, Technician, and Customer modules.
Author: Trenser
Date: 19-May-2026
*/
#pragma once
#include "Controller.h"
#include "AdminMenu.h"