Template:Struct field/doc

From SlyMods
Jump to navigation Jump to search

This is one of three helper templates for displaying struct fields on a data structure article. The templates {{Struct top}}, {{Struct field}}, and {{Struct bottom}} must always be used together to build a full table.

Usage

{{Struct top}}
{{Struct field|offset|size|type|name|description}}
{{Struct bottom}}

Example

{{Struct top}}
{{Struct field|offset=0x1c|size=0x4|type=DifficultyLevel *|name=''Difficulty level''|description=Pointer to the current difficulty level}}
{{Struct bottom}}
Offset Size Type Name Description
0x1c 0x4
DifficultyLevel *
Difficulty level Pointer to the current difficulty level

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for Struct field

A template for rows in the {{tl|Struct}} template

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
offsetoffset 1

Offset into the struct in bytes

Numbersuggested
sizesize 2

Size of the field in bytes

Numbersuggested
typetype 3

The data type of the field

Example
int, float, etc.
Stringsuggested
namename 4

The name of the field

Stringsuggested
descriptiondescription 5

Any description or notes about the field

Stringoptional

See also