MCPcopy Create free account
hub / github.com/catboost/catboost / TIterator

Class TIterator

util/network/socket.h:165–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164public:
165 class TIterator {
166 public:
167 inline TIterator(struct addrinfo* begin)
168 : C_(begin)
169 {
170 }
171
172 inline void Next() noexcept {
173 C_ = C_->ai_next;
174 }
175
176 inline TIterator operator++(int) noexcept {
177 TIterator old(*this);
178
179 Next();
180
181 return old;
182 }
183
184 inline TIterator& operator++() noexcept {
185 Next();
186
187 return *this;
188 }
189
190 friend inline bool operator==(const TIterator& l, const TIterator& r) noexcept {
191 return l.C_ == r.C_;
192 }
193
194 friend inline bool operator!=(const TIterator& l, const TIterator& r) noexcept {
195 return !(l == r);
196 }
197
198 inline struct addrinfo& operator*() const noexcept {
199 return *C_;
200 }
201
202 inline struct addrinfo* operator->() const noexcept {
203 return C_;
204 }
205
206 private:
207 struct addrinfo* C_;
208 };
209
210 TNetworkAddress(ui16 port);
211 TNetworkAddress(const TString& host, ui16 port);

Callers 2

BeginMethod · 0.70
EndMethod · 0.70

Calls 1

NextFunction · 0.50

Tested by

no test coverage detected