96 LogOutputList* _list;
97 Iterator(LogOutputList* list, LogOutputNode* start) : _current(start), _list(list) {
98 }
99
100 public:
101 ~Iterator() {
102 _list->decrease_readers();
103 }
104
105 LogOutput* operator*() {
106 return _current->_value;
107 }
108
109 void operator++(int) {
110 _current = _current->_next;
111 }
112
113 bool operator!=(const LogOutputNode *ref) const {
114 return _current != ref;
115 }
116 };
117
118 Iterator iterator(LogLevelType level = LogLevel::Last) {
119 increase_readers();
120 return Iterator(this, _level_start[level]);
121 }
122
123 LogOutputNode* end() const {
124 return NULL;
125 }
126 };
127
128 #endif // SHARE_VM_LOGGING_LOGOUTPUTLIST_HPP
|
96 LogOutputList* _list;
97 Iterator(LogOutputList* list, LogOutputNode* start) : _current(start), _list(list) {
98 }
99
100 public:
101 ~Iterator() {
102 _list->decrease_readers();
103 }
104
105 LogOutput* operator*() {
106 return _current->_value;
107 }
108
109 void operator++(int) {
110 _current = _current->_next;
111 }
112
113 bool operator!=(const LogOutputNode *ref) const {
114 return _current != ref;
115 }
116
117 LogLevelType level() const {
118 return _current->_level;
119 }
120 };
121
122 Iterator iterator(LogLevelType level = LogLevel::Last) {
123 increase_readers();
124 return Iterator(this, _level_start[level]);
125 }
126
127 LogOutputNode* end() const {
128 return NULL;
129 }
130 };
131
132 #endif // SHARE_VM_LOGGING_LOGOUTPUTLIST_HPP
|