|
Urbi SDK Remote for C++
2.7.5
|
00001 /* 00002 * Copyright (C) 2008-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 "uaccess.hh" 00012 using namespace urbi; 00013 00014 UStart (uaccess); 00015 00016 uaccess::uaccess (const std::string& s) 00017 : UObject (s) 00018 { 00019 UBindFunction (uaccess, init); 00020 UBindVar (uaccess, val); 00021 UNotifyAccess (val, &uaccess::newval); 00022 } 00023 00024 int 00025 uaccess::init () 00026 { 00027 val = 0; 00028 return 0; 00029 } 00030 00031 UReturn 00032 uaccess::newval (UVar& v) 00033 { 00034 static int value = 0; 00035 value++; 00036 00037 v = value; 00038 return 0; 00039 }