foobar2000 SDK  2015-01-14
Functions
mainmenu.cpp File Reference

Go to the source code of this file.

Functions

static bool dynamic_execute_recur (mainmenu_node::ptr node, const GUID &subID, service_ptr_t< service_base > callback)
 

Function Documentation

static bool dynamic_execute_recur ( mainmenu_node::ptr  node,
const GUID subID,
service_ptr_t< service_base callback 
)
static

Definition at line 37 of file mainmenu.cpp.

37  {
38  switch(node->get_type()) {
39  case mainmenu_node::type_command:
40  if (subID == node->get_guid()) {
41  node->execute(callback); return true;
42  }
43  break;
44  case mainmenu_node::type_group:
45  {
46  const t_size total = node->get_children_count();
47  for(t_size walk = 0; walk < total; ++walk) {
48  if (dynamic_execute_recur(node->get_child(walk), subID, callback)) return true;
49  }
50  }
51  break;
52  }
53  return false;
54 }
size_t t_size
Definition: int_types.h:48
static bool dynamic_execute_recur(mainmenu_node::ptr node, const GUID &subID, service_ptr_t< service_base > callback)
Definition: mainmenu.cpp:37