Skip to content

Commit

Permalink
Update linkdef instructions about enums.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpiparo committed Jan 1, 2025
1 parent 78cd78b commit 4dd34ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions manual/io_custom_classes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Here is an example linkdef file:
#pragma link C++ nestedtypedefs;
#pragma link C++ class MyClass+;
#pragma link C++ namespace Some::Nested::Namespace;
#pragma link C++ enum myEnum;
#endif
{% endhighlight %}

Expand All @@ -175,15 +176,15 @@ public:
};
{% endhighlight %}

The namespace directive instructs `rootcling` to include every type in the selected namespace in the dictionary.
The namespace directive instructs `rootcling` to include every type in the selected namespace in the dictionary. The enum directive includes the enumerator `myEnum`, which becomes known to ROOT's typesystem before parsing the corresponding headers, for example to for autoloading the library where it is defined.

> **Note**
>
> The `+` after the class name enables extra features and performance improvements in the I/O of the type. Remember to always add it to your linkdef directives.
> **Note**
>
> In the past, linkdef files also contained directives for global variables, functions and enums: these directives are ignored since ROOT version 6.
> In the past, linkdef files also contained directives for global variables and functions: these directives are ignored since ROOT version 6.
### Selection by file name

Expand Down

0 comments on commit 4dd34ed

Please sign in to comment.