Mercurial > pub > Impl
annotate Lib/IMPL/Class/MemberInfo.pm @ 171:59e5fcb59d86
Исправления, изменена концепция веб-форм
author | sourcer |
---|---|
date | Mon, 06 Jun 2011 03:30:36 +0400 |
parents | 76515373dac0 |
children | d1676be8afcc |
rev | line source |
---|---|
49 | 1 package IMPL::Class::MemberInfo; |
2 use strict; | |
163 | 3 use IMPL::_core::version; |
165 | 4 use parent qw(IMPL::Object::Accessor); |
49 | 5 |
6 require IMPL::Exception; | |
7 require IMPL::Class::Member; | |
8 | |
9 __PACKAGE__->mk_accessors( | |
10 qw( | |
11 Name | |
12 Access | |
13 Virtual | |
14 Class | |
15 Frozen | |
16 Implementor | |
17 Attributes | |
18 ) | |
19 ); | |
20 __PACKAGE__->PassThroughArgs; | |
21 | |
22 sub CTOR { | |
23 my $this = shift; | |
24 | |
25 die new IMPL::Exception('The name is required for the member') unless $this->Name; | |
26 die new IMPL::Exception('The class is required for the member') unless $this->Class; | |
27 | |
59
0f3e369553bd
Rewritten property implementation (probably become slower but more flexible)
wizard
parents:
49
diff
changeset
|
28 $this->Attributes({}) unless defined $this->Attributes; |
49 | 29 $this->Frozen(0); |
30 $this->Virtual(0) unless defined $this->Virtual; | |
31 $this->Access(3) unless $this->Access; | |
32 } | |
33 | |
34 sub Implement { | |
35 my ($this) = @_; | |
36 $this->Implementor->Make($this); | |
37 $this->Frozen(1); | |
38 $this->Class->set_meta($this); | |
39 return; | |
40 } | |
41 | |
163 | 42 1; |
43 | |
44 __END__ | |
45 | |
46 =pod | |
47 | |
48 =head1 NAME | |
49 | |
50 C<IMPL::Class::MemberInfo> - . | |
51 | |
52 =head1 DESCRIPTION | |
53 | |
54 C<IMPL::Class::PropertyInfo>, C<IMPL::Class::MethodInfo> | |
55 . | |
56 | |
57 C<IMPL::Object::Accessor> . | |
58 | |
59 =head1 MEMBERS | |
60 | |
61 =over | |
62 | |
63 =item C<[get,set] Name> | |
64 | |
65 . | |
66 | |
67 =item C<[get,set] Access> | |
68 | |
69 Default public. | |
49 | 70 |
163 | 71 ( public | private | protected ) |
72 | |
73 =item C<[get,set] Virtual> | |
74 | |
75 Default false. | |
76 | |
77 . | |
78 | |
79 =item C<[get,set] Class> | |
80 | |
81 | |
82 | |
83 =item C<[get,set] Frozen> | |
84 | |
85 | |
86 | |
87 =item C<[get,set] Attributes> | |
88 | |
89 | |
90 | |
91 =item C<Implement()> | |
92 | |
93 C<Frozen> C<1>, . | |
94 | |
95 , | |
96 (, ). | |
97 | |
98 =back | |
99 | |
100 =cut |