- typedef UseListIteratorWrapper use_iterator;
- typedef UseListConstIteratorWrapper use_const_iterator;
-
- unsigned use_size() const { return Uses.size(); }
- bool use_empty() const { return Uses.empty(); }
- use_iterator use_begin() { return Uses.begin(); }
- use_const_iterator use_begin() const { return Uses.begin(); }
- use_iterator use_end() { return Uses.end(); }
- use_const_iterator use_end() const { return Uses.end(); }
- User *use_back() { return Uses.back().getUser(); }
- const User *use_back() const { return Uses.back().getUser(); }
+ typedef value_use_iterator<User> use_iterator;
+ typedef value_use_iterator<const User> use_const_iterator;
+
+ bool use_empty() const { return UseList == 0; }
+ use_iterator use_begin() { return use_iterator(UseList); }
+ use_const_iterator use_begin() const { return use_const_iterator(UseList); }
+ use_iterator use_end() { return use_iterator(0); }
+ use_const_iterator use_end() const { return use_const_iterator(0); }
+ User *use_back() { return *use_begin(); }
+ const User *use_back() const { return *use_begin(); }