1 #ifndef AESALON_MONITOR_INITIALIZER_H
2 #define AESALON_MONITOR_INITIALIZER_H
4 #include "misc/Singleton.h"
5 #include "tcp/ServerSocket.h"
6 #include "event/Queue.h"
7 #include "ProgramManager.h"
8 #include "misc/ArgumentParser.h"
10 /** Initializer class. Basically, handles initialization of the Monitor. */
11 class Initializer
: public Misc::Singleton
<Initializer
> {
13 /** A copy of argv, used for initializing the ArgumentParser. */
15 /** The socket used to communicate with the GUI. */
16 TCP::ServerSocket
*server_socket
;
17 /** The EventQueue instance; used to keep the local copy of the program's memory updated. */
18 Event::Queue
*event_queue
;
20 ProgramManager
*program_manager
;
22 Misc::ArgumentParser
*argument_parser
;
24 /** Initialize the aesalon monitor. */
26 /** Deinitialize the aesalon monitor. */
29 /** Print usage information about aesalon, including a list of all flags. */
32 /** Main execution loop. */
37 /** Constructor for the Initializer class. This is where the magic begins.
38 @param argv argv, as passed into main().
40 Initializer(char **argv
);
41 /** Destructor for the Initializer class. Here is where the magic ends. */
42 virtual ~Initializer();
44 /** Returns a SmartPointer to the named pipe; mostly used internally but
45 public for other classes to use when required.
46 @return The named pipe created by this aesalon gdb instance.
48 TCP::ServerSocket
*get_socket() const { return server_socket
; }
50 ProgramManager
*get_program_manager() const { return program_manager
; }
51 Event::Queue
*get_event_queue() const { return event_queue
; }
52 Misc::ArgumentParser
*get_argument_parser() const { return argument_parser
; }
54 int get_return_value() const { return return_value
; }
55 void set_return_value(int new_return_value
) { return_value
= new_return_value
; }