libzeep

PrevUpHomeNext

Class tag_processor

zeep::http::tag_processor — Abstract base class for tag_processor.

Synopsis

// In header: <zeep/http/tag-processor.hpp>


class tag_processor {
public:
  // construct/copy/destruct
  tag_processor(const tag_processor &) = delete;
  tag_processor(const char *);
  tag_processor & operator=(const tag_processor &) = delete;
  ~tag_processor();

  // public member functions
  virtual void 
  process_xml(xml::node *, const scope &, std::filesystem::path, 
              basic_template_processor &) = 0;
};

Description

Note that this class should be light in construction, we create it every time a page is rendered.

tag_processor public construct/copy/destruct

  1. tag_processor(const tag_processor &) = delete;
  2. tag_processor(const char * ns);
    constructor

    Parameters:

    ns

    Then XML namespace for the tags and attributes that are processed by this tag_processor

  3. tag_processor & operator=(const tag_processor &) = delete;
  4. ~tag_processor();

tag_processor public member functions

  1. virtual void 
    process_xml(xml::node * node, const scope & scope, std::filesystem::path dir, 
                basic_template_processor & loader) = 0;
    process xml parses the XHTML and fills in the special tags and evaluates the el constructs

    This function is called to modify the xml tree in node

    Parameters:

    dir

    The path to the docroot, the directory containing the XHTML templates

    node

    The XML zeep::xml::node (element) to manipulate

    scope

    The zeep::http::scope containing the variables and request


PrevUpHomeNext