Audacity 3.2.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
WaveformDisplay Class Referencefinal

#include <WaveData.h>

Collaboration diagram for WaveformDisplay:
[legend]

Public Member Functions

void AppendColumns (const WaveDisplayColumn *begin, const WaveDisplayColumn *end)
 
 WaveformDisplay (int w)
 
void Allocate ()
 
 ~WaveformDisplay ()
 

Public Attributes

int width { 0 }
 
WaveDisplayColumncolumns { nullptr }
 
PixelSampleMapper mapper
 

Private Attributes

std::vector< WaveDisplayColumnownColums
 

Detailed Description

A bundle of data needed for drawing waveforms. The object may or may not own the storage for those arrays. If it does, it destroys them.

Definition at line 27 of file WaveData.h.

Constructor & Destructor Documentation

◆ WaveformDisplay()

WaveformDisplay::WaveformDisplay ( int  w)

Audacity: A Digital Audio Editor

WaveData.h

Dmitry Vedenko

Definition at line 13 of file WaveData.cpp.

14 : width(w)
15{
16}

◆ ~WaveformDisplay()

WaveformDisplay::~WaveformDisplay ( )
default

Member Function Documentation

◆ Allocate()

void WaveformDisplay::Allocate ( )

Definition at line 25 of file WaveData.cpp.

26{
27 ownColums.reserve(width);
28
29 if (width > 0)
30 columns = ownColums.data();
31}
WaveDisplayColumn * columns
Definition: WaveData.h:32
std::vector< WaveDisplayColumn > ownColums
Definition: WaveData.h:39

References columns, ownColums, and width.

◆ AppendColumns()

void WaveformDisplay::AppendColumns ( const WaveDisplayColumn begin,
const WaveDisplayColumn end 
)

Definition at line 18 of file WaveData.cpp.

20{
21 ownColums.insert(ownColums.end(), begin, end);
22 columns = ownColums.data();
23}
const char * end(const char *str) noexcept
Definition: StringUtils.h:106
const char * begin(const char *str) noexcept
Definition: StringUtils.h:101

References details::begin(), columns, details::end(), and ownColums.

Here is the call graph for this function:

Member Data Documentation

◆ columns

WaveDisplayColumn* WaveformDisplay::columns { nullptr }

Definition at line 32 of file WaveData.h.

Referenced by Allocate(), and AppendColumns().

◆ mapper

PixelSampleMapper WaveformDisplay::mapper

Definition at line 33 of file WaveData.h.

◆ ownColums

std::vector<WaveDisplayColumn> WaveformDisplay::ownColums
private

Definition at line 39 of file WaveData.h.

Referenced by Allocate(), and AppendColumns().

◆ width

int WaveformDisplay::width { 0 }

Definition at line 30 of file WaveData.h.

Referenced by Allocate().


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