Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

valuesstreamer.hpp

Go to the documentation of this file.
00001 #if !defined(_VALUESSTREAMER_HPP)
00002 #define _VALUESSTREAMER_HPP
00003 //============================================================================= 
00004 //
00005 // XDFLengine library
00006 //
00007 //----------------------------------------------------------------------------- 
00008 //  ***CLASSNAME***.HPP
00009 //----------------------------------------------------------------------------- 
00015 //_____________________________________________________________________________
00016 //
00017 //  Copyright (C) 2003 Guillaume Baurand. All Rights Reserved.
00018 //
00019 //  This file is part of the XDFLengine project.
00020 //
00021 //  The XDFLengine is free software; you can redistribute it and/or modify
00022 //  it under the terms of the GNU General Public License as published by
00023 //  the Free Software Foundation; either version 2 of the License, or
00024 //  (at your option) any later version.
00025 //
00026 //  This program is distributed in the hope that it will be useful,
00027 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00028 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00029 //  GNU General Public License for more details.
00030 //
00031 //  You should have received a copy of the GNU General Public License
00032 //  along with this program; if not, write to the Free Software
00033 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
00034 //  USA.
00035 //
00036 //  For more information, 
00037 //      contact  : guillaume@baurand.net 
00038 //      or visit : http://xdflengine.sourceforge.net
00039 //
00040 //=============================================================================  
00041 
00042 #   include "config/commonincs.hpp"
00043 #   include "processor/xmlstreamerfactory.hpp"
00044 
00045 BEGIN_XDFLENGINE_NS
00046 
00047 class XMLProcessor;
00048 
00049 //============================================================================= 
00050 //  CLASS VALUESFACTORY
00051 //----------------------------------------------------------------------------- 
00053 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00054 class XDFLENGINE_EXPORT ValuesStreamerFactory:public XMLStreamerFactory
00055 {
00056 
00057     public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00058 
00059         //_____________________________________________________________________
00060         //  GETSTREAMER
00061         //---------------------------------------------------------------------
00062         XMLStreamer* getStreamer(StreamerParams* p_pParameters, XMLFlowContext* p_pStreamContext, XMLStreamConsumer* p_pStreamConsumer) const;
00063 };
00064 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00065 //=============================================================================
00066 
00067 //============================================================================= 
00068 //  CLASS _VALUESFACTORY
00069 //----------------------------------------------------------------------------- 
00071 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00072 class XDFLENGINE_EXPORT _ValuesStreamerFactory:public XMLStreamerFactory
00073 {
00074 
00075     public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00076 
00077         //_____________________________________________________________________
00078         //  GETSTREAMER
00079         //---------------------------------------------------------------------
00080         XMLStreamer* getStreamer(StreamerParams* p_pParameters, XMLFlowContext* p_pStreamContext, XMLStreamConsumer* p_pStreamConsumer) const;
00081 };
00082 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00083 //=============================================================================
00084 
00085 
00086 //============================================================================= 
00087 //  CLASS SAXValuesHandler
00088 //----------------------------------------------------------------------------- 
00090 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00091 class XDFLENGINE_EXPORT SAXValuesHandler : public ContentHandler
00092 {
00093 
00094     private: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00095         
00096         XMLFlowContext*         m_pContext;             
00097         char*                   m_pszSep;               
00098         char*                   m_pszFilter;            
00099         bool                    m_fValues;              
00100         bool                    m_fCount;               
00101         bool                    m_fList;                
00102 
00103         VAarray<char*>          m_vaValues;             
00104 
00105     public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00106 
00107 
00108     // CONSTRUCTOR & DESTRUCTOR
00109 
00110         //_____________________________________________________________________
00111         //  SAXVALUESHANDLER
00112         //---------------------------------------------------------------------
00114         //_____________________________________________________________________
00115         SAXValuesHandler(StreamerParams* p_pParameters, XMLFlowContext* p_pContext);     
00116 
00117 
00118         //_____________________________________________________________________
00119         //  ~SAXVALUESHANDLER
00120         //---------------------------------------------------------------------
00122         //_____________________________________________________________________
00123         ~SAXValuesHandler();
00124          
00125     // CONTENTHANDLER
00126 
00127         //____________________________________________________________________
00128         //  STARTELEMENT
00129         //--------------------------------------------------------------------
00136         //_____________________________________________________________________ 
00137         void startElement(  const XMLCh* const uri,  const XMLCh* const localname,   const XMLCh* const qname, const Attributes& attrs);
00138 
00139         //____________________________________________________________________
00140         //  CHARACTERS
00141         //--------------------------------------------------------------------
00146         //_____________________________________________________________________ 
00147         void characters(  const XMLCh* const chars,   const unsigned int length);
00148 
00149         //____________________________________________________________________
00150         //  ENDELEMENT
00151         //--------------------------------------------------------------------
00157         //_____________________________________________________________________ 
00158         void endElement (  const XMLCh* const uri,   const XMLCh* const localname,   const XMLCh* const qname);
00159 
00160         // Not implemented
00161         void startDocument (){};
00162         void endDocument (){};
00163         void startPrefixMapping ( const XMLCh* const prefix,const XMLCh* const uri){};
00164         void endPrefixMapping ( const XMLCh* const prefix){};
00165         void processingInstruction ( const XMLCh* const target, const XMLCh* const data){};
00166         void ignorableWhitespace ( const XMLCh* const chars, const unsigned int length){};
00167         void setDocumentLocator ( const Locator* const locator) {};
00168         void skippedEntity ( const XMLCh* const name){};
00169 
00170 };
00171 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00172 //=============================================================================
00173 
00174 END_XDFLENGINE_NS
00175 
00176 #endif
00177 

Generated on Sat Oct 4 13:20:02 2003 for XDFLengine by doxygen1.3-rc2