---
name: "ACE_Service_Repository_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_Service_Repository_Iterator"
---

# ACE\_Service\_Repository\_Iterator(3)

Iterate through the ACE\_Service\_Repository.

## NAME

ACE\_Service\_Repository\_Iterator -  Iterate through the ACE\_Service\_Repository.

## SYNOPSIS

```
#include <ace/Service_Repository.h>
class ACE_Service_Repository_Iterator
{
  public:
    ACE_Service_Repository_Iterator (
        ACE_Service_Repository &sr,
        int ignored_suspended = 1
        );
    ~ACE_Service_Repository_Iterator (void);
    int next (const ACE_Service_Type *&next_item);
    int done (void) const;
    int advance (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    ACE_Service_Repository &svc_rep_;
    int next_;
    int ignore_suspended_;
};
```

## DESCRIPTION

Make sure not to delete entries as the iteration is going on since this class is not designed as a robust iterator.

## Initialization and termination methods.

```
ACE_Service_Repository_Iterator (
    ACE_Service_Repository &sr,
    int ignored_suspended = 1
    );
```

Constructor.

```
~ACE_Service_Repository_Iterator (void);
```

Destructor.

## Iteration methods.

```
int next (const ACE_Service_Type *&next_item);
```

Pass back the next\_item that hasn't been seen in the set. Returns 0 when all items have been seen, else 1.

```
int done (void) const;
```

Returns 1 when all items have been seen, else 0.

```
int advance (void);
```

Move forward by one element in the set.  Returns 0 when all the items in the set have been seen, else 1.

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

Dump the state of an object.

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
