ATLAS Offline Software
Loading...
Searching...
No Matches
TRTCond::NestedContainerPointerTrait< T > Class Template Reference

Default trait class if T is an owned pointer. More...

#include <NestedContainer.h>

Collaboration diagram for TRTCond::NestedContainerPointerTrait< T >:

Public Types

using pointer = T
using base_type = std::remove_pointer_t<pointer>
using const_pointer = const base_type*

Static Public Member Functions

static void erase (pointer &x)
static void copy (pointer &out, const_pointer in)
static bool isvalid (const_pointer x)
static void initialize (pointer &x)
static size_t footprint (const_pointer x)
static void print (const_pointer x)
static pointer initialvalue ()
static bool isequal (const_pointer lhs, const_pointer rhs)

Detailed Description

template<class T>
class TRTCond::NestedContainerPointerTrait< T >

Default trait class if T is an owned pointer.

Definition at line 388 of file NestedContainer.h.

Member Typedef Documentation

◆ base_type

template<class T>
using TRTCond::NestedContainerPointerTrait< T >::base_type = std::remove_pointer_t<pointer>

Definition at line 392 of file NestedContainer.h.

◆ const_pointer

template<class T>
using TRTCond::NestedContainerPointerTrait< T >::const_pointer = const base_type*

Definition at line 393 of file NestedContainer.h.

◆ pointer

template<class T>
using TRTCond::NestedContainerPointerTrait< T >::pointer = T

Definition at line 391 of file NestedContainer.h.

Member Function Documentation

◆ copy()

template<class T>
void TRTCond::NestedContainerPointerTrait< T >::copy ( pointer & out,
const_pointer in )
inlinestatic

Definition at line 395 of file NestedContainer.h.

395{ if(out) erase(out) ; if(in) out = in->clone() ; }
Default trait class if T is an owned pointer.

◆ erase()

template<class T>
void TRTCond::NestedContainerPointerTrait< T >::erase ( pointer & x)
inlinestatic

Definition at line 394 of file NestedContainer.h.

394{ delete x ; x = 0 ; }

◆ footprint()

template<class T>
size_t TRTCond::NestedContainerPointerTrait< T >::footprint ( const_pointer x)
inlinestatic

Definition at line 398 of file NestedContainer.h.

398{ return sizeof(pointer) + (x ? x->footprint() : 0) ; }
static size_t footprint(const_pointer x)

◆ initialize()

template<class T>
void TRTCond::NestedContainerPointerTrait< T >::initialize ( pointer & x)
inlinestatic

Definition at line 397 of file NestedContainer.h.

397{ x = 0 ; }

◆ initialvalue()

template<class T>
pointer TRTCond::NestedContainerPointerTrait< T >::initialvalue ( )
inlinestatic

Definition at line 400 of file NestedContainer.h.

400{ return 0 ; }

◆ isequal()

template<class T>
bool TRTCond::NestedContainerPointerTrait< T >::isequal ( const_pointer lhs,
const_pointer rhs )
inlinestatic

Definition at line 401 of file NestedContainer.h.

401{ return lhs==rhs || (lhs && rhs && *lhs==*rhs) ; }

◆ isvalid()

template<class T>
bool TRTCond::NestedContainerPointerTrait< T >::isvalid ( const_pointer x)
inlinestatic

Definition at line 396 of file NestedContainer.h.

396{ return x!=0 ; }

◆ print()

template<class T>
void TRTCond::NestedContainerPointerTrait< T >::print ( const_pointer x)
inlinestatic

Definition at line 399 of file NestedContainer.h.

399{ std::cout << x << std::endl ; }

The documentation for this class was generated from the following file: