00001 // Filename: clientDialDevice.cxx 00002 // Created by: drose (26Jan01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 #include "clientDialDevice.h" 00017 00018 #include "indent.h" 00019 00020 TypeHandle ClientDialDevice::_type_handle; 00021 00022 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Function: ClientDialDevice::ensure_dial_index 00026 // Access: Private 00027 // Description: Guarantees that there is a slot in the array for the 00028 // indicated index number, by filling the array up to 00029 // that index if necessary. 00030 //////////////////////////////////////////////////////////////////// 00031 void ClientDialDevice:: 00032 ensure_dial_index(int index) { 00033 nassertv(index >= 0); 00034 00035 _dials.reserve(index + 1); 00036 while ((int)_dials.size() <= index) { 00037 _dials.push_back(DialState()); 00038 } 00039 }