Xport Interface: stylesheet_item::iterator::operator ++
Increment operator for stylesheet_item::iterator, and stylesheet_item::const_iterator.
stylesheet_item::iterator& stylesheet_item::iterator::operator ++(); non-const pre-increment
stylesheet_item::iterator stylesheet_item::iterator::operator ++(int); non-const post-increment
stylesheet_item::const_iterator& stylesheet_item::const_iterator::operator ++() const; const pre-increment
stylesheet_item::const_iterator stylesheet_item::const_iterator::operator ++(int) const; const post-increment
Parameters
None
Remarks
Increment operator for stylesheet_item::iterator and stylesheet_item::const_iterator.
Complexity
Constant
Example
#include "xhtml_doc.h"
#include <iostream>
int main(int argc, char* argv[])
{
using namespace Xport;
stylesheet ss;
ss << stylesheet_comment("Sample stylesheet\n-----------------------------");
stylesheet::iterator it = ss.insert(stylesheet_rule("h1"));
*it << declaration(css::color, "red")
<< declaration(text_align, "left")
<< declaration(padding_left, "5px")
<< declaration(margin_top, "10px");
stylesheet_formatter fmtr(std::cout);
fmtr << ss;
std::cout << "\n\nList the stylesheet items individually.\n\n";
stylesheet_item::const_iterator sit = it->begin();
for (; sit != it->end(); ++sit) {
std::cout << sit->property_name() << ": " << sit->value() << "\n";
}
std::cout << "\n\n";
}