Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

TXFMOutputFile.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-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  * TXFMOutputFile := Transform that outputs the byte stream to a file without changing
00021  *                            the actual data in any way
00022  *
00023  * $Id: TXFMOutputFile.hpp,v 1.9 2005/02/03 13:50:12 milan Exp $
00024  *
00025  */
00026 
00027 #ifndef TXFMOUTPUTFILE_INCLUDE
00028 #define TXFMOUTPUTFILE_INCLUDE
00029 
00030 #include <xsec/transformers/TXFMBase.hpp>
00031 
00032 #include <fstream>
00033 
00034 using std::ofstream;
00035 
00048 class DSIG_EXPORT TXFMOutputFile : public TXFMBase {
00049 
00050 private:
00051 
00052     ofstream f;
00053 
00054 public:
00055 
00056     TXFMOutputFile(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) : 
00057         TXFMBase(doc) {input = NULL;}
00058     ~TXFMOutputFile();
00059 
00060     // Methods to set the inputs
00061 
00062     void setInput(TXFMBase *newInput);
00063 
00064     // Methods to get tranform output type and input requirement
00065 
00066     virtual TXFMBase::ioType getInputType(void);
00067     virtual TXFMBase::ioType getOutputType(void);
00068     virtual TXFMBase::nodeType getNodeType(void);
00069 
00070     // Set output file
00071 
00072     bool setFile(char * const fileName);
00073 
00074     // Methods to get output data
00075 
00076     virtual unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill);
00077     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *getDocument();
00078     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getFragmentNode();
00079     virtual const XMLCh * getFragmentId();
00080     
00081 private:
00082     TXFMOutputFile();
00083 };
00084 
00085 
00086 #endif /* #define TXFMOUTPUTFILE_INCLUDE */

Generated on Sun Jul 3 17:37:26 2005 for XML-Security-C by  doxygen 1.4.2