Panda3D
configVariableList.cxx
1 // Filename: configVariableList.cxx
2 // Created by: drose (20Oct04)
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 #include "configVariableList.h"
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: ConfigVariableList::output
19 // Access: Published
20 // Description:
21 ////////////////////////////////////////////////////////////////////
22 void ConfigVariableList::
23 output(ostream &out) const {
24  out << get_num_values() << " values.";
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: ConfigVariableList::write
29 // Access: Published
30 // Description:
31 ////////////////////////////////////////////////////////////////////
32 void ConfigVariableList::
33 write(ostream &out) const {
34  int num_values = get_num_values();
35  for (int i = 0; i < num_values; ++i) {
36  out << get_string_value(i) << "\n";
37  }
38 }
int get_num_values() const
Returns the number of values in the variable.
string get_string_value(int n) const
Returns the nth value of the variable.