added size accessor

This commit is contained in:
fluxgen 2003-09-29 14:00:46 +00:00
parent 2d8613ca6c
commit 71504b8bbe
2 changed files with 8 additions and 2 deletions

View file

@ -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<Command> &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();

View file

@ -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<Command> &com);
unsigned int size() const;
virtual void execute();
private:
std::vector<RefCount<Command> > m_commandlist;
};