X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FMod%2FLayer.pm;h=fda3d59559a0bd3623b9682655dadc58103eb4a7;hp=0dd0a84a76dec2a4b0f06a9c470d9ca253a31de3;hb=0f9d7c1a2d11bc7001fe450cb2086e67c13a39e9;hpb=e6c6fbca8df4f8df7bbce2eb98dd260ed51d9141 diff --git a/lib/LaTeX/TikZ/Mod/Layer.pm b/lib/LaTeX/TikZ/Mod/Layer.pm index 0dd0a84..fda3d59 100644 --- a/lib/LaTeX/TikZ/Mod/Layer.pm +++ b/lib/LaTeX/TikZ/Mod/Layer.pm @@ -25,14 +25,30 @@ use LaTeX::TikZ::Interface; use Any::Moose; use Any::Moose 'Util::TypeConstraints'; +=head1 RELATIONSHIPS + +This class consumes the L role, and as such implements the L, L, L and L methods. + +=cut + with 'LaTeX::TikZ::Mod'; +=head1 ATTRIBUTES + +=head2 C + +=cut + has 'name' => ( is => 'ro', isa => 'Str', required => 1, ); +=head2 C + +=cut + subtype 'LaTeX::TikZ::Mod::LevelList' => as 'ArrayRef[LaTeX::TikZ::Mod::Layer]'; @@ -54,6 +70,10 @@ has '_above' => ( sub above { @{$_[0]->_above} } +=head2 C + +=cut + has '_below' => ( is => 'ro', isa => 'LaTeX::TikZ::Mod::LevelList', @@ -72,6 +92,10 @@ has '_score' => ( builder => '_build_score', ); +=head1 METHODS + +=cut + my %layers; around 'new' => sub { @@ -105,14 +129,26 @@ sub DEMOLISH { delete $layers{$self->name}; } +=head2 C + +=cut + sub tag { my ($self) = @_; ref($self) . '/' . $self->name; } +=head2 C + +=cut + sub cover { $_[0]->name eq $_[1]->name } +=head2 C + +=cut + { our %score; @@ -162,6 +198,10 @@ sub cover { $_[0]->name eq $_[1]->name } $score{$name} } +=head2 C + +=cut + sub declare { shift; @@ -186,6 +226,10 @@ sub cover { $_[0]->name eq $_[1]->name } } } +=head2 C + +=cut + sub apply { my ($self) = @_; @@ -208,6 +252,10 @@ __PACKAGE__->meta->make_immutable( inline_constructor => 0, ); +=head1 SEE ALSO + +L, L. + =head1 AUTHOR Vincent Pit, C<< >>, L.