Coin Logo http://www.sim.no/
http://www.coin3d.org/

A class for managing a pointer first-in, first-out queue. More...

#include <Inventor/threads/SbFifo.h>

Public Member Functions

void assign (void *ptr, uint32_t type)
 
void retrieve (void *&ptr, uint32_t &type)
 
SbBool tryRetrieve (void *&ptr, uint32_t &type)
 
unsigned int size (void) const
 
void lock (void) const
 
void unlock (void) const
 
SbBool peek (void *&item, uint32_t &type) const
 
SbBool contains (void *item) const
 
SbBool reclaim (void *item)
 

Detailed Description

A class for managing a pointer first-in, first-out queue.

Member Function Documentation

◆ assign()

void SbFifo::assign ( void * ptr,
uint32_t type )
inline

Puts pointer ptr of type type into the fifo.

The type argument is just meant as a user data tag, and a 0 value can be given as the type argument if type data is uninteresting.

◆ retrieve()

void SbFifo::retrieve ( void *& ptr,
uint32_t & type )
inline

Reads a pointer from the queue. Blocks until a pointer is available for reading.

◆ tryRetrieve()

SbBool SbFifo::tryRetrieve ( void *& ptr,
uint32_t & type )
inline

Tries to read a pointer from the queue. If no data can be read, FALSE is returned, and TRUE otherwise. The function does not block.

◆ size()

unsigned int SbFifo::size ( void ) const
inline

Returns number of pointers currently in the queue.

◆ lock()

void SbFifo::lock ( void ) const
inline

Blocks until the queue can be locked.

◆ unlock()

void SbFifo::unlock ( void ) const
inline

Unlocks the queue.

◆ peek()

SbBool SbFifo::peek ( void *& item,
uint32_t & type ) const
inline

Peeks at the head item of the queue without removing it. In the case where the fifo is empty, FALSE is returned.

The queue must be locked with SbFifo::lock() before using this function, then unlocked.

◆ contains()

SbBool SbFifo::contains ( void * item) const
inline

Returns TRUE or FALSE depending on whether the item is in the queue.

The queue must be locked with SbFifo::lock() before using this function, then unlocked.

◆ reclaim()

SbBool SbFifo::reclaim ( void * item)
inline

This function removes the given item from the queue. Returns TRUE or FALSE depending on whether the item was in the queue in the first place.

The queue must be locked with SbFifo::lock() before using this function, then unlocked.


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

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.