Ignore:
Timestamp:
Dec 17, 2009, 2:38:29 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
f3dd95
Parents:
425da9
Message:

Added an action that allows grouping and grouped execution of several actions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/Actions/ActionSequence.cpp

    r425da9 r32df34  
    1212
    1313ActionSequence::ActionSequence()
    14 {
    15   // TODO Auto-generated constructor stub
    16 
    17 }
     14{}
    1815
    1916ActionSequence::~ActionSequence()
    20 {
    21   // TODO Auto-generated destructor stub
    22 }
     17{}
    2318
    2419
     
    2823
    2924Action* ActionSequence::removeLastAction(){
    30   Action* theAction;
    31   theAction = actions.back();
    32   actions.pop_back();
    33   return theAction;
     25  if(actions.empty()) {
     26    return 0;
     27  }
     28  else {
     29    Action* theAction;
     30    theAction = actions.back();
     31    actions.pop_back();
     32    return theAction;
     33  }
    3434}
    3535
Note: See TracChangeset for help on using the changeset viewer.