X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Faction.h;h=4ae787a505814137f960c2093268e2017e4e7b05;hb=242c55b17e6608b29a77ca17a5b677e202a3ca90;hp=a80c7db4ae6865311ed8a21ff0036d95333e4367;hpb=77461a8c0e2b5686b04cf15f3a9333b215813992;p=builder.git diff --git a/source/action.h b/source/action.h index a80c7db..4ae787a 100644 --- a/source/action.h +++ b/source/action.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2006-2007, 2009 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -22,19 +22,24 @@ public: /// Emitted when the action has finished sigc::signal signal_done; - /** - Checks whether the action is done and emits signal_done if it is. +protected: + Builder &builder; + + Action(Builder &b): builder(b) { } +public: + virtual ~Action() { } - @return 0 on successful completion, 1 on error, -1 if the action is still - executing + /** + Checks whether the action is done and emits signal_done if it is. Returns 0 + if the action has completed successfully, 1 if an error was encountered and + -1 if it is still executing. */ virtual int check()=0; - virtual ~Action() { } protected: - Builder &builder; - - Action(Builder &b): builder(b) { } + /** + Annouces the action by printing out the package name, tool and target name. + */ void announce(const std::string &, const std::string &, const std::string &); };