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