Simplified member_function_pointer declarations.

This commit is contained in:
Davis King 2012-11-17 23:31:26 -05:00
parent f0705c9384
commit f9e63c9d33
9 changed files with 16 additions and 18 deletions

View File

@ -42,7 +42,7 @@ namespace dlib
typename strip<T4>::type* arg4;
typename member_function_pointer<T1,T2,T3,T4>::kernel_1a_c mfp;
member_function_pointer<T1,T2,T3,T4> mfp;
};
// ----------------

View File

@ -2058,7 +2058,7 @@ namespace dlib
{
auto_mutex M(wm);
member_function_pointer<>::kernel_1a temp;
member_function_pointer<> temp;
temp.set(object,event_handler);
// if this handler isn't already registered then add it
@ -2144,7 +2144,7 @@ namespace dlib
array<popup_menu*> submenus;
unsigned long selected_item;
bool submenu_open;
array<member_function_pointer<>::kernel_1a> hide_handlers;
array<member_function_pointer<> > hide_handlers;
// restricted functions
popup_menu(popup_menu&); // copy constructor

View File

@ -5663,11 +5663,11 @@ namespace dlib
class image_display_functor
{
const std::string str;
const member_function_pointer<const std::string&>::kernel_1a mfp;
const member_function_pointer<const std::string&> mfp;
public:
image_display_functor (
const std::string& str_,
const member_function_pointer<const std::string&>::kernel_1a& mfp_
const member_function_pointer<const std::string&>& mfp_
) : str(str_),
mfp(mfp_)
{}
@ -6052,7 +6052,7 @@ namespace dlib
auto_mutex lock(m);
if (part_names.insert(name).second)
{
member_function_pointer<const std::string&>::kernel_1a mfp;
member_function_pointer<const std::string&> mfp;
mfp.set(*this,&image_display::on_part_add);
parts_menu.menu().add_menu_item(menu_item_text("Add " + name,impl::image_display_functor(name,mfp)));
}

View File

@ -203,7 +203,7 @@ namespace dlib
public:
typedef member_function_pointer<const std::string&, const log_level&,
const uint64, const char*>::kernel_1a_c hook_mfp;
const uint64, const char*> hook_mfp;
logger (
const char* name_

View File

@ -184,9 +184,7 @@ namespace dlib
// to report errors back to the user in a very straight forward way.
open_listening_socket();
member_function_pointer<>::kernel_1a mfp;
mfp.set(*this,&server::start_async_helper);
async_start_thread.reset(new thread_function(mfp));
async_start_thread.reset(new thread_function(make_mfp(*this,&server::start_async_helper)));
}
// ----------------------------------------------------------------------------------------

View File

@ -126,7 +126,7 @@ namespace dlib
void thread_helper(
);
typedef member_function_pointer<>::kernel_1a_c mfp;
typedef member_function_pointer<> mfp;
rmutex m_;
rsignaler s;

View File

@ -445,9 +445,9 @@ namespace dlib
long arg1;
long arg2;
member_function_pointer<>::kernel_1a mfp0;
member_function_pointer<long>::kernel_1a mfp1;
member_function_pointer<long,long>::kernel_1a mfp2;
member_function_pointer<> mfp0;
member_function_pointer<long> mfp1;
member_function_pointer<long,long> mfp2;
bfp_type bfp;
shared_ptr<function_object_copy> function_copy;

View File

@ -127,7 +127,7 @@ namespace dlib
reg.m.lock();
const thread_id_type id = get_thread_id();
thread_id_type id_copy;
member_function_pointer<>::kernel_1a mfp;
member_function_pointer<> mfp;
// Remove all the member function pointers for this thread from the tree
// and call them.

View File

@ -92,7 +92,7 @@ namespace dlib
void (T::*handler)()
)
{
member_function_pointer<>::kernel_1a mfp, junk_mfp;
member_function_pointer<> mfp, junk_mfp;
mfp.set(obj,handler);
thread_id_type junk_id;
@ -119,7 +119,7 @@ namespace dlib
)
{
thread_id_type id = get_thread_id();
member_function_pointer<>::kernel_1a mfp;
member_function_pointer<> mfp;
mfp.set(obj,handler);
auto_mutex M(reg.m);
@ -162,7 +162,7 @@ namespace dlib
mutex m;
binary_search_tree<
thread_id_type,
member_function_pointer<>::kernel_1a,
member_function_pointer<>,
memory_manager<char>::kernel_2a
>::kernel_2a_c reg;
};