Zappy - Year end project 2
This is a project that Epitech asked us to create in order to allow us to reveiw the notions of the current year.
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions
main.Main Class Reference
Collaboration diagram for main.Main:
Collaboration graph

Public Member Functions

None __init__ (self, int error=84, int success=0)
 
None __del__ (self)
 
int main (self)
 

Data Fields

 argc
 
 global_variables
 
 server
 

Protected Member Functions

int _process_arguments (self)
 
None _check_team_name (self)
 

Detailed Description

    This is the main class of the program.
    This class is responsible for calling the three main steps of the program.
    These steps are:
    * Initialisation:
            * Check arguments
            * Create listener on a new thread
            * Create sender on a new thread
    * Launch mainloop (skipped if error occurs before this step)
    * When the program ends:
            * If the reason was an error:
                    * Display the error
            * Free any allocated ressource that was not freed
            * Exit with the status contained in GlobalVariables

Definition at line 15 of file main.py.

Constructor & Destructor Documentation

◆ __init__()

None main.Main.__init__ ( self,
int error = 84,
int success = 0 )

Definition at line 32 of file main.py.

◆ __del__()

None main.Main.__del__ ( self)
Function in charge of unloading the colour library when the class is destroyed.

Definition at line 44 of file main.py.

Member Function Documentation

◆ _check_team_name()

None main.Main._check_team_name ( self)
protected
_summary_
Send the current team name to the server.

Definition at line 121 of file main.py.

◆ _process_arguments()

int main.Main._process_arguments ( self)
protected
_summary_
This function is used to check the arguments provided by argv.
They will be used to define some parameters that user could specify.
This function is also the one in charge of displaying the help section when required.

Definition at line 65 of file main.py.

◆ main()

int main.Main.main ( self)
_sumary_
The main function of the program.
This function is the one in charge of:
* Parsing the arguments
* Creating the threads
* Starting the threads

Definition at line 133 of file main.py.

Field Documentation

◆ argc

main.Main.argc

Definition at line 74 of file main.py.

◆ global_variables

main.Main.global_variables

Definition at line 127 of file main.py.

◆ server

main.Main.server

Definition at line 168 of file main.py.


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