X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Faction.h;h=4ae787a505814137f960c2093268e2017e4e7b05;hb=a40db37e1e681d397d4bfc6c893e15945c533b72;hp=60d14506853387445b0922bd9eeb560af1c040dd;hpb=59ac0a44d6edf179c01604c6ced744873213f855;p=builder.git diff --git a/source/action.h b/source/action.h index 60d1450..4ae787a 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_ @@ -6,17 +13,33 @@ class Builder; +/** +Actions are executed to rebuild targets. +*/ class Action { public: + /// Emitted when the action has finished sigc::signal signal_done; - 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 &); };