# GRFText Struct Reference

Element of the linked list. More...

## Public Member Functions

void * | operator new (size_t size)
| Helper allocation function to disallow something.
void | operator delete (void *p)
| Free the memory we allocated.

## Static Public Member Functions

static GRFText * | New (byte langid, const char *text)

## Data Fields

GRFText * | next
byte | langid
char | text [VARARRAY_SIZE]

## Private Member Functions

| GRFText (byte langid_, const char *text_)
void * | operator new (size_t size, size_t extra)
| Allocate memory for this class.

## Detailed Description

Element of the linked list.

Each of those elements represent the string, but according to a different lang.

Definition at line 53 of file newgrf_text.cpp.

## Member Function Documentation

void* GRFText::operator new | ( | size_t | size | ) | `[inline]`

Helper allocation function to disallow something.

Don't allow simple 'news'; they wouldn't have enough memory.

Parameters:

  | size | the amount of space not to allocate

Definition at line 65 of file newgrf_text.cpp.

void GRFText::operator delete | ( | void * | p | ) | `[inline]`

Free the memory we allocated.

Parameters:

  | p | memory to free

Definition at line 74 of file newgrf_text.cpp.

void* GRFText::operator new | ( | size_t | size,
|  | size_t | extra |
| ) |  |  | `[inline, private]`

Allocate memory for this class.

Parameters:

  | size | the size of the instance
  | extra | the extra memory for the text

Returns:
  the requested amount of memory for both the instance and the text

Definition at line 90 of file newgrf_text.cpp.

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

- src/newgrf_text.cpp