29 _devices(copy._devices)
38 _devices = copy._devices;
46 _devices.insert(device);
55 return _devices.erase(device) > 0;
63 size_t other_num_devices = other.
size();
64 for (
size_t i = 0; i < other_num_devices; i++) {
65 _devices.push_back(other[i]);
75 InputDevices new_devices;
76 InputDevices::const_iterator it;
77 for (it = _devices.begin(); it != _devices.end(); ++it) {
79 new_devices.push_back(*it);
83 _devices.swap(new_devices);
92 InputDevices::const_iterator it = _devices.find(device);
93 return (it != _devices.end());
110 _devices.reserve(num);
118output(std::ostream &out)
const {
119 if (_devices.size() == 1) {
120 out <<
"1 input device";
122 out << _devices.size() <<
" input devices";
131write(std::ostream &out,
int indent_level)
const {
136 InputDevices::const_iterator it;
137 for (it = _devices.begin(); it != _devices.end(); ++it) {
138 (*it)->output(
indent(out, indent_level));
void sort()
Maps to sort_unique().
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.