Changes in src/Actions/ActionRegistry.cpp [bcf653:b59da6]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/ActionRegistry.cpp
rbcf653 rb59da6 47 47 * \return true - Action instance present, false - not 48 48 */ 49 bool ActionRegistry::isActionPresentByName(const std::string name) 49 bool ActionRegistry::isActionPresentByName(const std::string name) const 50 50 { 51 51 return isPresentByName(name); 52 52 } 53 53 54 /** Returns the last present action position in the requested menu. 55 * \param &token token of the menu 56 * \return last used position 57 */ 58 int ActionRegistry::getLastPosition(const std::string &token) const 59 { 60 int position = 0; 61 for (const_iterator iter = getBeginIter(); 62 iter != getEndIter(); 63 ++iter) { 64 const std::string &MenuName = (iter->second)->Traits.getMenuName(); 65 const int &MenuPosition = (iter->second)->Traits.getMenuPosition(); 66 if ((MenuName == token) && (position < MenuPosition)) 67 position = MenuPosition; 68 } 69 return position; 70 } 71 72 54 73 CONSTRUCT_SINGLETON(ActionRegistry) 55 74 CONSTRUCT_REGISTRY(Action)
Note:
See TracChangeset
for help on using the changeset viewer.