bind.cpp
Go to the documentation of this file.
00001 #include <boost/bind.hpp>
00002 #include <boost/function.hpp>
00003 #include <cstdio>
00004 #include <megatree/function_caller.h>
00005 
00006 
00007 using namespace megatree;
00008 
00009 void function(int i)
00010 {
00011   printf("Calling function with i=%d\n", i);
00012   sleep(.1);
00013 }
00014 
00015 
00016 int main()
00017 {
00018   FunctionCaller f(10);
00019   
00020   for (unsigned i=0; i<99; i++)
00021     f.addFunction(boost::bind(&function, i));
00022 
00023   sleep(3);
00024   return 0;
00025 
00026 }


megatree_cpp
Author(s): Stuart Glaser
autogenerated on Thu Nov 28 2013 11:30:34