00001 /* 00002 * Copyright 2003-2005 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 /* 00018 * XSEC 00019 * 00020 * TXFMConcatChain := Takes multiple input chains and then provides 00021 * BYTE_STREAM output for each chain in order. 00022 * 00023 * $Id: TXFMConcatChains.hpp,v 1.3 2005/02/03 13:50:12 milan Exp $ 00024 * 00025 */ 00026 00027 #include <xsec/framework/XSECDefs.hpp> 00028 #include <xsec/transformers/TXFMBase.hpp> 00029 00030 class TXFMChain; 00031 00037 class DSIG_EXPORT TXFMConcatChains : public TXFMBase { 00038 00039 #if defined(XSEC_NO_NAMESPACES) 00040 typedef vector<TXFMChain *> TXFMChainVectorType 00041 #else 00042 typedef std::vector<TXFMChain *> TXFMChainVectorType; 00043 #endif 00044 00045 #if defined(XSEC_SIZE_T_IN_NAMESPACE_STD) 00046 typedef std::size_t size_type; 00047 #else 00048 typedef size_t size_type; 00049 #endif 00050 00051 public: 00052 00053 TXFMConcatChains(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc); 00054 ~TXFMConcatChains(); 00055 00056 // Methods to set the inputs. For the concat class, this will 00057 // append the input to the last appended chain 00058 00059 void setInput(TXFMBase *newInput); 00060 void setInput(TXFMChain *newInputChain); 00061 00062 // Methods to get tranform output type and input requirement 00063 00064 virtual TXFMBase::ioType getInputType(void); 00065 virtual TXFMBase::ioType getOutputType(void); 00066 virtual TXFMBase::nodeType getNodeType(void); 00067 00068 // Methods to get output data 00069 00070 virtual unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill); 00071 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *getDocument(); 00072 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getFragmentNode(); 00073 virtual const XMLCh * getFragmentId(); 00074 00075 private: 00076 TXFMConcatChains(); 00077 00078 TXFMChainVectorType m_chains; 00079 TXFMBase * mp_currentTxfm; 00080 size_type m_currentChain; 00081 bool m_complete; 00082 };