Audacity  2.3.1
Classes | Macros | Typedefs | Functions
MemoryX.h File Reference
#include <memory>
#include <cstdlib>
#include <functional>
#include <wx/utils.h>
#include <algorithm>

Go to the source code of this file.

Classes

struct  std::__make_unique_result< X >
 
struct  std::__make_unique_result< X[]>
 
class  ArrayOf< X >
 Memory.h template class for making an array of float, bool, etc. More...
 
class  ArraysOf< X >
 memory.h template class for making an array of arrays. More...
 
class  Maybe< X >
 
struct  freer
 
struct  Destroyer< T >
 
struct  Final_action< F >
 
struct  RestoreValue< T >
 
class  ValueRestorer< T >
 
struct  IteratorRange< Iterator >
 
struct  IteratorRange< Iterator >::identity< T >
 
struct  std::hash< T >
 
struct  std::hash< wxString >
 

Macros

#define safenew   new
 

Typedefs

template<typename T >
using MallocPtr = std::unique_ptr< T, freer >
 
template<typename Character = char>
using MallocString = std::unique_ptr< Character[], freer >
 
template<typename T >
using Destroy_ptr = std::unique_ptr< T, Destroyer< T >>
 

Functions

template<typename X , typename... Args>
__make_unique_result< X >
::scalar_case 
std::make_unique (Args &&...args)
 
template<typename X >
__make_unique_result< X >
::array_case 
std::make_unique (size_t count)
 
template<typename F >
Final_action< F > finally (F f)
 
template<typename T >
ValueRestorer< T > valueRestorer (T &var)
 
template<typename T >
ValueRestorer< T > valueRestorer (T &var, const T &newValue)
 
template<typename Iterator >
IteratorRange< Iterator > make_iterator_range (const Iterator &i1, const Iterator &i2)
 
template<typename Container >
IteratorRange< typename
Container::iterator > 
make_iterator_range (Container &container)
 
template<typename Container >
IteratorRange< typename
Container::const_iterator > 
make_iterator_range (const Container &container)
 

Macro Definition Documentation

#define safenew   new

Definition at line 8 of file MemoryX.h.

Referenced by Maybe< ProgressDialog >::create(), and ArrayOf< MeterUpdateMsg >::reinit().

Typedef Documentation

template<typename T >
using Destroy_ptr = std::unique_ptr<T, Destroyer<T>>

Definition at line 352 of file MemoryX.h.

template<typename T >
using MallocPtr = std::unique_ptr< T, freer >

Definition at line 330 of file MemoryX.h.

template<typename Character = char>
using MallocString = std::unique_ptr< Character[], freer >

Definition at line 336 of file MemoryX.h.

Function Documentation

template<typename F >
Final_action<F> finally ( f)

Definition at line 372 of file MemoryX.h.

373 {
374  return Final_action<F>(f);
375 }
template<typename Iterator >
IteratorRange< Iterator > make_iterator_range ( const Iterator &  i1,
const Iterator &  i2 
)
template<typename Container >
IteratorRange< typename Container::iterator > make_iterator_range ( Container &  container)

Definition at line 602 of file MemoryX.h.

603 {
604  return { container.begin(), container.end() };
605 }
template<typename Container >
IteratorRange< typename Container::const_iterator > make_iterator_range ( const Container &  container)

Definition at line 609 of file MemoryX.h.

610 {
611  return { container.begin(), container.end() };
612 }
template<typename T >
ValueRestorer< T > valueRestorer ( T &  var)
template<typename T >
ValueRestorer< T > valueRestorer ( T &  var,
const T &  newValue 
)

Definition at line 417 of file MemoryX.h.

418 { return ValueRestorer< T >{ var, newValue }; }