From 71504b8bbe636bc49795ca3e94e78a70a2602542 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 29 Sep 2003 14:00:46 +0000 Subject: added size accessor --- src/FbTk/MacroCommand.cc | 6 +++++- src/FbTk/MacroCommand.hh | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/FbTk/MacroCommand.cc b/src/FbTk/MacroCommand.cc index 5e82fec..d655099 100644 --- a/src/FbTk/MacroCommand.cc +++ b/src/FbTk/MacroCommand.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MacroCommand.cc,v 1.1 2003/01/11 01:09:24 fluxgen Exp $ +// $Id: MacroCommand.cc,v 1.2 2003/09/29 14:00:46 fluxgen Exp $ #include "MacroCommand.hh" @@ -29,6 +29,10 @@ void MacroCommand::add(RefCount &com) { m_commandlist.push_back(com); } +unsigned int MacroCommand::size() const { + return m_commandlist.size(); +} + void MacroCommand::execute() { for (size_t i=0; i < m_commandlist.size(); ++i) m_commandlist[i]->execute(); diff --git a/src/FbTk/MacroCommand.hh b/src/FbTk/MacroCommand.hh index dbe230c..a75f98a 100644 --- a/src/FbTk/MacroCommand.hh +++ b/src/FbTk/MacroCommand.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MacroCommand.hh,v 1.1 2003/01/11 01:09:24 fluxgen Exp $ +// $Id: MacroCommand.hh,v 1.2 2003/09/29 14:00:45 fluxgen Exp $ #ifndef FBTK_MACROCOMMAND_HH #define FBTK_MACROCOMMAND_HH @@ -35,7 +35,9 @@ namespace FbTk { class MacroCommand:public Command { public: void add(RefCount &com); + unsigned int size() const; virtual void execute(); + private: std::vector > m_commandlist; }; -- cgit v0.11.2