CrossGuard
Loading...
Searching...
No Matches
Functions
main.cpp File Reference

Main entry point for the application. Initializes the application, runs the main system, and then performs cleanup upon exit. More...

#include "main/MainSystem.h"
#include "utils/Logger.h"
#include "utils/FirestoreLogger.h"
#include <iostream>
#include <string>

Functions

void initApplication ()
 Initializes the application's logging systems.
 
void closeApplication (MainSystem &mainSystem)
 Shuts down the application, ensuring graceful termination of systems and logging.
 
int main ()
 The main function of the application.
 

Detailed Description

Main entry point for the application. Initializes the application, runs the main system, and then performs cleanup upon exit.

Function Documentation

◆ closeApplication()

void closeApplication ( MainSystem & mainSystem)

Shuts down the application, ensuring graceful termination of systems and logging.

Parameters
mainSystemReference to the MainSystem object to shut down.

◆ initApplication()

void initApplication ( )

Initializes the application's logging systems.

This function initializes the FirestoreLogger and Logger to begin logging application events. It attempts to connect to Firestore for logging and sets up a local log file.

◆ main()

int main ( )

The main function of the application.

Initializes the application, creates and runs the main system, and then closes the application on completion.

Returns
int The exit code of the application, where 0 indicates successful termination.