Deep Compositing Extended

OpenDCX 2.2.2 documentation



type ChannelIdx

uint_32_t Global channel index type

static const ChannelIdx Chan_Invalid = 0

Reserved value for a non-existant channel

static const ChannelIdx Chan_Max = 1023

Reserved value for the maximum channel index allowed. (TODO: remove this in favor of varying-sized packed arrays...?)

static const ChannelIdx Chan_All = 0xffffffff

Reserved value. If this is the only ChannelIdx in a ChannelSet it indicates a set with all channels enabled (i.e. Mask_All) (TODO: ignored by most ChannelSet operations atm!)


class ChannelSet

A std::set wrapper class that acts similar to DD::Image::ChannelSet.

The set contains ChannelIdx indices. Use the foreach_channel() macro to iterate through the set (similar to Nuke’s DD::Image foreach() macro.)

class iterator

Iterator-style access to channels in set


Default constructor creates an empty set

ChannelSet::ChannelSet(const ChannelSet&)

Copy constructor

explicit ChannelSet::ChannelSet(const ChannelIdxSet&)

Constructor to initialize from a ChannelIdxSet

ChannelSet::ChannelSet(ChannelIdx a, ChannelIdx b = Chan_Invalid, ChannelIdx c = Chan_Invalid, ChannelIdx d = Chan_Invalid, ChannelIdx e = Chan_Invalid)

Constructor to initialize from a set of ChannelIdx’s (TODO: change to a C++11 initializer list)

ChannelSet &ChannelSet::operator=(const ChannelSet&)

Copy operators

void ChannelSet::clear()

Remove all channels from the mask

size_t ChannelSet::size() const

Number of channels in the mask

bool ChannelSet::empty() const

Is mask empty?

bool ChannelSet::all() const

Mask applies to all assigned ChannelIdxs. This tests for a special case where the mask contains a single Chan_All ChannelIdx.

ChannelIdxSet &ChannelSet::mask()

Read/write access to the wrapped std::set - use with caution!

iterator ChannelSet::first() const

ChannelSet::iterator access

bool ChannelSet::contains(const ChannelSet&) const

Return true if the mask includes the ChannelIdx’s

bool ChannelSet::operator==(const ChannelSet&) const

Equality operators

void ChannelSet::insert(const ChannelSet&)

Add a ChannelIdx or ChannelSet to the mask. There will only be one instance of each ChannelIdx value in the set

void ChannelSet::erase(const ChannelSet&)

Remove a ChannelIdx or ChannelSet from the mask

ChannelSet ChannelSet::operator|(const ChannelSet&)

Bitwise operators on the set

void ChannelSet::intersect(const ChannelSet&)

Intersect a ChannelIdx or ChannelSet with the mask

void ChannelSet::print(const char *prefix, std::ostream&, const ChannelContext *ctx = 0) const

Print info about the set to an output stream. If the ChannelContext is NULL only the ChannelIdx number will be printed, otherwise the channel names will.

friend std::ostream &ChannelSet::operator<<(std::ostream&, const ChannelSet&)

Outputs the ChannelIdx of the channels to the stream.