aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-29 14:00:46 (GMT)
committerfluxgen <fluxgen>2003-09-29 14:00:46 (GMT)
commit71504b8bbe636bc49795ca3e94e78a70a2602542 (patch)
treea6c015e4e878830d0bd7735dc8d620ef15c78241 /src
parent2d8613ca6cf9befae0346ed8e55c8df356fe73de (diff)
downloadfluxbox-71504b8bbe636bc49795ca3e94e78a70a2602542.zip
fluxbox-71504b8bbe636bc49795ca3e94e78a70a2602542.tar.bz2
added size accessor
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/MacroCommand.cc6
-rw-r--r--src/FbTk/MacroCommand.hh4
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 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: MacroCommand.cc,v 1.1 2003/01/11 01:09:24 fluxgen Exp $ 22// $Id: MacroCommand.cc,v 1.2 2003/09/29 14:00:46 fluxgen Exp $
23 23
24#include "MacroCommand.hh" 24#include "MacroCommand.hh"
25 25
@@ -29,6 +29,10 @@ void MacroCommand::add(RefCount<Command> &com) {
29 m_commandlist.push_back(com); 29 m_commandlist.push_back(com);
30} 30}
31 31
32unsigned int MacroCommand::size() const {
33 return m_commandlist.size();
34}
35
32void MacroCommand::execute() { 36void MacroCommand::execute() {
33 for (size_t i=0; i < m_commandlist.size(); ++i) 37 for (size_t i=0; i < m_commandlist.size(); ++i)
34 m_commandlist[i]->execute(); 38 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 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: MacroCommand.hh,v 1.1 2003/01/11 01:09:24 fluxgen Exp $ 22// $Id: MacroCommand.hh,v 1.2 2003/09/29 14:00:45 fluxgen Exp $
23 23
24#ifndef FBTK_MACROCOMMAND_HH 24#ifndef FBTK_MACROCOMMAND_HH
25#define FBTK_MACROCOMMAND_HH 25#define FBTK_MACROCOMMAND_HH
@@ -35,7 +35,9 @@ namespace FbTk {
35class MacroCommand:public Command { 35class MacroCommand:public Command {
36public: 36public:
37 void add(RefCount<Command> &com); 37 void add(RefCount<Command> &com);
38 unsigned int size() const;
38 virtual void execute(); 39 virtual void execute();
40
39private: 41private:
40 std::vector<RefCount<Command> > m_commandlist; 42 std::vector<RefCount<Command> > m_commandlist;
41}; 43};