Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Adds ParametricRoleHOW refs #1306
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| =begin pod | ||
| =TITLE role Metamodel::ParametricRoleHOW | ||
| =SUBTITLE Represents a non-instantiated, parametrized, role. | ||
| class Metamodel::ParametricRoleHOW | ||
| does Metamodel::Naming | ||
| does Metamodel::Documenting | ||
| does Metamodel::Versioning | ||
| does Metamodel::MethodContainer | ||
| does Metamodel::PrivateMethodContainer | ||
| does Metamodel::MultiMethodContainer | ||
| does Metamodel::AttributeContainer | ||
| does Metamodel::RoleContainer | ||
| does Metamodel::MultipleInheritance | ||
| does Metamodel::Stashing | ||
| does Metamodel::TypePretense | ||
| does Metamodel::RolePunning | ||
| does Metamodel::ArrayType {} | ||
| A C<Metamodel::ParametricRoleHOW> represents a non-instantiated, possibly | ||
| parametrized, role: | ||
| =for code | ||
| (role Zape[::T] {}).HOW.say;# OUTPUT: «Perl6::Metamodel::ParametricRoleHOW.new» | ||
| (role Zape {}).HOW.say; # OUTPUT: «Perl6::Metamodel::ParametricRoleHOW.new» | ||
| As usual, C<.new_type> will create a new object of this class. | ||
| =for code | ||
| my \zipi := Metamodel::ParametricRoleHOW.new_type( name => "zape", group => "Zape"); | ||
| say zipi.HOW; # OUTPUT: «Perl6::Metamodel::ParametricRoleHOW.new» | ||
| The extra C<group> argument will need to be used to integrate it in a parametric | ||
| role group, which will need to be defined in advance. | ||
| I<Note>: As most of the C<Metamodel> classes, this class is here mainly for | ||
| illustration purposes and it's not intended for the final user to instantiate. | ||
| =end pod |