#include "dcp_assert.h"
#include "compose.hpp"
#include <libxml/parser.h>
+#include <boost/foreach.hpp>
using std::string;
using std::stringstream;
root->add_child("RatingList");
xmlpp::Element* reel_list = root->add_child ("ReelList");
-
- for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) {
- (*i)->write_to_cpl (reel_list, standard);
+
+ BOOST_FOREACH (shared_ptr<Reel> i, _reels) {
+ i->write_to_cpl (reel_list, standard);
}
if (signer) {
{
list<shared_ptr<const ReelAsset> > c;
- for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) {
- if ((*i)->main_picture ()) {
- c.push_back ((*i)->main_picture());
+ BOOST_FOREACH (shared_ptr<Reel> i, _reels) {
+ if (i->main_picture ()) {
+ c.push_back (i->main_picture());
}
- if ((*i)->main_sound ()) {
- c.push_back ((*i)->main_sound());
+ if (i->main_sound ()) {
+ c.push_back (i->main_sound());
}
- if ((*i)->main_subtitle ()) {
- c.push_back ((*i)->main_subtitle());
+ if (i->main_subtitle ()) {
+ c.push_back (i->main_subtitle());
}
}
bool
CPL::encrypted () const
{
- for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) {
- if ((*i)->encrypted ()) {
+ BOOST_FOREACH (shared_ptr<Reel> i, _reels) {
+ if (i->encrypted ()) {
return true;
}
}
void
CPL::add (DecryptedKDM const & kdm)
{
- for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) {
- (*i)->add (kdm);
+ BOOST_FOREACH (shared_ptr<Reel> i, _reels) {
+ i->add (kdm);
}
}
void
CPL::resolve_refs (list<shared_ptr<Object> > objects)
{
- for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) {
- (*i)->resolve_refs (objects);
+ BOOST_FOREACH (shared_ptr<Reel> i, _reels) {
+ i->resolve_refs (objects);
}
}