1 #ifndef AESALON_MONITOR_INITIALIZER_H
2 #define AESALON_MONITOR_INITIALIZER_H
4 #include "misc/SmartPointer.h"
5 #include "misc/Singleton.h"
6 #include "TCPServerSocket.h"
7 #include "platform/BidirectionalPipe.h"
8 #include "misc/EventQueue.h"
9 #include "ProgramManager.h"
14 /** Initializer class. Basically handles initialization of the Monitor namespace. */
15 class Initializer
: public Misc::Singleton
<Initializer
> {
17 /** A copy of argv, used for initializing the ArgumentParser. */
19 /** The socket used to communicate with the GUI. */
20 Misc::SmartPointer
<TCPServerSocket
> server_socket
;
21 /** The EventQueue instance; used to keep the local copy of the program's memory updated. */
22 Misc::SmartPointer
<Misc::EventQueue
> event_queue
;
24 Misc::SmartPointer
<ProgramManager
> program_manager
;
26 /** Initialize the aesalon monitor. */
28 /** Deinitialize the aesalon monitor. */
31 /** Print usage information about aesalon, including a list of all flags. */
34 /** Main execution loop. */
39 /** Constructor for the Initializer class. This is where the magic begins.
40 @param argv argv, as passed into main().
42 Initializer(char **argv
);
43 /** Destructor for the Initializer class. Here is where the magic ends. */
44 virtual ~Initializer();
46 /** Returns a SmartPointer to the named pipe; mostly used internally but
47 public for other classes to use when required.
48 @return The named pipe created by this aesalon gdb instance.
50 Misc::SmartPointer
<TCPServerSocket
> get_socket() const { return server_socket
; }
52 Misc::SmartPointer
<ProgramManager
> get_program_manager() const { return program_manager
; }
53 Misc::SmartPointer
<Misc::EventQueue
> get_event_queue() const { return event_queue
; }
55 int get_return_value() const { return return_value
; }
56 void set_return_value(int new_return_value
) { return_value
= new_return_value
; }
59 } // namespace Monitor
60 } // namespace Aesalon