1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
13 * This library is free software; you can redistribute it and/or modify it *
14 * under the terms of the GNU Library General Public License as published *
15 * by the Free Software Foundation, version 2. *
17 * This library is distributed in the hope that it will be useful, but *
18 * WITHOUT ANY WARRANTY; without even the implied warranty of *
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
20 * Library General Public License for more details. *
22 * You should have received a copy of the GNU Library General Public *
23 * License along with this library; if not, write to the Free Software *
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38 *****************************************************************************
40 ** This file is automatically generated. **
42 ** Any changes made to this file WILL be lost when it is **
43 ** regenerated, which can become necessary at any time. **
45 ** Do not change this file, changes should be done in the derived **
48 *****************************************************************************
49 \*****************************************************************************/
55 //! access the type of the class
57 OSG::FieldContainerType &KeySensorBase::getClassType(void)
62 //! access the numerical type of the class
64 OSG::UInt32 KeySensorBase::getClassTypeId(void)
70 OSG::UInt16 KeySensorBase::getClassGroupId(void)
72 return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the KeySensor::_sfKey field.
80 std::string &KeySensorBase::editKey(void)
82 editSField(KeyFieldMask);
84 return _sfKey.getValue();
87 //! Get the value of the KeySensor::_sfKey field.
89 const std::string &KeySensorBase::getKey(void) const
91 return _sfKey.getValue();
94 //! Set the value of the KeySensor::_sfKey field.
96 void KeySensorBase::setKey(const std::string &value)
98 editSField(KeyFieldMask);
100 _sfKey.setValue(value);
102 //! Get the value of the KeySensor::_sfStateRaw field.
105 bool &KeySensorBase::editStateRaw(void)
107 editSField(StateRawFieldMask);
109 return _sfStateRaw.getValue();
112 //! Get the value of the KeySensor::_sfStateRaw field.
114 bool KeySensorBase::getStateRaw(void) const
116 return _sfStateRaw.getValue();
119 //! Set the value of the KeySensor::_sfStateRaw field.
121 void KeySensorBase::setStateRaw(const bool value)
123 editSField(StateRawFieldMask);
125 _sfStateRaw.setValue(value);
127 //! Get the value of the KeySensor::_sfStateFlipFlop field.
130 bool &KeySensorBase::editStateFlipFlop(void)
132 editSField(StateFlipFlopFieldMask);
134 return _sfStateFlipFlop.getValue();
137 //! Get the value of the KeySensor::_sfStateFlipFlop field.
139 bool KeySensorBase::getStateFlipFlop(void) const
141 return _sfStateFlipFlop.getValue();
144 //! Set the value of the KeySensor::_sfStateFlipFlop field.
146 void KeySensorBase::setStateFlipFlop(const bool value)
148 editSField(StateFlipFlopFieldMask);
150 _sfStateFlipFlop.setValue(value);
152 //! Get the value of the KeySensor::_sfSignalPressed field.
155 OSGAny &KeySensorBase::editSignalPressed(void)
157 editSField(SignalPressedFieldMask);
159 return _sfSignalPressed.getValue();
162 //! Get the value of the KeySensor::_sfSignalPressed field.
164 const OSGAny &KeySensorBase::getSignalPressed(void) const
166 return _sfSignalPressed.getValue();
169 //! Set the value of the KeySensor::_sfSignalPressed field.
171 void KeySensorBase::setSignalPressed(const OSGAny &value)
173 editSField(SignalPressedFieldMask);
175 _sfSignalPressed.setValue(value);
177 //! Get the value of the KeySensor::_sfSignalReleased field.
180 OSGAny &KeySensorBase::editSignalReleased(void)
182 editSField(SignalReleasedFieldMask);
184 return _sfSignalReleased.getValue();
187 //! Get the value of the KeySensor::_sfSignalReleased field.
189 const OSGAny &KeySensorBase::getSignalReleased(void) const
191 return _sfSignalReleased.getValue();
194 //! Set the value of the KeySensor::_sfSignalReleased field.
196 void KeySensorBase::setSignalReleased(const OSGAny &value)
198 editSField(SignalReleasedFieldMask);
200 _sfSignalReleased.setValue(value);
204 #ifdef OSG_MT_CPTR_ASPECT
206 void KeySensorBase::execSync ( KeySensorBase *pFrom,
207 ConstFieldMaskArg whichField,
208 AspectOffsetStore &oOffsets,
209 ConstFieldMaskArg syncMode,
210 const UInt32 uiSyncInfo)
212 Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
214 if(FieldBits::NoField != (KeyFieldMask & whichField))
215 _sfKey.syncWith(pFrom->_sfKey);
217 if(FieldBits::NoField != (StateRawFieldMask & whichField))
218 _sfStateRaw.syncWith(pFrom->_sfStateRaw);
220 if(FieldBits::NoField != (StateFlipFlopFieldMask & whichField))
221 _sfStateFlipFlop.syncWith(pFrom->_sfStateFlipFlop);
223 if(FieldBits::NoField != (SignalPressedFieldMask & whichField))
224 _sfSignalPressed.syncWith(pFrom->_sfSignalPressed);
226 if(FieldBits::NoField != (SignalReleasedFieldMask & whichField))
227 _sfSignalReleased.syncWith(pFrom->_sfSignalReleased);
233 const Char8 *KeySensorBase::getClassname(void)
237 OSG_GEN_CONTAINERPTR(KeySensor);