Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

Difference between revisions of "Template:Infobox class"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
Line 1: Line 1:
 
{| class="infobox infobox-class"
 
{| class="infobox infobox-class"
! Class:{{DISPLAYTITLE:{{{classpage|{{classpage|c={{{class|{{classname}}}}}}}}}}}}{{DEFAULTSORT:{{PAGENAME}} {{{game|{{gamename}}}}} {{{engine|{{ARTICLESPACE}}}}}}}
+
! Class:
| {{{package}}}.{{{class|{{classname}}}}} {{#if:{{{custom|}}}|(custom)}} <includeonly>{{
+
| {{#if:{{{package|}}}|{{{package}}}.}}{{{class|{{classname}}}}} {{#if:{{{custom|}}}|(custom)}}
#if: {{{game|{{gamename}}}}}
+
|[[Category:Classes in {{{game|{{gamename}}}}} package {{{package}}}]]
+
| {{#if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
+
  | [[Category:Classes in {{{engine|{{ARTICLESPACE}}}}} package {{{package}}}]]
+
  | [[Category:Classes in package {{{package}}}]]
+
  }}
+
}}</includeonly>
+
 
|{{#if: {{{within|}}}
 
|{{#if: {{{within|}}}
 
|-
 
|-
 
! Within:
 
! Within:
{{!}} [[{{classpage|c={{{within}}}}}|{{{within}}}]] <includeonly>{{#if: {{{game|{{gamename}}}}}
+
{{!}} [[{{classpage|c={{{within}}}}}|{{{within}}}]]
  | {{#if:{{{custom|}}}|[[Category:Custom classes within {{{within}}} ({{{game|{{gamename}}}}})]]|[[Category:Classes within {{{within}}} ({{{game|{{gamename}}}}})]]}}
+
  | {{#if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
+
    | {{#if:{{{custom|}}}|[[Category:Custom classes within {{{within}}} ({{{engine|{{ARTICLESPACE}}}}})}]]|[[Category:Classes within {{{within}}} ({{{engine|{{ARTICLESPACE}}}}})}]]}}
+
    | {{#if:{{{custom|}}}|[[Category:Custom classes within {{{within}}}]]|[[Category:Classes within {{{within}}}]]}}
+
    }}
+
  }}</includeonly>
+
 
{{!}}}}{{#if: {{{interfaces|}}}
 
{{!}}}}{{#if: {{{interfaces|}}}
 
|-
 
|-
Line 39: Line 26:
 
{{!}} colspan="2" {{!}}
 
{{!}} colspan="2" {{!}}
 
{{{tree}}}
 
{{{tree}}}
{{!}}}}}<noinclude>
+
{{!}}}}}<includeonly>{{DISPLAYTITLE:{{{classpage|{{classpage|c={{{class|{{classname}}}}}}}}}}}} {{DEFAULTSORT:{{PAGENAME}} {{{game|}}} {{{engine|{{ARTICLESPACE}}}}}}} {{
 +
#if: {{{custom|}}}
 +
| {{
 +
  #if: {{{game|{{gamename}}}}}
 +
  | [[Category:Custom {{{game|{{gamename}}}}}-specific classes]]
 +
  | {{
 +
    #if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
 +
    | [[Category:Custom {{{engine|{{ARTICLESPACE}}}}}-specific classes]]
 +
    | [[Category:Custom classes]]
 +
    }}
 +
  }}{{
 +
  #if: {{{within|}}}
 +
  | {{
 +
    #if: {{{game|{{gamename}}}}}
 +
    | [[Category:Custom classes within {{{within}}} ({{{game|{{gamename}}}}})]]
 +
    | {{
 +
      #if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
 +
      | [[Category:Custom classes within {{{within}}} ({{{engine|{{ARTICLESPACE}}}}})}]]
 +
      | [[Category:Custom classes within {{{within}}}]]
 +
    }}
 +
  }}
 +
| {{
 +
  #if: {{{game|{{gamename}}}}}
 +
  | [[Category:{{{game|{{gamename}}}}}-specific classes]]
 +
  | {{
 +
    #if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
 +
    | [[Category:{{{engine|{{ARTICLESPACE}}}}}-specific classes]]
 +
    | [[Category:Classes]]
 +
    }}
 +
  }}{{
 +
  #if: {{{within|}}}
 +
  | {{
 +
    #if: {{{game|{{gamename}}}}}
 +
    | [[Category:Classes within {{{within}}} ({{{game|{{gamename}}}}})]]
 +
    | {{
 +
      #if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
 +
      | [[Category:Classes within {{{within}}} ({{{engine|{{ARTICLESPACE}}}}})}]]
 +
      | [[Category:Classes within {{{within}}}]]
 +
    }}
 +
  }}{{
 +
  #if: {{{package|}}}
 +
  | #if: {{{game|{{gamename}}}}}
 +
    | [[Category:Classes in package {{{package}}} ({{{game|{{gamename}}}}})]]
 +
    | {{
 +
      #if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
 +
      | [[Category:Classes in package {{{package}}} ({{{engine|{{ARTICLESPACE}}}}})]]
 +
      | [[Category:Classes in package {{{package}}}]]
 +
      }}
 +
    }}
 +
  }}
 +
}}</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 06:38, 6 March 2008

Class: Infobox_class
[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 >> UTCheatManager

Contents

Package: 
UTGame
Within class: 
PlayerController
This class in other games:
UT3, UDK

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 >> UIComp_DrawImage
Package: 
Engine
Within class: 
UIObject
Implemented interfaces
UIStyleResolver, CustomPropertyItemHandler
Direct subclasses:
UIComp_DrawTeamColoredImage, UIComp_UTDrawStateImage
This class in other games:
UT3, UDK

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 >> CustomParent >> CustomClass (custom)

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