foobar2000 SDK  2015-08-03
Public Member Functions | Static Public Member Functions
menu_item_resolverabstract

#include <contextmenu.h>

+ Inheritance diagram for menu_item_resolver:

Public Member Functions

virtual bool resolve_context_command (const GUID &id, service_ptr_t< class contextmenu_item > &out, t_uint32 &out_index)=0
 
virtual bool resolve_main_command (const GUID &id, service_ptr_t< class mainmenu_commands > &out, t_uint32 &out_index)=0
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 

Static Public Member Functions

static bool g_resolve_context_command (const GUID &id, service_ptr_t< class contextmenu_item > &out, t_uint32 &out_index)
 
static bool g_resolve_main_command (const GUID &id, service_ptr_t< class mainmenu_commands > &out, t_uint32 &out_index)
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

New in 0.9.5.1. Static methods safe to use in prior versions as it will use slow fallback mode when the service isn't present.
Functionality provided by menu_item_resolver methods isn't much different from just walking all registered contextmenu_item / mainmenu_commands implementations to find the command we want, but it uses a hint map to locate the service we're looking for without walking all of them which may be significantly faster in certain scenarios.

Definition at line 252 of file contextmenu.h.

Member Function Documentation

bool menu_item_resolver::g_resolve_context_command ( const GUID id,
service_ptr_t< class contextmenu_item > &  out,
t_uint32 out_index 
)
static

Definition at line 292 of file menu_helpers.cpp.

292  {
294 }
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
Definition: service.h:533
virtual bool resolve_context_command(const GUID &id, service_ptr_t< class contextmenu_item > &out, t_uint32 &out_index)=0
bool menu_item_resolver::g_resolve_main_command ( const GUID id,
service_ptr_t< class mainmenu_commands > &  out,
t_uint32 out_index 
)
static

Definition at line 295 of file menu_helpers.cpp.

295  {
296  return static_api_ptr_t<menu_item_resolver>()->resolve_main_command(id, out, out_index);
297 }
virtual bool resolve_main_command(const GUID &id, service_ptr_t< class mainmenu_commands > &out, t_uint32 &out_index)=0
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
Definition: service.h:533
virtual bool menu_item_resolver::resolve_context_command ( const GUID id,
service_ptr_t< class contextmenu_item > &  out,
t_uint32 out_index 
)
pure virtual
virtual bool menu_item_resolver::resolve_main_command ( const GUID id,
service_ptr_t< class mainmenu_commands > &  out,
t_uint32 out_index 
)
pure virtual

The documentation for this class was generated from the following files: