From 2ad75c74f98883917211d4859482ba8ec7fc9bf3 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 28 Jul 2002 13:39:26 +0000 Subject: [PATCH] Added doxygen comments and moved the initialization of child objects from the constructor into ReadyToRun(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@496 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/registrar/Registrar.cpp | 44 +++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/src/servers/registrar/Registrar.cpp b/src/servers/registrar/Registrar.cpp index a94528e909..67a85b16ce 100644 --- a/src/servers/registrar/Registrar.cpp +++ b/src/servers/registrar/Registrar.cpp @@ -12,7 +12,16 @@ #include "Registrar.h" #include "TRoster.h" +/*! + \class Registrar + \brief The application class of the registrar. + + Glues the registrar services together and dispatches the roster messages. +*/ + // constructor +/*! \brief Creates the registrar application class. +*/ Registrar::Registrar() : BApplication(kRegistrarSignature), fRoster(NULL), @@ -20,16 +29,14 @@ Registrar::Registrar() fMIMEManager(NULL) { FUNCTION_START(); - // move the following code to ReadyToRun() once it works. - fRoster = new TRoster; - fClipboardHandler = new ClipboardHandler; - AddHandler(fClipboardHandler); - fMIMEManager = new MIMEManager; - fMIMEManager->Run(); - FUNCTION_END(); } // destructor +/*! \brief Frees all resources associated with the registrar. + + All registrar services, that haven't been shut down earlier, are + terminated. +*/ Registrar::~Registrar() { FUNCTION_START(); @@ -42,6 +49,10 @@ Registrar::~Registrar() } // MessageReceived +/*! \brief Overrides the super class version to dispatch roster specific + messages. + \param message The message to be handled +*/ void Registrar::MessageReceived(BMessage *message) { @@ -100,24 +111,41 @@ Registrar::MessageReceived(BMessage *message) } // ReadyToRun +/*! \brief Overrides the super class version to initialize the registrar + services. +*/ void Registrar::ReadyToRun() { FUNCTION_START(); + fRoster = new TRoster; + fClipboardHandler = new ClipboardHandler; + AddHandler(fClipboardHandler); + fMIMEManager = new MIMEManager; + fMIMEManager->Run(); + FUNCTION_END(); } // QuitRequested +/*! \brief Overrides the super class version to avoid termination of the + registrar until the system shutdown. +*/ bool Registrar::QuitRequested() { FUNCTION_START(); // The final registrar must not quit. At least not that easily. ;-) return BApplication::QuitRequested(); - FUNCTION_END(); } // main +/*! \brief Creates and runs the registrar application. + + The main thread is renamed. + + \return 0. +*/ int main() {