Main Page | Class Hierarchy | Class List | File List | Class Members

init.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2001-2003 Peter J Jones (pjones@pmade.org)
00003  * All Rights Reserved
00004  * 
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 
00009  * 1. Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  * 2. Redistributions in binary form must reproduce the above copyright
00012  *    notice, this list of conditions and the following disclaimer in
00013  *    the documentation and/or other materials provided with the
00014  *    distribution.
00015  * 3. Neither the name of the Author nor the names of its contributors
00016  *    may be used to endorse or promote products derived from this software
00017  *    without specific prior written permission.
00018  * 
00019  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
00020  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
00021  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00022  * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR
00023  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00024  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00025  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00026  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00027  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00028  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00029  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00030  * SUCH DAMAGE.
00031  */
00032 
00033 /** @file
00034  * This file contains the definition of the xslt::init class.
00035 **/
00036 
00037 #ifndef _xsltwrapp_init_h_
00038 #define _xsltwrapp_init_h_
00039 
00040 // xmlwrapp includes
00041 #include <xmlwrapp/init.h>
00042 
00043 namespace xslt {
00044 
00045 /**
00046  * The xslt::init class is used to initilize the XSLT engine. For thread
00047  * safety it should be instantiated one time in the main thread before any
00048  * other threads use xsltwrapp. Non-threaded programs should instantiante a
00049  * xslt::init class before using xsltwrapp as well, at least for
00050  * consistanticy.
00051  *
00052  * If you want to use any of the xslt::init member functions, do so before
00053  * you start any threads or use any other part of xsltwrapp. The member
00054  * functions may alter global and/or static variables. In other words, this
00055  * class is not thread safe.
00056  *
00057  * Since this class is derived from the xml::init it is not neccessary to
00058  * use both classes. If you are going to be using xsltwrapp, you should only
00059  * use this class to initilize both xmlwrapp and xsltwrapp.
00060 **/
00061 class init : public xml::init {
00062 public:
00063     //####################################################################
00064     /** 
00065      * Create a new xslt::init object. This constructor will prepare the
00066      * XSLT engine parser and set some default values for the engine's
00067      * global variables.
00068      *
00069      * @author Peter Jones
00070     **/
00071     //####################################################################
00072     init (void);
00073 
00074     //####################################################################
00075     /** 
00076      * Clean up the XSLT engine. Don't let the xslt::init object go out of
00077      * scope before you are done using the xsltwrapp or xmlwrapp libraries!
00078      *
00079      * @author Peter Jones
00080     **/
00081     //####################################################################
00082     virtual ~init (void);
00083 
00084     //####################################################################
00085     /** 
00086      * This function controls whether or not the XSLT engine will process
00087      * XInclusions by default while parsing the stylesheet. The default, set
00088      * in the xslt::init constructor, is true.
00089      *
00090      * @param flag True to enable XInclusing processing; False otherwise.
00091      * @author Peter Jones
00092     **/
00093     //####################################################################
00094     void process_xincludes (bool flag);
00095 
00096 private:
00097     init (const init&);
00098     init& operator= (const init&);
00099 }; // end xslt::init class
00100     
00101 } // end xslt namespace
00102 #endif

Generated on Tue Oct 19 12:26:02 2004 for xmlwrapp by doxygen 1.3.6