Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members Related Pages

# SaveC.h

    00001 //-------------------------------------------------------------------------
    00002 //
    00003 // File:        SaveC.h
    00004 // Desc:        Output stream class.
    00005 // Author:      memon <memon@inside.org>
    00006 //
    00007 //-------------------------------------------------------------------------
    00008 //  Copyright (c) 2000-2002 Moppi Productions. All Rights Reserved.
    00009 //  This file is part of Moppi Demopaja SDK. For conditions of
    00010 //  distribution and use, see the accompanying license.txt file.
    00011 //  http://moppi.inside.org/demopaja/
    00012 //-------------------------------------------------------------------------
    00013
    00014 #ifndef __DEMOPAJA_SAVEC_H__
    00015 #define __DEMOPAJA_SAVEC_H__
    00016
    00017 #define FILEIO_DONT_INCLUDE_STREAMS
    00018 #include "PajaTypes.h"
    00019 #include "FileIO.h"
    00020 #include <stdio.h>
    00021 #include <vector>
    00022
    00023 namespace FileIO {
    00024
    00026
    00061     class SaveC
    00062     {
    00063     public:
    00065         SaveC();
    00067         virtual ~SaveC();
    00068
    00070
    00078         virtual PajaTypes::uint32   open( const char* szName, const PajaTypes::int8* pSignature, PajaTypes::int32 i32SignatureSize );
    00079
    00081         virtual PajaTypes::uint32   close();
    00082
    00084
    00106         virtual PajaTypes::uint32   begin_chunk( PajaTypes::uint32 ui32ID, PajaTypes::uint32 ui32Version );
    00107
    00109
    00112         virtual PajaTypes::uint32   end_chunk();
    00113
    00115
    00119         virtual PajaTypes::uint32   write( const void* pBuffer, PajaTypes::uint32 ui32Len );
    00120
    00122
    00123         virtual PajaTypes::uint32   write_str( const char* szStr );
    00124
    00126         virtual PajaTypes::uint32   get_error();
    00127
    00128     private:
    00129
    00130         FILE*                           m_pStream;
    00131
    00132         PajaTypes::uint32               m_ui32Error;
    00133         PajaTypes::int32                m_i32StartPos;
    00134         PajaTypes::int32                m_i32CurrPos;
    00135
    00136         std::vector<PajaTypes::int32>   m_rStartPosList;
    00137         PajaTypes::uint32               m_i32Indent;
    00138
    00139     };
    00140
    00141 };  // namespace
    00142
    00143 #endif