---
name: "ACE_TSS_Type_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_TSS_Type_Adapter"
---

# ACE\_TSS\_Type\_Adapter(3)

Adapter that allows built-in types to be used with ACE\_TSS.

## NAME

ACE\_TSS\_Type\_Adapter -  Adapter that allows built-in types to be used with ACE\_TSS.

## SYNOPSIS

```
#include <ace/Synch_T.h>
template<class TYPE>
class ACE_TSS_Type_Adapter
{
  public:
    inline ACE_TSS_Type_Adapter (const TYPE value = 0);
    operator TYPE () { return value_; };
    operator TYPE & () { return value_; };
  private:
    TYPE value_;
};
```

## DESCRIPTION

Wraps a value of a built-in type, providing conversions to and from the type.  Example use with ACE\_TSS:

  ACE\_TSSACE\_TSS\_Type\_Adapterint  i;\
   \*i = 37;\
   ACE\_OS::fprintf (stderr, "%d\\n", \*i);

Unfortunately, though, some compilers have trouble with the implicit type conversions.  This seems to work better:

  ACE\_TSSACE\_TSS\_Type\_Adapterint  i;\
   i-operator int & () = 37;\
   ACE\_OS::fprintf (stderr, "%d\\n", i-operator int ());

## PUBLIC MEMBERS

```
inline ACE_TSS_Type_Adapter (const TYPE value = 0);
```

Constructor.  Inlined here so that it should \_always\_ be inlined.

```
operator TYPE () { return value_; };
```

TYPE conversion.  Inlined here so that it should \_always\_ be inlined.

```
operator TYPE & () { return value_; };
```

TYPE & conversion.  Inlined here so that it should \_always\_ be inlined.

## PRIVATE MEMBERS

```
TYPE value_;
```

The wrapped value.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
