Code

Added a bunch of comments to filter effects rendering code
[inkscape.git] / src / dom / io / base64stream.h
index ed5159b3c3fe600b69cefe4b47229f0977e28bb1..c6d0ad35d1147688648cb087711dc688d74d9121 100644 (file)
-#ifndef __DOM_IO_BASE64STREAM_H__\r
-#define __DOM_IO_BASE64STREAM_H__\r
-\r
-/**\r
- * Phoebe DOM Implementation.\r
- *\r
- * Base64-enabled input and output streams\r
- *\r
- * This class allows easy encoding and decoding\r
- * of Base64 data with a stream interface, hiding\r
- * the implementation from the user.\r
- *\r
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html\r
- *\r
- * Authors:\r
- *   Bob Jamison\r
- *\r
- * Copyright (C) 2006 Bob Jamison\r
- *\r
- *  This library is free software; you can redistribute it and/or\r
- *  modify it under the terms of the GNU Lesser General Public\r
- *  License as published by the Free Software Foundation; either\r
- *  version 2.1 of the License, or (at your option) any later version.\r
- *\r
- *  This library is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- *  Lesser General Public License for more details.\r
- *\r
- *  You should have received a copy of the GNU Lesser General Public\r
- *  License along with this library; if not, write to the Free Software\r
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
- */\r
-\r
-\r
-\r
-#include "domstream.h"\r
-\r
-\r
-namespace org\r
-{\r
-namespace w3c\r
-{\r
-namespace dom\r
-{\r
-namespace io\r
-{\r
-\r
-\r
-\r
-//#########################################################################\r
-//# B A S E 6 4     I N P U T    S T R E A M\r
-//#########################################################################\r
-\r
-/**\r
- * This class is for decoding a Base-64 encoded InputStream source\r
- *\r
- */\r
-class Base64InputStream : public BasicInputStream\r
-{\r
-\r
-public:\r
-\r
-    Base64InputStream(InputStream &sourceStream);\r
-\r
-    virtual ~Base64InputStream();\r
-\r
-    virtual int available();\r
-\r
-    virtual void close();\r
-\r
-    virtual int get();\r
-\r
-private:\r
-\r
-    int outBytes[3];\r
-\r
-    int outCount;\r
-\r
-    int padCount;\r
-\r
-    bool done;\r
-\r
-}; // class Base64InputStream\r
-\r
-\r
-\r
-\r
-//#########################################################################\r
-//# B A S E 6 4   O U T P U T    S T R E A M\r
-//#########################################################################\r
-\r
-/**\r
- * This class is for Base-64 encoding data going to the\r
- * destination OutputStream\r
- *\r
- */\r
-class Base64OutputStream : public BasicOutputStream\r
-{\r
-\r
-public:\r
-\r
-    Base64OutputStream(OutputStream &destinationStream);\r
-\r
-    virtual ~Base64OutputStream();\r
-\r
-    virtual void close();\r
-\r
-    virtual void flush();\r
-\r
-    virtual void put(XMLCh ch);\r
-\r
-    /**\r
-     * Sets the maximum line length for base64 output.  If\r
-     * set to <=0, then there will be no line breaks;\r
-     */\r
-    virtual void setColumnWidth(int val)\r
-        { columnWidth = val; }\r
-\r
-private:\r
-\r
-    void putCh(int ch);\r
-\r
-    int column;\r
-\r
-    int columnWidth;\r
-\r
-    unsigned long outBuf;\r
-\r
-    int bitCount;\r
-\r
-}; // class Base64OutputStream\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-}  //namespace io\r
-}  //namespace dom\r
-}  //namespace w3c\r
-}  //namespace org\r
-\r
-\r
-#endif /* __INKSCAPE_IO_BASE64STREAM_H__ */\r
+#ifndef __DOM_IO_BASE64STREAM_H__
+#define __DOM_IO_BASE64STREAM_H__
+
+/**
+ * Phoebe DOM Implementation.
+ *
+ * Base64-enabled input and output streams
+ *
+ * This class allows easy encoding and decoding
+ * of Base64 data with a stream interface, hiding
+ * the implementation from the user.
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ *   Bob Jamison
+ *
+ * Copyright (C) 2006 Bob Jamison
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+
+
+#include "domstream.h"
+
+
+namespace org
+{
+namespace w3c
+{
+namespace dom
+{
+namespace io
+{
+
+
+
+//#########################################################################
+//# B A S E 6 4     I N P U T    S T R E A M
+//#########################################################################
+
+/**
+ * This class is for decoding a Base-64 encoded InputStream source
+ *
+ */
+class Base64InputStream : public BasicInputStream
+{
+
+public:
+
+    Base64InputStream(InputStream &sourceStream);
+
+    virtual ~Base64InputStream();
+
+    virtual int available();
+
+    virtual void close();
+
+    virtual int get();
+
+private:
+
+    int outBytes[3];
+
+    int outCount;
+
+    int padCount;
+
+    bool done;
+
+}; // class Base64InputStream
+
+
+
+
+//#########################################################################
+//# B A S E 6 4   O U T P U T    S T R E A M
+//#########################################################################
+
+/**
+ * This class is for Base-64 encoding data going to the
+ * destination OutputStream
+ *
+ */
+class Base64OutputStream : public BasicOutputStream
+{
+
+public:
+
+    Base64OutputStream(OutputStream &destinationStream);
+
+    virtual ~Base64OutputStream();
+
+    virtual void close();
+
+    virtual void flush();
+
+    virtual int put(XMLCh ch);
+
+    /**
+     * Sets the maximum line length for base64 output.  If
+     * set to <=0, then there will be no line breaks;
+     */
+    virtual void setColumnWidth(int val)
+        { columnWidth = val; }
+
+private:
+
+    void putCh(int ch);
+
+    int column;
+
+    int columnWidth;
+
+    unsigned long outBuf;
+
+    int bitCount;
+
+}; // class Base64OutputStream
+
+
+
+
+
+
+
+}  //namespace io
+}  //namespace dom
+}  //namespace w3c
+}  //namespace org
+
+
+#endif /* __INKSCAPE_IO_BASE64STREAM_H__ */