7 #define SQSTD_STREAM_TYPE_TAG 0x80000000 10 virtual ~SQStream() {}
11 virtual SQInteger Read(
void *buffer, SQInteger size) = 0;
12 virtual SQInteger Write(
void *buffer, SQInteger size) = 0;
13 virtual SQInteger Flush() = 0;
14 virtual SQInteger Tell() = 0;
15 virtual SQInteger Len() = 0;
16 virtual SQInteger Seek(SQInteger offset, SQInteger origin) = 0;
17 virtual bool IsValid() = 0;
18 virtual bool EOS() = 0;
30 SQUIRREL_API SQFILE sqstd_fopen(
const SQChar *,
const SQChar *);
31 SQUIRREL_API SQInteger sqstd_fread(SQUserPointer, SQInteger, SQInteger, SQFILE);
32 SQUIRREL_API SQInteger sqstd_fwrite(
const SQUserPointer, SQInteger, SQInteger, SQFILE);
33 SQUIRREL_API SQInteger sqstd_fseek(SQFILE , SQInteger , SQInteger);
34 SQUIRREL_API SQInteger sqstd_ftell(SQFILE);
35 SQUIRREL_API SQInteger sqstd_fflush(SQFILE);
36 SQUIRREL_API SQInteger sqstd_fclose(SQFILE);
37 SQUIRREL_API SQInteger sqstd_feof(SQFILE);
39 SQUIRREL_API SQRESULT sqstd_createfile(
HSQUIRRELVM v, SQFILE file,SQBool own);
40 SQUIRREL_API SQRESULT sqstd_getfile(
HSQUIRRELVM v, SQInteger idx, SQFILE *file);
43 SQUIRREL_API SQRESULT sqstd_loadfile(
HSQUIRRELVM v,
const SQChar *filename,SQBool printerror);
44 SQUIRREL_API SQRESULT sqstd_dofile(
HSQUIRRELVM v,
const SQChar *filename,SQBool retval,SQBool printerror);
45 SQUIRREL_API SQRESULT sqstd_writeclosuretofile(
HSQUIRRELVM v,
const SQChar *filename);
47 SQUIRREL_API SQRESULT sqstd_register_iolib(
HSQUIRRELVM v);