ACE_TSS_Type_Adapter(3)

ACE_TSS_Type_Adapter3

Adapter that allows built-in types to be used with ace_tss.

Usage

#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_;
};

Overview

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.

Library

ace

Author

Doug Schmidt

From libace-doc 5.0.7-4 in Debian 2.2 (Potato). Parsed by carta from the page's man source.