Xport Interface: stylesheet::iterator::iterator
Constructor for stylesheet::iterator and stylesheet::const_iterator.
stylesheet::iterator::iterator(); iterator
stylesheet::const_iterator::const_iterator(); const_iterator
Parameters
None
Remarks
Constructs a styleshet iterator or const_iterator. A
stylesheet iterator is usually initialized upon creation, normally by calling stylesheet::begin() or from a return value from one of stylesheet's
operations.
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->insert(declaration(text_align, "center"));
it->insert(declaration(css::color, "red"));
it = ss.insert(stylesheet_rule("p"));
it->insert(declaration(margin_left, "10px"));
it->insert(declaration(font_size, "10pt"));
stylesheet_formatter fmtr(std::cout);
ss.write(fmtr);
}