annotate Lib/IMPL/Class/Member.pm @ 308:47a09a8dc23a

sync
author sergey
date Thu, 18 Apr 2013 20:06:05 +0400
parents 4ddb27ff4a0b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
1 package IMPL::Class::Member;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
2 use strict;
165
76515373dac0 Added Class::Template,
wizard
parents: 49
diff changeset
3 use parent qw(Exporter);
278
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
4 our @EXPORT = qw(&public &private &protected &_direct);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
5
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
6
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
7 use IMPL::Const qw(:access);
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
8
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
9 require IMPL::Class::MemberInfo;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
10
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
11 sub public($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
12 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
13 $info->{access} = ACCESS_PUBLIC;
278
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
14 my $implementor = delete $info->{implementor};
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
15 $implementor->Implement($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
16 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
17
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
18 sub private($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
19 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
20 $info->{access} = ACCESS_PRIVATE;
278
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
21 my $implementor = delete $info->{implementor};
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
22 $implementor->Implement($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
23 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
24
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
25 sub protected($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
26 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
27 $info->{access} = ACCESS_PROTECTED;
278
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
28 my $implementor = delete $info->{implementor};
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
29 $implementor->Implement($info);
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
30 }
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
31
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
32 sub _direct($) {
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
33 my $info = shift;
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
34 $info->{direct} = 1;
4ddb27ff4a0b core refactoring
cin
parents: 277
diff changeset
35 return $info;
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
36 }
277
6585464c4664 sync (unstable)
sergey
parents: 276
diff changeset
37
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
38 1;