Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

BinaryWriter.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * バイナリライタヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef BINARY_WRITER_H_
00026 #define BINARY_WRITER_H_
00027 
00028 #include <Core/InputOutput/Writer.h>
00029 
00030 namespace Lamp{
00031 
00032 //------------------------------------------------------------------------------
00033 /**
00034  * バイナリライタ
00035  */
00036 class BinaryWriter : public Writer{
00037 public:
00038     /**
00039      * デストラクタ
00040      */
00041     virtual ~BinaryWriter();
00042 
00043     /**
00044      * boolの書き出し
00045      * @param value 書き出す値
00046      */
00047     virtual void writeBool(bool value);
00048 
00049     /**
00050      * charの書き出し
00051      * @param value 書き出す値
00052      */
00053     virtual void writeChar(char value);
00054 
00055     /**
00056      * u_charの書き出し
00057      * @param value 書き出す値
00058      */
00059     virtual void writeUChar(u_char value);
00060 
00061     /**
00062      * shortの書き出し
00063      * @param value 書き出す値
00064      */
00065     virtual void writeShort(short value);
00066 
00067     /**
00068      * u_shortの書き出し
00069      * @param value 書き出す値
00070      */
00071     virtual void writeUShort(u_short value);
00072 
00073     /**
00074      * intの書き出し
00075      * @param value 書き出す値
00076      */
00077     virtual void writeInt(int value);
00078 
00079     /**
00080      * u_intの書き出し
00081      * @param value 書き出す値
00082      */
00083     virtual void writeUInt(u_int value);
00084 
00085     /**
00086      * floatの書き出し
00087      * @param value 書き出す値
00088      */
00089     virtual void writeFloat(float value);
00090 
00091     /**
00092      * doubleの書き出し
00093      * @param value 書き出す値
00094      */
00095     virtual void writeDouble(double value);
00096 
00097     /**
00098      * Stringの書き出し
00099      *
00100      * Stringクラスをバイナリデータとして書き出します。
00101      * @param string 書き出すString
00102      */
00103     virtual void writeString(const String& string);
00104 
00105     /**
00106      * 配列の書き出し
00107      * @param array 書き出す配列
00108      * @param elementSize 要素のサイズ
00109      * @param elementCount 要素の数
00110      */
00111     virtual void writeArray(
00112         const void* array, int elementSize, int elementCount);
00113 
00114 protected:
00115     /**
00116      * コンストラクタ
00117      */
00118     BinaryWriter();
00119 
00120 private:
00121 };
00122 
00123 //------------------------------------------------------------------------------
00124 } // End of namespace Lamp
00125 #endif // End of BINARY_WRITER_H_
00126 //------------------------------------------------------------------------------

Generated on Wed Mar 16 10:29:28 2005 for Lamp by doxygen 1.3.2