OpenTTD Source: SQFile Class Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Private Member Functions | Private Attributes
SQFile Class Reference

## Public Member Functions
| SQFile (FileHandle file, size_t size)
StringConsumer & | GetConsumer (size_t min_size=64)
size_t | Read (void *buf, size_t max_size)

## Private Member Functions
size_t | ReadInternal (std::span< char > buf)

## Private Attributes
FileHandle | file
size_t | size
size_t | pos
std::string | buffer
StringConsumer | consumer

## Detailed Description

Definition at line 546 of file squirrel.cpp.

## Constructor & Destructor Documentation

## ◆ SQFile()

SQFile::SQFile | ( | FileHandle | file,
|  | size_t | size
| ) |  |
| inline

Definition at line 566 of file squirrel.cpp.

## Member Function Documentation

## ◆ GetConsumer()

StringConsumer & SQFile::GetConsumer | ( | size_t | min_size = `64` | ) |
| inline

Definition at line 568 of file squirrel.cpp.

## ◆ Read()

size_t SQFile::Read | ( | void * | buf,
|  | size_t | max_size
| ) |  |
| inline

Definition at line 586 of file squirrel.cpp.

## ◆ ReadInternal()

size_t SQFile::ReadInternal | ( | std::span< char > | buf | ) |
| inlineprivate

Definition at line 554 of file squirrel.cpp.

## Field Documentation

## ◆ buffer

std::string SQFile::buffer
| private

Definition at line 551 of file squirrel.cpp.

## ◆ consumer

StringConsumer SQFile::consumer
| private

Definition at line 552 of file squirrel.cpp.

## ◆ file

FileHandle SQFile::file
| private

Definition at line 548 of file squirrel.cpp.

## ◆ pos

size_t SQFile::pos
| private

Definition at line 550 of file squirrel.cpp.

## ◆ size

size_t SQFile::size
| private

Definition at line 549 of file squirrel.cpp.

The documentation for this class was generated from the following file:

- src/script/squirrel.cpp