#include <iosfwd>Go to the source code of this file.
Classes | |
| class | idep_NameArray |
Functions | |
| std::ostream & | operator<< (std::ostream &out, const idep_NameArray &array) |
|
||||||||||||
|
Definition at line 65 of file idep_namea.cxx. References idep_NameArray::length(). 00066 {
00067 int fieldWidth = 10;
00068 int maxIndex = array.length() - 1;
00069 assert (sizeof (long int) >= 4);
00070 long int x = 1000 * 1000 * 1000; // requires 4-byte integer.
00071 while (fieldWidth > 1 && 0 == maxIndex / x) {
00072 --fieldWidth;
00073 x /= 10;
00074 }
00075
00076 for (int i = 0; i < array.length(); ++i) {
00077 out.width(fieldWidth);
00078 out << i << ". " << array[i] << std::endl;
00079 }
00080
00081 return out;
00082 }
|
1.3.9.1