---
name: "ACE_Service_Type_Impl"
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_Type_Impl"
---

# ACE\_Service\_Type\_Impl(3)

The abstract base class of the hierarchy that defines the contents of the ACE\_Service\_Repository. The subclasses of this class allow the configuration of ACE\_Service\_Objects, ACE\_Modules, and ACE\_Streams.

## NAME

ACE\_Service\_Type\_Impl -  The abstract base class of the hierarchy that defines the contents of the ACE\_Service\_Repository.  The subclasses of this class allow the configuration of ACE\_Service\_Objects, ACE\_Modules, and ACE\_Streams.

## SYNOPSIS

```
#include <ace/Service_Types.h>
class ACE_Service_Type_Impl
{
  public:
    ACE_Service_Type_Impl (
        void *object,
        const ASYS_TCHAR *s_name,
        u_int flags = 0,
        ACE_Service_Object_Exterminator gobbler = 0
        );
    virtual ~ACE_Service_Type_Impl (void);
    virtual int suspend (void) const = 0;
    virtual int resume (void) const = 0;
    virtual int init (int argc, ASYS_TCHAR *argv[]) const = 0;
    virtual int fini (void) const;
    virtual int info (ASYS_TCHAR **str, size_t len) const = 0;
    void *object (void) const;
    const ASYS_TCHAR *name (void) const;
    void name (const ASYS_TCHAR *);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  protected:
    const ASYS_TCHAR *name_;
    void *obj_;
    ACE_Service_Object_Exterminator gobbler_;
    u_int flags_;
};
```

## DESCRIPTION

This class provides the root of the implementation hierarchy of the "Bridge" pattern.  It maintains a pointer to the appropriate type of service implementation, i.e., ACE\_Service\_Object, ACE\_Module, or ACE\_Stream.

## Initialization and termination methods.

```
ACE_Service_Type_Impl (
    void *object,
    const ASYS_TCHAR *s_name,
    u_int flags = 0,
    ACE_Service_Object_Exterminator gobbler = 0
    );
```

```
virtual ~ACE_Service_Type_Impl (void);
```

## Pure virtual interface (must be defined by the subclass).

```
virtual int suspend (void) const = 0;
```

```
virtual int resume (void) const = 0;
```

```
virtual int init (int argc, ASYS_TCHAR *argv[]) const = 0;
```

```
virtual int fini (void) const;
```

```
virtual int info (ASYS_TCHAR **str, size_t len) const = 0;
```

```
void *object (void) const;
```

The pointer to the service.

```
const ASYS_TCHAR *name (void) const;
```

Get the name of the service.

```
void name (const ASYS_TCHAR *);
```

Set the name of the service.

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

Dump the state of an object.

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
