Panda3D
configVariableManager.I
1 // Filename: configVariableManager.I
2 // Created by: drose (15Oct04)
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 ////////////////////////////////////////////////////////////////////
17 // Function: ConfigVariableManager::get_num_variables
18 // Access: Published
19 // Description: Returns the current number of active ConfigVariableCores in
20 // the world.
21 ////////////////////////////////////////////////////////////////////
22 INLINE int ConfigVariableManager::
24  return _variables.size();
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: ConfigVariableManager::get_variable
29 // Access: Published
30 // Description: Returns the nth active ConfigVariableCore in the world.
31 ////////////////////////////////////////////////////////////////////
33 get_variable(int n) const {
34  nassertr(n >= 0 && n < (int)_variables.size(), (ConfigVariableCore *)NULL);
35  return _variables[n];
36 }
37 
38 INLINE ostream &
39 operator << (ostream &out, const ConfigVariableManager &variableMgr) {
40  variableMgr.output(out);
41  return out;
42 }
The internal definition of a ConfigVariable.
ConfigVariableCore * get_variable(int n) const
Returns the nth active ConfigVariableCore in the world.
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...
int get_num_variables() const
Returns the current number of active ConfigVariableCores in the world.