00001 #if !defined(_FUNCCALLSTREAMER_HPP) 00002 #define _FUNCCALLSTREAMER_HPP 00003 //============================================================================= 00004 // 00005 // XDFLengine library 00006 // 00007 //----------------------------------------------------------------------------- 00008 // FUNCCALLSTREAMER.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/xmlflow.hpp" 00044 # include "processor/xmlstreamerfactory.hpp" 00045 00046 BEGIN_XDFLENGINE_NS 00047 00048 class XMLProcessor; 00049 00050 //============================================================================= 00051 // CLASS FUNCCALLSTREAMER 00052 //----------------------------------------------------------------------------- 00054 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00055 class XDFLENGINE_EXPORT FuncCallStreamer:public XMLStreamer 00056 { 00057 00058 private: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00059 00060 XMLStreamBuffer* m_pScriptParamBuffer; 00061 00062 00063 public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00064 00065 00066 // CONSTRUCTOR & DESTRUCTOR 00067 00068 //_____________________________________________________________________ 00069 // FuncCallStreamer 00070 //--------------------------------------------------------------------- 00071 FuncCallStreamer( const XMLStreamerFactory* p_pParent, StreamerParams* p_pParameters, XMLFlowContext* p_pContext, XMLStreamConsumer* p_pOutput); 00072 00073 //_____________________________________________________________________ 00074 // ~FuncCallStreamer 00075 //--------------------------------------------------------------------- 00076 ~FuncCallStreamer(); 00077 00078 // STREAM 00079 00080 //_____________________________________________________________________ 00081 // INITSTREAM 00082 //--------------------------------------------------------------------- 00083 bool initStream(); 00084 00085 //_____________________________________________________________________ 00086 // WRITEDATA 00087 //--------------------------------------------------------------------- 00088 void writeData( const char* p_pszData, unsigned int p_uiDataLen); 00089 00090 //_____________________________________________________________________ 00091 // COMMITSTREAM 00092 //--------------------------------------------------------------------- 00093 bool commitStream(bool p_fFinal); 00094 00095 00096 00097 }; 00098 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00099 //============================================================================= 00100 00101 //============================================================================= 00102 // CLASS FUNCCALLSTREAMERFACTORY 00103 //----------------------------------------------------------------------------- 00105 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00106 class XDFLENGINE_EXPORT FuncCallStreamerFactory:public XMLStreamerFactory 00107 { 00108 protected: 00109 VAarray< RootStreamNode*> m_pvaScriptCache; 00110 00111 00112 public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00113 00114 ~FuncCallStreamerFactory(); 00115 00116 //_____________________________________________________________________ 00117 // GETSTREAMER 00118 //--------------------------------------------------------------------- 00119 XMLStreamer* getStreamer(StreamerParams* p_pParameters, XMLFlowContext* p_pStreamContext, XMLStreamConsumer* p_pStreamConsumer) const; 00120 00121 // CACHE METHOD 00122 00123 //_____________________________________________________________________ 00124 // cacheScript 00125 //--------------------------------------------------------------------- 00126 void cacheScript( RootStreamNode* p_pRootNode, const char* p_pszCacheName ); 00127 00128 //_____________________________________________________________________ 00129 // getCachedScript 00130 //--------------------------------------------------------------------- 00131 const RootStreamNode* getCachedScript( const char* p_pszCacheName); 00132 }; 00133 00134 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00135 //============================================================================= 00136 00137 END_XDFLENGINE_NS 00138 00139 #endif 00140