OpenASIP  2.0
Public Member Functions | List of all members
Destroyer< T > Class Template Reference

#include <GraphUtilities.hh>

Collaboration diagram for Destroyer< T >:
Collaboration graph

Public Member Functions

 Destroyer ()
 
T * operator() (const T *element)
 

Detailed Description

template<class T>
class Destroyer< T >

Utility class. Its instances are function objects that delete the given pointer.

Use it inside std::for_each and std::transform to deallocate storage pointer to by elements in a container.

Definition at line 108 of file GraphUtilities.hh.

Constructor & Destructor Documentation

◆ Destroyer()

template<class T >
Destroyer< T >::Destroyer ( )
inline

Definition at line 110 of file GraphUtilities.hh.

110 {}

Member Function Documentation

◆ operator()()

template<class T >
T* Destroyer< T >::operator() ( const T *  element)
inline

Definition at line 111 of file GraphUtilities.hh.

111  {
112  delete element;
113  return NULL;
114  }

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