00001 #if !defined(_XMLFLOW_HPP) 00002 #define _XMLFLOW_HPP 00003 //============================================================================= 00004 // 00005 // XDFLengine library 00006 // 00007 //----------------------------------------------------------------------------- 00008 // XMLFLOW.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 # include "flow/buffers/xmlbuffers.hpp" 00045 00046 00047 BEGIN_XDFLENGINE_NS 00048 00049 class XMLProcessor; 00050 00051 00052 //============================================================================= 00053 // CLASS XMLFlowNode 00054 //----------------------------------------------------------------------------- 00056 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00057 class XDFLENGINE_EXPORT XMLFlowNode 00058 { 00059 00060 public: 00061 00062 //_____________________________________________________________________ 00063 // XMLFlowNode 00064 //--------------------------------------------------------------------- 00065 XMLFlowNode(){DEBUG_CREATE(XMLFlowNode)}; 00066 00067 //_____________________________________________________________________ 00068 // ~XMLFlowNode 00069 //--------------------------------------------------------------------- 00070 virtual ~XMLFlowNode(){DEBUG_DEL(XMLFlowNode)}; 00071 00072 //_____________________________________________________________________ 00073 // streamXML 00074 //--------------------------------------------------------------------- 00075 00076 virtual void streamXML(XMLStreamConsumer* p_pStreamConsumer, XMLFlowContext* p_pStreamContext) const = 0; 00077 }; 00078 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00079 //============================================================================= 00080 00081 00082 00083 //============================================================================= 00084 // CLASS PassiveStreamNode 00085 //----------------------------------------------------------------------------- 00087 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00088 class XDFLENGINE_EXPORT PassiveStreamNode : public XMLFlowNode , public MemBuffer 00089 { 00090 private: 00091 // MemBuffer* m_pMemBuffer; 00092 00093 00094 public: 00095 00096 //_____________________________________________________________________ 00097 // PassiveStreamNode 00098 //--------------------------------------------------------------------- 00099 PassiveStreamNode(); 00100 00101 //_____________________________________________________________________ 00102 // PassiveStreamNode 00103 //--------------------------------------------------------------------- 00104 ~PassiveStreamNode(); 00105 00106 //_____________________________________________________________________ 00107 // streamXML 00108 //--------------------------------------------------------------------- 00109 void streamXML(XMLStreamConsumer* p_pStreamConsumer, XMLFlowContext* p_pStreamContext) const; 00110 }; 00111 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00112 //============================================================================= 00113 00114 typedef XDFLENGINE_EXPORT VAarray<XMLFlowNode*> VAarray_XMLFlowNode; 00115 00116 //============================================================================= 00117 // CLASS ActiveStreamNode 00118 //----------------------------------------------------------------------------- 00120 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00121 class XDFLENGINE_EXPORT ActiveStreamNode : public XMLFlowNode 00122 { 00123 00124 protected: 00125 00126 XMLStreamerFactory* m_pStreamerFactory; 00127 VAarray_XMLFlowNode m_vaChildStreamNodes; 00128 StreamerParams* m_pStreamerParams; 00129 00130 public: 00131 00132 //_____________________________________________________________________ 00133 // ActiveStreamNode 00134 //--------------------------------------------------------------------- 00135 ActiveStreamNode( XMLStreamerFactory* p_pStreamFactory, StreamerParams* p_pStreamerParams); 00136 00137 //_____________________________________________________________________ 00138 // ~ActiveStreamNode 00139 //--------------------------------------------------------------------- 00140 virtual ~ActiveStreamNode(); 00141 00142 //_____________________________________________________________________ 00143 // getParams 00144 //--------------------------------------------------------------------- 00145 StreamerParams* getParams(); 00146 00147 //_____________________________________________________________________ 00148 // appendChild 00149 //--------------------------------------------------------------------- 00150 void appendChild( XMLFlowNode* p_pChildStreamNode); 00151 00152 //_____________________________________________________________________ 00153 // streamXML 00154 //--------------------------------------------------------------------- 00155 virtual void streamXML( XMLStreamConsumer* p_pStreamConsumer, XMLFlowContext* p_pStreamContext) const; 00156 00157 //_____________________________________________________________________ 00158 // valuateParameters 00159 //--------------------------------------------------------------------- 00160 StreamerParams* valuateParameters(XMLFlowContext* p_pStreamContext,const StreamerParams* p_pStreamerParams) const; 00161 00162 }; 00163 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00164 //============================================================================= 00165 00166 00167 //============================================================================= 00168 // CLASS RootStreamNode 00169 //----------------------------------------------------------------------------- 00171 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00172 class XDFLENGINE_EXPORT RootStreamNode : public ActiveStreamNode 00173 { 00174 00175 public: 00176 00177 //_____________________________________________________________________ 00178 // RootStreamNode 00179 //--------------------------------------------------------------------- 00180 RootStreamNode(); 00181 00182 //_____________________________________________________________________ 00183 // RootStreamNode 00184 //--------------------------------------------------------------------- 00185 ~RootStreamNode(); 00186 00187 //_____________________________________________________________________ 00188 // streamXML 00189 //--------------------------------------------------------------------- 00190 void streamXML( XMLStreamConsumer* p_pStreamConsumer, XMLFlowContext* p_pStreamContext) const; 00191 }; 00192 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00193 //============================================================================= 00194 00195 END_XDFLENGINE_NS 00196 00197 #endif 00198 00199