CppMicroServices

C++ Micro Services: TrackedTypeTraitsBase< T, TTT > Struct Template Reference
TrackedTypeTraitsBase< T, TTT > Struct Template Reference

A base class template for type traits for objects tracked by a ServiceTracker instance. More...

Inheritance diagram for TrackedTypeTraitsBase< T, TTT >:

Public Types

typedef T TrackedType
 

Static Public Member Functions

static TrackedType ConvertToTrackedType (const InterfaceMap &)
 
static TrackedType ConvertToTrackedType (void *)
 

Detailed Description

template<class T, class TTT>
struct TrackedTypeTraitsBase< T, TTT >

A base class template for type traits for objects tracked by a ServiceTracker instance.

It provides the TrackedType typedef and two dummy method definitions.

Tracked type traits (TTT) classes must additionally provide the following methods:

  • static bool IsValid(const TrackedType& t) Returns true if t is a valid object, false otherwise.
  • static void Dispose(TrackedType& t) Clears any resources held by the tracked object t.
  • static TrackedType DefaultValue() Returns the default value for newly created tracked objects.
Template Parameters
TThe type of the tracked object.
TTTThe tracked type traits class deriving from this class.
See also
ServiceTracker

Member Typedef Documentation

template<class T, class TTT>
typedef T TrackedTypeTraitsBase< T, TTT >::TrackedType

Member Function Documentation

template<class T, class TTT>
static TrackedType TrackedTypeTraitsBase< T, TTT >::ConvertToTrackedType ( const InterfaceMap )
inlinestatic
template<class T, class TTT>
static TrackedType TrackedTypeTraitsBase< T, TTT >::ConvertToTrackedType ( void *  )
inlinestatic