00001
00003
00004
00005
00006
00007
00009
00011
00012
00013
00015
00016 #include "vrjGaPrecompiled.h"
00017 #include "ButtonDevice.h"
00018
00019 #include "gadget/Type/Digital.h"
00020
00021 using namespace vrjGA;
00022
00023
00025
00026
00027
00029
00030 ButtonDevice::ButtonDevice ( unsigned long mask, const std::string &name ) :
00031 BaseClass(),
00032 _di(),
00033 _mask ( mask )
00034 {
00035
00036 _di.init ( name );
00037 }
00038
00039
00041
00042
00043
00045
00046 ButtonDevice::~ButtonDevice()
00047 {
00048 }
00049
00050
00052
00053
00054
00056
00057 unsigned long ButtonDevice::state() const
00058 {
00059
00060 DI &di = const_cast < DI & > ( _di );
00061 return static_cast < unsigned long > ( di->getData() );
00062 }