Panda3D
 All Classes Functions Variables Enumerations
clientDialDevice.cxx
1 // Filename: clientDialDevice.cxx
2 // Created by: drose (26Jan01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 #include "clientDialDevice.h"
17 
18 #include "indent.h"
19 
20 TypeHandle ClientDialDevice::_type_handle;
21 
22 
23 
24 ////////////////////////////////////////////////////////////////////
25 // Function: ClientDialDevice::ensure_dial_index
26 // Access: Private
27 // Description: Guarantees that there is a slot in the array for the
28 // indicated index number, by filling the array up to
29 // that index if necessary.
30 ////////////////////////////////////////////////////////////////////
31 void ClientDialDevice::
32 ensure_dial_index(int index) {
33  nassertv(index >= 0);
34 
35  _dials.reserve(index + 1);
36  while ((int)_dials.size() <= index) {
37  _dials.push_back(DialState());
38  }
39 }
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85