---
name: "ACE_Handle_Set_Iterator"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Handle_Set_Iterator"
---

# ACE\_Handle\_Set\_Iterator(3)

Iterator for the ACE\_Handle\_Set abstraction.

## NAME

ACE\_Handle\_Set\_Iterator -  Iterator for the ACE\_Handle\_Set abstraction.

## SYNOPSIS

```
#include <ace/Handle_Set.h>
class ACE_Handle_Set_Iterator
{
  public:
    ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs);
    ~ACE_Handle_Set_Iterator (void);
    ACE_HANDLE operator () (void);
    void operator++ (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    const ACE_Handle_Set &handles_;
    u_int handle_index_;
    int handle_index_;
    int handle_index_;
    u_long oldlsb_;
    int word_num_;
    int word_max_;
    fd_mask word_val_;
    u_long word_val_;
};
```

## PUBLIC MEMBERS

```
ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs);
```

Constructor.

```
~ACE_Handle_Set_Iterator (void);
```

Default dtor.

```
ACE_HANDLE operator () (void);
```

"Next" operator.  Returns the next unseen ACE\_HANDLE in the Handle\_Set up to handle\_set\_.max\_handle\_).  When all the handles have been seen returns ACE\_INVALID\_HANDLE.  Advances the iterator automatically, so you need not call operator++ (which is now obsolete).

```
void operator++ (void);
```

This is a no-op and no longer does anything.  It's only here for backwards compatibility.

```
void dump (void) const;
```

Dump the state of an object.

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## PRIVATE MEMBERS

```
const ACE_Handle_Set &handles_;
```

The Handle\_Set we are iterating through.

```
u_int handle_index_;
```

```
int handle_index_;
```

```
int handle_index_;
```

```
u_long oldlsb_;
```

```
int word_num_;
```

Number of the word we're iterating over (typically between 0..7).

```
int word_max_;
```

Number max of the words with a possible bit on.

```
fd_mask word_val_;
```

Value of the bits in the word we're iterating on.

```
u_long word_val_;
```

Value of the bits in the word we're iterating on.

## AUTHOR

Douglas C. Schmidt schmidt@cs.wustl.edu

## LIBRARY

ace
