Urbi SDK Remote for C++  2.7.5
issue-3699.cc
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010-2011, Gostai S.A.S.
00003  *
00004  * This software is provided "as is" without warranty of any kind,
00005  * either expressed or implied, including but not limited to the
00006  * implied warranties of fitness for a particular purpose.
00007  *
00008  * See the LICENSE file for more information.
00009  */
00010 
00011 #include <urbi/uobject.hh>
00012 
00013 class Test : public urbi::UObject
00014 {
00015 public:
00016   Test(const std::string&s)
00017     : urbi::UObject(s)
00018   {
00019     UBindFunction (Test, init);
00020   }
00021 
00022   int init()
00023   {
00024     std::cout << "[00000000:issue] *** init"<< std::endl;
00025     UBindThreadedFunction(Test, foo, urbi::LOCK_INSTANCE);
00026     return 0;
00027   }
00028 
00029   int foo(const std::string& s)
00030   {
00031     std::cout << "[00000000:issue] *** mmm sleepy..." << s << std::endl;
00032     sleep(1);
00033     std::cout << "[00000000:issue] *** awake!"<< std::endl;
00034     return 0;
00035   }
00036 
00037 };
00038 
00039 UStart(Test);