LINK ENTITY TO CLASS(): Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) (Is it a function? Is it a method? Does it matter?) Tag: Removed redirect |
SirYodaJedi (talk | contribs) (link to w:Macro (computer science)) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{This is a|C++ {{w|Macro (computer science)|macro|icon=no}}|name=LINK_ENTITY_TO_CLASS()|engine=Source|engine1=GoldSrc}} | ||
It is used to link a [[classname]] to a C++ class. | It is used to link a [[classname]] to a C++ class. | ||
Line 24: | Line 24: | ||
== See also == | == See also == | ||
* [[Authoring a Logical Entity#Linking the class to an entity name]] | * [[Authoring a Logical Entity#Linking the class to an entity name]] | ||
[[Category:Programming]] | |||
[[Category:C++]] |
Latest revision as of 08:05, 1 May 2025
LINK_ENTITY_TO_CLASS()
is a C++ macro available in all Source and
GoldSrc games.
It is used to link a classname to a C++ class.
Syntax
In the standard Source SDK and
Half-Life SDK, the syntax is as such:
LINK_ENTITY_TO_CLASS(editor_classname, CPPClassName)
This will usually look like so:
LINK_ENTITY_TO_CLASS(info_null, CNullEntity)
ReGameDLL_CS
ReGameDLL_CS uses a modified syntax, adding an additional C++ class for server plugins:
LINK_ENTITY_TO_CLASS(editor_classname, CPPClassName, APIClassName)
This will usually look like so:
LINK_ENTITY_TO_CLASS(info_null, CNullEntity, CCSNullEntity)