libktorrent  2.1.1
Public Types | Public Member Functions | List of all members
bt::SampleQueue Class Reference

#include <timeestimator.h>

Public Types

enum  { SAMPLE_COUNT_MAX = 20 }
 

Public Member Functions

int count ()
 
Uint32 first ()
 
bool isFull ()
 
Uint32 last ()
 
void push (Uint32 sample)
 
Uint32 sum ()
 

Detailed Description

Simple queue class for samples. Optimized for speed and size without possibility to dynamically resize itself.

Author
Ivan Vasic ivasi.nosp@m.c@gm.nosp@m.ail.c.nosp@m.om

Definition at line 54 of file timeestimator.h.

Member Function Documentation

◆ count()

int bt::SampleQueue::count ( )

This function will return the number of samples in queue until it counts m_size number of elements. After this point it will always return m_size since no samples are being deleted.

◆ push()

void bt::SampleQueue::push ( Uint32  sample)

Inserts new sample into the queue. The oldest sample is overwritten.

◆ sum()

Uint32 bt::SampleQueue::sum ( )

Returns the sum of all samples.


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