Template:Infobox class: Difference between revisions

From Unreal Wiki, The Unreal Engine Documentation Site
m using new class hierarchy template
moved template content to Template:Infobox_class/core, where it is implemented more compactly
Line 1: Line 1:
<div class="infobox infobox-class">{{Tnavbar|Infobox class|style=float:right;}}{{#if:{{{game|{{gamename}}}}}
{{Infobox class/core
|[[Image:Icon-{{{game|{{gamename}}}}}.png|{{{game|{{gamename}}}}} class]]|{{#if:{{{engine|{{ARTICLESPACE}}}}}
| c = {{{class|{{classname}}}}}
|[[Image:Icon-{{{engine|{{ARTICLESPACE}}}}}.png|{{{engine|{{ARTICLESPACE}}}}} class]]}}}}
| e = {{{engine|{{ARTICLESPACE}}}}}
{{ch|{{{parent1|}}}|{{{parent2|}}}|{{{parent3|}}}|{{{parent4|}}}|{{{parent5|}}}|{{{parent6|}}}|{{{parent7|}}}|{{{parent8|}}}|{{{parent9|}}}|{{{parent10|}}}|e={{{engine|{{ARTICLESPACE}}}}}|g={{{game|{{gamename}}}}}}}{{#if:{{{abstract|}}}|''}}'''{{{class|{{classname}}}}}'''{{#if:{{{abstract|}}}|''}} {{#if:{{{custom|}}}|''(custom)''}}</div>
| g = {{{game|{{gamename}}}}}
{{#if:{{{notoc|}}}||<div style="float:right;padding:0 0 1em 1em;">__TOC__</div>}}{{#if:{{{package|}}}|
| ge = {{#if:{{{game|{{gamename}}}}}|{{{game|{{gamename}}}}}|{{{engine|{{ARTICLESPACE}}}}}}}
;Package&#58; : {{#if:{{{custom|}}}|{{{package}}}|{{#if:{{{game|{{gamename}}}}}|[[:Category:Classes in {{{game|{{gamename}}}}} package {{{package}}}|{{{package}}}]]|{{#if:{{{engine|{{ARTICLESPACE}}}}}|[[:Category:Classes in {{{engine|{{ARTICLESPACE}}}}} package {{{package}}}|{{{package}}}]]|[[:Category:Classes in package {{{package}}}|{{{package}}}]]}}}}}}}}{{#if:{{{within|}}}|
| p = {{{package|}}}
;[[Within]] class&#58; : [[{{#if:{{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}|{{{engine|{{ARTICLESPACE}}}}}:}}{{{within}}}{{#if:{{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})}}|{{{within}}}]]}}{{#if: {{{interface1|{{{interface|}}}}}}|
| w = {{{within|}}}
;[[Implements|Implemented]] interfaces&#58; : {{links|{{{interface1|{{{interface}}}}}}|{{{interface2|}}}|{{{interface3|}}}|{{{interface4|}}}|{{{interface5|}}}|prefix={{#if:{{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}|{{{engine|{{ARTICLESPACE}}}}}:}}|suffix={{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})}}}}}}
| a = {{{abstract|}}}
{{#ifexist: Category:Classes within {{{class|{{classname}}}}}{{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})|{{#if: {{{engine|{{ARTICLESPACE}}}}}|_({{{engine|{{ARTICLESPACE}}}}})}}}}
| p1 = {{{parent1|{{{parent|}}}}}}
|;[[:Category:Classes within {{{class|{{classname}}}}}{{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})|{{#if: {{{engine|{{ARTICLESPACE}}}}}|_({{{engine|{{ARTICLESPACE}}}}})}}}}|Known classes within {{{class|{{classname}}}}}]]}}<includeonly>{{DISPLAYTITLE:{{#if:{{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}|{{{engine|{{ARTICLESPACE}}}}}:}}{{{class|{{classname}}}}} {{#if:{{{game|{{gamename}}}}}|({{{game|{{gamename}}}}})}}}}{{DEFAULTSORT:{{PAGENAME}} {{{game|}}} {{{engine|{{ARTICLESPACE}}}}}}}{{#if:{{{classpage|{{{nocat|}}}}}}||{{#if: {{{custom|}}}|[[Category:Custom {{#if: {{{game|{{gamename}}}}}|{{{game|{{gamename}}}}}-specific|{{#if: {{{engine|{{ARTICLESPACE}}}}}|{{{engine|{{ARTICLESPACE}}}}}-specific}}}} classes]]{{#if: {{{within|}}}|[[Category:Custom classes within {{{within}}}{{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})]]|{{#if: {{{engine|{{ARTICLESPACE}}}}}|_({{{engine|{{ARTICLESPACE}}}}})}}}}]]}}|{{#if: {{{game|{{gamename}}}}}|[[Category:{{{game|{{gamename}}}}}-specific classes]]|{{#if: {{{engine|{{ARTICLESPACE}}}}}|[[Category:{{{engine|{{ARTICLESPACE}}}}}-specific classes]]|[[Category:Classes]]}}}}{{#if: {{{within|}}}|[[Category:Classes within {{{within}}}{{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})|{{#if: {{{engine|{{ARTICLESPACE}}}}}|_({{{engine|{{ARTICLESPACE}}}}})}}}}]]}}{{#if: {{{package|}}}|{{#if: {{{game|{{gamename}}}}}|[[Category:Classes in {{{game|{{gamename}}}}} package {{{package}}}]]|{{#if: {{{engine|{{ARTICLESPACE}}}}}|[[Category:Classes in {{{engine|{{ARTICLESPACE}}}}} package {{{package}}}]]|[[Category:Classes in package {{{package}}}]]}}}}}}{{#ifexist:Category:Classes within {{{class|{{classname}}}}}{{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})|{{#if: {{{engine|{{ARTICLESPACE}}}}}|_({{{engine|{{ARTICLESPACE}}}}})}}}}|[[Category:Classes within {{{class|{{classname}}}}}{{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})|{{#if: {{{engine|{{ARTICLESPACE}}}}}|_({{{engine|{{ARTICLESPACE}}}}})}}}}| ]]}}}}{{#if:{{{interface1|{{{interface|}}}}}}|{{links|{{{interface1|{{{interface}}}}}}|{{{interface2|}}}|{{{interface3|}}}|{{{interface4|}}}|{{{interface5|}}}|prefix=Category:Classes implementing_|suffix={{#if: {{{game|{{gamename}}}}}|_({{{game|{{gamename}}}}})|{{#if: {{{engine|{{ARTICLESPACE}}}}}_({{{engine|{{ARTICLESPACE}}}}})}}}}|plain=1|sep=}}}}}}</includeonly><noinclude>
| p2 = {{{parent2|}}}
| p3 = {{{parent3|}}}
| p4 = {{{parent4|}}}
| p5 = {{{parent5|}}}
| p6 = {{{parent6|}}}
| p7 = {{{parent7|}}}
| p8 = {{{parent8|}}}
| p9 = {{{parent9|}}}
| p10= {{{parent10|}}}
| i1 = {{{interface1|{{{interface|}}}}}}
| i2 = {{{interface2|}}}
| i3 = {{{interface3|}}}
| i4 = {{{interface4|}}}
| i5 = {{{interface5|}}}
| custom = {{{custom|}}}
| notoc  = {{{notoc|}}}
| nocat  = {{{nocat|}}}
}}<noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 11:35, 9 May 2008

Template:Template [[Template:{{{cp10}}}|{{{cp10}}}]] >> [[Template:{{{cp9}}}|{{{cp9}}}]] >> [[Template:{{{cp8}}}|{{{cp8}}}]] >> [[Template:{{{cp7}}}|{{{cp7}}}]] >> [[Template:{{{cp6}}}|{{{cp6}}}]] >> [[Template:{{{cp5}}}|{{{cp5}}}]] >> [[Template:{{{cp4}}}|{{{cp4}}}]] >> [[Template:{{{cp3}}}|{{{cp3}}}]] >> [[Template:{{{cp2}}}|{{{cp2}}}]] >> [[Template:{{{cp1}}}|{{{cp1}}}]] >> Infobox_class (native-only)
Within class:
[[Template:{{{cw}}}|{{{cw}}}]]
Implemented interfaces:
, [[Template:{{{i6}}}|{{{i6}}}]], [[Template:{{{i7}}}|{{{i7}}}]][[Template:{{{ci1}}}|{{{ci1}}}]], [[Template:{{{ci2}}}|{{{ci2}}}]], [[Template:{{{ci3}}}|{{{ci3}}}]], [[Template:{{{ci4}}}|{{{ci4}}}]], [[Template:{{{ci5}}}|{{{ci5}}}]], [[Template:{{{ci6}}}|{{{ci6}}}]], [[Template:{{{ci7}}}|{{{ci7}}}]] [[Category:classes within {{{cw}}} (Template)]] [[Category:Classes implementing_{{{ci1}}}_(Template)]][[Category:Classes implementing_{{{ci2}}}_(Template)]][[Category:Classes implementing_{{{ci3}}}_(Template)]][[Category:Classes implementing_{{{ci4}}}_(Template)]][[Category:Classes implementing_{{{ci5}}}_(Template)]][[Category:Classes implementing_{{{ci6}}}_(Template)]][[Category:Classes implementing_{{{ci7}}}_(Template)]] [[Category:Subclasses of {{{cp1}}}_(Template)]]
[edit] Documentation

This template provides an info box for a class. The info box can contain relevant information like parent classes, implemented interfaces or the within class.

Usage

Example:

{{Infobox class
| class   = UTCheatManager
| package = UTGame
| within  = PlayerController
| game    = UT3
| engine  = UE3
| parent1 = CheatManager
| parent2 = Object
}}
UT3 Object >> CheatManager >> [[Template:{{{cp10}}}|{{{cp10}}}]] >> [[Template:{{{cp9}}}|{{{cp9}}}]] >> [[Template:{{{cp8}}}|{{{cp8}}}]] >> [[Template:{{{cp7}}}|{{{cp7}}}]] >> [[Template:{{{cp6}}}|{{{cp6}}}]] >> [[Template:{{{cp5}}}|{{{cp5}}}]] >> [[Template:{{{cp4}}}|{{{cp4}}}]] >> [[Template:{{{cp3}}}|{{{cp3}}}]] >> [[Template:{{{cp2}}}|{{{cp2}}}]] >> [[Template:{{{cp1}}}|{{{cp1}}}]] >> UTCheatManager (native-only)
Package:
UTGame
Within class:
[[Template:{{{cw}}}_(UT3)|{{{cw}}}]]
Implemented interfaces:
, [[UE3:{{{i6}}}_(UT3)|{{{i6}}}]], [[UE3:{{{i7}}}_(UT3)|{{{i7}}}]][[Template:{{{ci1}}}|{{{ci1}}}]], [[Template:{{{ci2}}}|{{{ci2}}}]], [[Template:{{{ci3}}}|{{{ci3}}}]], [[Template:{{{ci4}}}|{{{ci4}}}]], [[Template:{{{ci5}}}|{{{ci5}}}]], [[Template:{{{ci6}}}|{{{ci6}}}]], [[Template:{{{ci7}}}|{{{ci7}}}]]
This class in other games:
[[Category:classes within {{{cw}}} (UT3)]] [[Category:Classes implementing_{{{ci1}}}_(UT3)]][[Category:Classes implementing_{{{ci2}}}_(UT3)]][[Category:Classes implementing_{{{ci3}}}_(UT3)]][[Category:Classes implementing_{{{ci4}}}_(UT3)]][[Category:Classes implementing_{{{ci5}}}_(UT3)]][[Category:Classes implementing_{{{ci6}}}_(UT3)]][[Category:Classes implementing_{{{ci7}}}_(UT3)]] [[Category:Subclasses of {{{cp1}}}_(UT3)]]

If class, game or engine are missing, they are derived from the current page name. (You can see this effect in the default output on the template page.) Engine and game are only used for linking pages and categories.

The classes and interfaces in the within, parentx and interfacex parameters are automatically linked. The list of parent classes should always be given as complete as possible. For Actor-derived classes the list should start with the Actor class, otherwise it should start with the Object class. Up to ten parent classes can be specified, but if the list gets too long, consider cutting it off at a "well-known" class, like in the following example:

{{infobox class
| class      = UIComp_DrawImage
| package    = Engine
| within     = UIObject
| interface1 = UIStyleResolver
| interface2 = CustomPropertyItemHandler
| game       = UT3
| engine     = UE3
| parent1    = UIComp_DrawComponents
| parent2    = UIComponent
| parent3    = Component
}}
UT3 Component >> UIComponent >> UIComp_DrawComponents >> [[Template:{{{cp10}}}|{{{cp10}}}]] >> [[Template:{{{cp9}}}|{{{cp9}}}]] >> [[Template:{{{cp8}}}|{{{cp8}}}]] >> [[Template:{{{cp7}}}|{{{cp7}}}]] >> [[Template:{{{cp6}}}|{{{cp6}}}]] >> [[Template:{{{cp5}}}|{{{cp5}}}]] >> [[Template:{{{cp4}}}|{{{cp4}}}]] >> [[Template:{{{cp3}}}|{{{cp3}}}]] >> [[Template:{{{cp2}}}|{{{cp2}}}]] >> [[Template:{{{cp1}}}|{{{cp1}}}]] >> UIComp_DrawImage (native-only)
Package:
Engine
Within class:
[[Template:{{{cw}}}_(UT3)|{{{cw}}}]]
Implemented interfaces:
UIStyleResolver, CustomPropertyItemHandler, [[UE3:{{{i6}}}_(UT3)|{{{i6}}}]], [[UE3:{{{i7}}}_(UT3)|{{{i7}}}]], [[Template:{{{ci1}}}|{{{ci1}}}]], [[Template:{{{ci2}}}|{{{ci2}}}]], [[Template:{{{ci3}}}|{{{ci3}}}]], [[Template:{{{ci4}}}|{{{ci4}}}]], [[Template:{{{ci5}}}|{{{ci5}}}]], [[Template:{{{ci6}}}|{{{ci6}}}]], [[Template:{{{ci7}}}|{{{ci7}}}]]
Direct subclasses:
UIComp_DrawTeamColoredImage, UIComp_UTDrawStateImage
This class in other games:
[[Category:classes within {{{cw}}} (UT3)]] [[Category:Classes implementing_{{{i6}}}_(UT3)]][[Category:Classes implementing_{{{i7}}}_(UT3)]] [[Category:Classes implementing_{{{ci1}}}_(UT3)]][[Category:Classes implementing_{{{ci2}}}_(UT3)]][[Category:Classes implementing_{{{ci3}}}_(UT3)]][[Category:Classes implementing_{{{ci4}}}_(UT3)]][[Category:Classes implementing_{{{ci5}}}_(UT3)]][[Category:Classes implementing_{{{ci6}}}_(UT3)]][[Category:Classes implementing_{{{ci7}}}_(UT3)]] [[Category:Subclasses of {{{cp1}}}_(UT3)]]

Classes implementing one or more interfaces will automatically be added to relevant categories, which are also linked from the corresponding interface page if it contains an interface infobox.

You can also specify custom parent classes via customparentx instead of parentx, which will create the link based on the current page name and namespace instead of the engine and game name:

{{infobox class
| class = CustomClass
| customparent1 = CustomParent
| parent2 = Actor
| parent3 = Object
| engine =
| custom = yes
}}
Object >> Actor >> [[Template:{{{cp10}}}|{{{cp10}}}]] >> [[Template:{{{cp9}}}|{{{cp9}}}]] >> [[Template:{{{cp8}}}|{{{cp8}}}]] >> [[Template:{{{cp7}}}|{{{cp7}}}]] >> [[Template:{{{cp6}}}|{{{cp6}}}]] >> [[Template:{{{cp5}}}|{{{cp5}}}]] >> [[Template:{{{cp4}}}|{{{cp4}}}]] >> [[Template:{{{cp3}}}|{{{cp3}}}]] >> [[Template:{{{cp2}}}|{{{cp2}}}]] >> [[Template:{{{cp1}}}|{{{cp1}}}]] >> CustomClass (custom, native-only)
Within class:
[[Template:{{{cw}}}|{{{cw}}}]]
Implemented interfaces:
, [[{{{i6}}}|{{{i6}}}]], [[{{{i7}}}|{{{i7}}}]][[Template:{{{ci1}}}|{{{ci1}}}]], [[Template:{{{ci2}}}|{{{ci2}}}]], [[Template:{{{ci3}}}|{{{ci3}}}]], [[Template:{{{ci4}}}|{{{ci4}}}]], [[Template:{{{ci5}}}|{{{ci5}}}]], [[Template:{{{ci6}}}|{{{ci6}}}]], [[Template:{{{ci7}}}|{{{ci7}}}]] [[Category:Custom_classes within {{{cw}}} ]] [[Category:Classes implementing_{{{ci1}}}]][[Category:Classes implementing_{{{ci2}}}]][[Category:Classes implementing_{{{ci3}}}]][[Category:Classes implementing_{{{ci4}}}]][[Category:Classes implementing_{{{ci5}}}]][[Category:Classes implementing_{{{ci6}}}]][[Category:Classes implementing_{{{ci7}}}]] [[Category:Subclasses of {{{cp1}}}]]

Note how CustomParent links to the Template: namespace in this example, even though "engine=" makes the regular parent classes link to the main namespace. If the class description resides in a subpage, custom parents link to subpages of the same base page. (You can see this behavior by viewing this page, Template:Infobox class/doc, directly.)

See also