_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes | List of all members
CFile Class Reference

#include <iolib.h>

Classes

class  PImpl
 

Public Member Functions

iolib.cpp - Compression-IO helper functions.
 CFile ()
 
 ~CFile ()
 
int open (const char *name, long flags)
 
int close ()
 
void flush ()
 
int read (void *buf, size_t len)
 
int seek (long offset, int whence)
 
long tell ()
 
SDL_RWops * as_SDL_RWops ()
 
int printf (const char *format,...) PRINTF_VAARG_ATTRIBUTE(2
 

Detailed Description

Defines a library file

Todo:
zip archive support

Constructor & Destructor Documentation

◆ CFile()

CFile::CFile ( )

◆ ~CFile()

CFile::~CFile ( )

Member Function Documentation

◆ as_SDL_RWops()

SDL_RWops * CFile::as_SDL_RWops ( )

◆ close()

int CFile::close ( )

CLclose Library file close

◆ flush()

void CFile::flush ( )

◆ open()

int CFile::open ( const char *  name,
long  flags 
)

CLopen Library file open

Parameters
nameFile name.
openflagsOpen read, or write and compression options
Returns
File Pointer

◆ printf()

int CFile::printf ( const char *  format,
  ... 
)

CLprintf Library file write

Parameters
formatString Format.
...Parameter List.

◆ read()

int CFile::read ( void buf,
size_t  len 
)

CLread Library file read

Parameters
bufPointer to read the data to.
lennumber of bytes to read.

◆ seek()

int CFile::seek ( long  offset,
int  whence 
)

CLseek Library file seek

Parameters
offsetSeek position
whenceHow to seek

◆ tell()

long CFile::tell ( )

CLtell Library file tell


The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.