Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

# FLAC++/metadata.h: metadata level 2 interface
[FLAC++/metadata.h: metadata interfaces]

## Detailed Description

Level 2 metadata iterator.

The flow through the iterator in the C++ layer is similar to the C layer:

- Create a Chain instance
- Check Chain::is_valid()
- Call Chain::read() and check the return
- Traverse and/or edit with an Iterator or with Chain::merge_padding() or Chain::sort_padding()
- Write changes back to FLAC file with Chain::write()
- Destroy the Chain instance

The ownership of pointers in the C++ layer is slightly different than in the C layer, i.e.

- The objects returned by Iterator::get_block() are NOT owned by the iterator and should be deleted by the caller when finished, BUT, when you modify the block, it will directly edit what's in the chain and you do not need to call Iterator::set_block(). However the changes will not be reflected in the FLAC file until the chain is written with Chain::write().
- When you pass an object to Iterator::set_block(), Iterator::insert_block_before(), or Iterator::insert_block_after(), the iterator takes ownership of the block and it will be deleted by the chain.

See the C layer equivalent for more.

## Classes
class | FLAC::Metadata::Chain
class | FLAC::Metadata::Iterator

Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson |