LLChangeChannel Class Reference

This class changes the channel of segments in the buffer. More...

#include <llioutil.h>

List of all members.

Public Member Functions

 LLChangeChannel (S32 is, S32 becomes)
 Constructor for iterating over a segment range to change channel.
void operator() (LLSegment &segment)
 Do the work of changing the channel.

Protected Attributes

S32 mIs
S32 mBecomes


Detailed Description

This class changes the channel of segments in the buffer.

See also:
LLBufferArray
This class is useful for iterating over the segments in a buffer array and changing each channel that matches to a different channel. Example: set_in_to_out(LLChannelDescriptors channels, LLBufferArray* buf) { std::for_each( buf->beginSegment(), buf->endSegment(), LLChangeChannel(channels.in(), channels.out())); }

Definition at line 155 of file llioutil.h.


Constructor & Destructor Documentation

LLChangeChannel::LLChangeChannel ( S32  is,
S32  becomes 
)

Constructor for iterating over a segment range to change channel.

Parameters:
is The channel to match when looking at a segment.
becomes The channel to set the segment when a match is found.

Definition at line 87 of file llioutil.cpp.


Member Function Documentation

void LLChangeChannel::operator() ( LLSegment segment  ) 

Do the work of changing the channel.

Definition at line 93 of file llioutil.cpp.

References LLSegment::isOnChannel(), mBecomes, mIs, and LLSegment::setChannel().


Member Data Documentation

S32 LLChangeChannel::mBecomes [protected]

Definition at line 173 of file llioutil.h.

Referenced by operator()().

S32 LLChangeChannel::mIs [protected]

Definition at line 172 of file llioutil.h.

Referenced by operator()().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:12 2010 for Second Life Viewer by  doxygen 1.4.7