X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Faction.h;h=3892ac78786cf95036bb7b453032b06dd11af17b;hb=4e6fd9a7436d61af311ab83b5ec264b37078fe76;hp=5877e8947d4667270451298b323a6b64cd4eb03b;hpb=74266a6e650f019063cdcd1c9a7bd26d8f99041b;p=builder.git diff --git a/source/action.h b/source/action.h index 5877e89..3892ac7 100644 --- a/source/action.h +++ b/source/action.h @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2007, 2009 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #ifndef ACTION_H_ #define ACTION_H_ @@ -15,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. - - @return 0 on successful completion, 1 on error, -1 if the action is still - executing - */ - virtual int check()=0; - - virtual ~Action() { } protected: Builder &builder; Action(Builder &b): builder(b) { } +public: + virtual ~Action() { } + + /** + 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; + +protected: + /** + Annouces the action by printing out the package name, tool and target name. + */ void announce(const std::string &, const std::string &, const std::string &); };