Tramway SDK
Public Member Functions | Public Attributes | List of all members
tram::File Class Reference

#include <file.h>

Public Member Functions

 File (char const *path, uint32_t mode)
 
 ~File ()
 
bool is_open ()
 
bool is_continue ()
 
void write_int8 (int8_t value)
 
void write_int16 (int16_t value)
 
void write_int32 (int32_t value)
 
void write_int64 (int64_t value)
 
void write_uint8 (uint8_t value)
 
void write_uint16 (uint16_t value)
 
void write_uint32 (uint32_t value)
 
void write_uint64 (uint64_t value)
 
void write_float32 (float value)
 
void write_float64 (double value)
 
void write_name (name_t value)
 
void write_string (const char *value)
 
void write_newline ()
 
int8_t read_int8 ()
 
int16_t read_int16 ()
 
int32_t read_int32 ()
 
int64_t read_int64 ()
 
uint8_t read_uint8 ()
 
uint16_t read_uint16 ()
 
uint32_t read_uint32 ()
 
uint64_t read_uint64 ()
 
float read_float32 ()
 
double read_float64 ()
 
name_t read_name ()
 
std::string_view read_string ()
 
std::string_view read_line ()
 
void skip_linebreak ()
 
void reset_flags ()
 

Public Attributes

std::string path
 
uint32_t mode
 
bool pause_next
 
char * buffer = nullptr
 
char * buffer_cursor = nullptr
 
char * buffer_end = nullptr
 
const char * cursor = nullptr
 
const char * cursor_end = nullptr
 
FileReaderdisk_reader = nullptr
 
FileWriterdisk_writer = nullptr
 

Constructor & Destructor Documentation

◆ File()

tram::File::File ( char const *  path,
uint32_t  mode 
)

◆ ~File()

tram::File::~File ( )

Member Function Documentation

◆ is_continue()

bool tram::File::is_continue ( )

◆ is_open()

bool tram::File::is_open ( )

◆ read_float32()

float tram::File::read_float32 ( )

◆ read_float64()

double tram::File::read_float64 ( )

◆ read_int16()

int16_t tram::File::read_int16 ( )

◆ read_int32()

int32_t tram::File::read_int32 ( )

◆ read_int64()

int64_t tram::File::read_int64 ( )

◆ read_int8()

int8_t tram::File::read_int8 ( )

◆ read_line()

std::string_view tram::File::read_line ( )

◆ read_name()

name_t tram::File::read_name ( )

◆ read_string()

std::string_view tram::File::read_string ( )

◆ read_uint16()

uint16_t tram::File::read_uint16 ( )

◆ read_uint32()

uint32_t tram::File::read_uint32 ( )

◆ read_uint64()

uint64_t tram::File::read_uint64 ( )

◆ read_uint8()

uint8_t tram::File::read_uint8 ( )

◆ reset_flags()

void tram::File::reset_flags ( )

◆ skip_linebreak()

void tram::File::skip_linebreak ( )

◆ write_float32()

void tram::File::write_float32 ( float  value)

◆ write_float64()

void tram::File::write_float64 ( double  value)

◆ write_int16()

void tram::File::write_int16 ( int16_t  value)

◆ write_int32()

void tram::File::write_int32 ( int32_t  value)

◆ write_int64()

void tram::File::write_int64 ( int64_t  value)

◆ write_int8()

void tram::File::write_int8 ( int8_t  value)

◆ write_name()

void tram::File::write_name ( name_t  value)

◆ write_newline()

void tram::File::write_newline ( )

◆ write_string()

void tram::File::write_string ( const char *  value)

◆ write_uint16()

void tram::File::write_uint16 ( uint16_t  value)

◆ write_uint32()

void tram::File::write_uint32 ( uint32_t  value)

◆ write_uint64()

void tram::File::write_uint64 ( uint64_t  value)

◆ write_uint8()

void tram::File::write_uint8 ( uint8_t  value)

Member Data Documentation

◆ buffer

char* tram::File::buffer = nullptr

◆ buffer_cursor

char* tram::File::buffer_cursor = nullptr

◆ buffer_end

char* tram::File::buffer_end = nullptr

◆ cursor

const char* tram::File::cursor = nullptr

◆ cursor_end

const char* tram::File::cursor_end = nullptr

◆ disk_reader

FileReader* tram::File::disk_reader = nullptr

◆ disk_writer

FileWriter* tram::File::disk_writer = nullptr

◆ mode

uint32_t tram::File::mode

◆ path

std::string tram::File::path

◆ pause_next

bool tram::File::pause_next

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