gstreamermm: Gst::AtomicQueue< T > Class Template Reference

gstreamermm 1.10.0

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gst::AtomicQueue< T > Class Template Reference

The Gst::AtomicQueue object implements a queue that can be used from multiple threads without performing any blocking operations. More...

`#include <gstreamermm/atomicqueue.h>`

## Public Member Functions
void | reference () const
| Increment the reference count for this object. More...
void | unreference () const
| Decrement the reference count for this object. More...
const GstAtomicQueue* | gobj () const
| Provides access to the underlying C instance. More...
GstAtomicQueue* | gobj ()
| Provides access to the underlying C instance. More...
GstAtomicQueue* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
guint | length ()
| Get the amount of items in the queue. More...
guint | length () const
| Get the amount of items in the queue. More...
void | push (const T& data)
| Append data to the tail of the queue. More...
T | peek ()
| Peek the head element of the queue without removing it from the queue. More...
T | pop ()
| Get the head element of the queue. More...

## Static Public Member Functions
static Glib::RefPtr< Gst::AtomicQueue< T > > | create (guint initial_size)

## Protected Member Functions
| AtomicQueue ()
void | operator delete (void*, std::size_t)

## Related Functions
(Note that these are not member functions.)
template<typename T >
Glib::RefPtr< Gst::AtomicQueue< T > > | wrap (GstAtomicQueue* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Detailed Description

### template<typename T>
class Gst::AtomicQueue< T >

The Gst::AtomicQueue object implements a queue that can be used from multiple threads without performing any blocking operations.

## Constructor & Destructor Documentation

## ◆ AtomicQueue()

template <typename T >

Gst::AtomicQueue< T >::AtomicQueue | ( |  | ) |
| protected

## Member Function Documentation

## ◆ create()

template <typename T >

static Glib::RefPtr<Gst::AtomicQueue<T> > Gst::AtomicQueue< T >::create | ( | guint | initial_size | ) |
| inlinestatic

## ◆ gobj() [1/2]

template <typename T >

const GstAtomicQueue* Gst::AtomicQueue< T >::gobj | ( |  | ) | const
| inline

Provides access to the underlying C instance.

## ◆ gobj() [2/2]

template <typename T >

GstAtomicQueue* Gst::AtomicQueue< T >::gobj | ( |  | ) |
| inline

Provides access to the underlying C instance.

## ◆ gobj_copy()

template <typename T >

GstAtomicQueue* Gst::AtomicQueue< T >::gobj_copy | ( |  | ) | const
| inline

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## ◆ length() [1/2]

template <typename T >

guint Gst::AtomicQueue< T >::length | ( |  | ) |
| inline

Get the amount of items in the queue.

Returns
  The number of elements in the queue.

## ◆ length() [2/2]

template <typename T >

guint Gst::AtomicQueue< T >::length | ( |  | ) | const
| inline

Get the amount of items in the queue.

Returns
  The number of elements in the queue.

## ◆ operator delete()

template <typename T >

void Gst::AtomicQueue< T >::operator delete | ( | void * | ,
|  | std::size_t |
| ) |  |
| protected

## ◆ peek()

template <typename T >

T Gst::AtomicQueue< T >::peek | ( |  | ) |
| inline

Peek the head element of the queue without removing it from the queue.

Returns
  The head element of queue.

Exceptions

  std::runtime_error | if the queue is empty.

## ◆ pop()

template <typename T >

T Gst::AtomicQueue< T >::pop | ( |  | ) |
| inline

Get the head element of the queue.

Returns
  The head element of queue.

Exceptions

  std::runtime_error | if the queue is empty.

## ◆ push()

template <typename T >

void Gst::AtomicQueue< T >::push | ( | const T & | data | ) |
| inline

Append data to the tail of the queue.

Parameters

  data | The data.

## ◆ reference()

template <typename T >

void Gst::AtomicQueue< T >::reference | ( |  | ) | const
| inline

Increment the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## ◆ unreference()

template <typename T >

void Gst::AtomicQueue< T >::unreference | ( |  | ) | const
| inline

Decrement the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## Friends And Related Function Documentation

## ◆ wrap()

template <typename T >

Glib::RefPtr< Gst::AtomicQueue< T > > wrap | ( | GstAtomicQueue< T > * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.