CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Public Member Functions | List of all members
th_string_list Class Reference

Theme Hospital localised string list. More...

#include <th.h>

Public Member Functions

 th_string_list (const uint8_t *data, size_t length)
 
 th_string_list ()=delete
 
 th_string_list (const th_string_list &)=delete
 
 th_string_list (th_string_list &&)=delete
 
th_string_listoperator= (const th_string_list &)=delete
 
th_string_list && operator= (th_string_list &&)=delete
 
 ~th_string_list ()=default
 
size_t get_section_count () const
 Get the number of sections in the string list.
 
size_t get_section_size (size_t section) const
 Get the number of strings in a section of the string list.
 
const charget_string (size_t section, size_t index) const
 Get a string from the string list.
 

Detailed Description

Theme Hospital localised string list.

Presents Theme Hospital strings by section and index.

Constructor & Destructor Documentation

◆ th_string_list() [1/4]

th_string_list::th_string_list ( const uint8_t *  data,
size_t  length 
)

Construct an instance of string_list from the given data from a Theme Hosptial string file. The format of the data is described at: https://github.com/alexandergitter/theme-hospital-spec/blob/master/format-specification.md#strings

Parameters
dataA pointer to the raw data
lengthThe size of the data

◆ th_string_list() [2/4]

th_string_list::th_string_list ( )
delete

◆ th_string_list() [3/4]

th_string_list::th_string_list ( const th_string_list )
delete

◆ th_string_list() [4/4]

th_string_list::th_string_list ( th_string_list &&  )
delete

◆ ~th_string_list()

th_string_list::~th_string_list ( )
default

Member Function Documentation

◆ get_section_count()

size_t th_string_list::get_section_count ( ) const

Get the number of sections in the string list.

◆ get_section_size()

size_t th_string_list::get_section_size ( size_t  section) const

Get the number of strings in a section of the string list.

◆ get_string()

const char * th_string_list::get_string ( size_t  section,
size_t  index 
) const

Get a string from the string list.

Parameters
sectionSection index in range [0, getSectionCount() - 1]
indexString index in range [0, getSectionSize(iSection) - 1]
Returns
nullptr if the index is invalid, otherwise a UTF-8 encoded string.

◆ operator=() [1/2]

th_string_list & th_string_list::operator= ( const th_string_list )
delete

◆ operator=() [2/2]

th_string_list && th_string_list::operator= ( th_string_list &&  )
delete

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