libzeep

PrevUpHomeNext

Class basic_template_processor

zeep::http::basic_template_processor — base class for template processors

Synopsis

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


class basic_template_processor {
public:
  // construct/copy/destruct
  ();
  ~();

  // public member functions
   ();
   () ;
   (xml::node *, scope &);
  template<typename TagProcessor> 
     ( = );
  tag_processor * () ;
   (request &, scope &, reply &);
   
  (, ) = ;
   (, ) = ;
   (, xml::document &);
   
  ();
   
  (, scope &, reply &);
   (scope &);

  // protected member functions
   
  (xml::element *, scope &, );
};

Description

template_processor is used to create XHTML web pages based on the contents of a template file and the parameters passed in the request and calculated data stored in a scope object.

basic_template_processor public construct/copy/destruct

  1. ( docroot);
  2. ~();

basic_template_processor public member functions

  1.  ( docroot);
    set the docroot for this processor
  2.  () ;
    get the current docroot of this processor
  3.  (xml::node * node, scope & scope);
    process all the tags in this node
  4. template<typename TagProcessor> 
       ( ns = );
    Use to register a new tag_processor and couple it to a namespace.
  5. tag_processor * ( ns) ;
    Create a tag_processor.
  6.  
    (request & request, scope & scope, reply & reply);
    Default handler for serving files out of our doc root.
  7.  
    ( file,  ec) = ;
    return last_write_time of file
  8.  
    ( file,  ec) = ;
    return error in ec if file was not found
  9.  ( file, xml::document & doc);
    Use load_template to fetch the XHTML template file.
  10.  
    ( file);
    Check if the argument file contains a valid reference to an XHTML template file and return the path, if any.
  11.  
    ( file, scope & scope, 
                               reply & reply);
    create a reply based on a template
  12.  (scope & scope);
    Initialize the scope object.

basic_template_processor protected member functions

  1.  
    (xml::element * node, scope & scope, 
                  registeredNamespaces);
    process only the tags with the specified namespace prefixes

PrevUpHomeNext