[Compbench-devel] CompBenchmarks++/libcompbenchmarks/UI UI.h, 1.13, 1.14
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-08-24 21:52:29
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1812 Modified Files: UI.h Log Message: Doxygen documentation improved a little bit. Index: UI.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** UI.h 24 Aug 2007 18:37:56 -0000 1.13 --- UI.h 24 Aug 2007 21:52:21 -0000 1.14 *************** *** 15,43 **** namespace CBM { ! /** \brief Basic API for user interface. * ! * This class defines few methods to interact with compbenchmarks-config, or ! * with the console. */ class UI { private: ! UIMsg *root; ! UIMsg *current; ! UIMsg *lastTopChild; ! Mutex mui; virtual UIMsg *currentMsg(void); protected: ! /** Checks if in main thread ! */ virtual void postMsg(UIMsg *_msg); ! virtual void childDone(void); public: UI(); virtual UIMsg *msgFatal(std::string _text); virtual UIMsg *msgShell(std::string _shellCommand); virtual UIMsg *msgCreate(UIMsg::ObjectType _type, --- 15,79 ---- namespace CBM { ! /** \brief Basic API for posting messages to user interface. * ! * This class defines few methods to handle and post messages from core ! * to the user interface. ! * ! * \sa UIMsg */ class UI { private: ! UIMsg *root; /*<! Root message. */ ! UIMsg *current; /*<! Current message (last posted). */ ! UIMsg *lastTopChild; /*<! Current message's top child. */ ! Mutex mui; /*<! Mutex managing concurrent accesses. */ + /** \brief Returns current message. + * + * Returns a pointer to the current message (last posted). + * \return Current message. + * \sa current */ virtual UIMsg *currentMsg(void); protected: ! /** \brief Internal method to post a message. ! * ! * Locks mui, insert given message, either as root or as a current ! * message's child. Update current, and may update lastTopChild. ! * Finally, it calls Display to report message to user interface. ! * ! * \sa mui ! * \sa current ! * \sa lastTopChild ! * \sa Display ! */ virtual void postMsg(UIMsg *_msg); ! ! /** \brief Internal method to close a message. ! * ! * This method signals the end of the current message (meaning it won't ! * have anymore childs) : lock mui, and call DisplayDone(). ! * May change current. ! * ! * \sa mui ! * \sa DisplayDone() ! * \sa current ! */ virtual void childDone(void); public: UI(); + /** \brief Emit a fatal message + * + * \param _text Text to be shown to user. + */ virtual UIMsg *msgFatal(std::string _text); + + /** \brief Emit a shell command execution information + * + * \param _shellCommand Shell command to be executed. + */ virtual UIMsg *msgShell(std::string _shellCommand); virtual UIMsg *msgCreate(UIMsg::ObjectType _type, |