---
name: "ACE_Dumpable_Adapter"
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_Dumpable_Adapter"
---

# ACE\_Dumpable\_Adapter(3)

This class inherits the interface of the abstract ACE\_Dumpable class and is instantiated with the implementation of the concrete component class class Concrete.

## NAME

ACE\_Dumpable\_Adapter -  This class inherits the interface of the abstract ACE\_Dumpable class and is instantiated with the implementation of the concrete component class class Concrete.

## SYNOPSIS

```
#include <ace/Dump.h>
template<class Concrete>
class ACE_Dumpable_Adapter : public ACE_Dumpable
{
  public:
    ACE_Dumpable_Adapter (const Concrete *t);
    ~ACE_Dumpable_Adapter (void);
    virtual void dump (void) const;
    Concrete *operator->() const;
  private:
    const Concrete *this_;
};
```

## DESCRIPTION

This design is similar to the Adapter and Decorator patterns from the \`\`Gang of Four'' book.  Note that class Concrete need not inherit from a common class since ACE\_Dumpable provides the uniform virtual interface!

## Initialization and termination methods.

```
ACE_Dumpable_Adapter (const Concrete *t);
```

```
~ACE_Dumpable_Adapter (void);
```

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

Concrete dump method (simply delegates to the dump method of class Concrete).

```
Concrete *operator->() const;
```

Delegate to methods in the Concrete class.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
