annotate Lib/IMPL/Class/Property/Accessor.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents d1676be8afcc
children 6253872024a4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
1 package IMPL::Class::Property::Accessor;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
2 use strict;
165
76515373dac0 Added Class::Template,
wizard
parents: 60
diff changeset
3 use parent qw(IMPL::Class::Property::Base);
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
4
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
5 sub factoryParams {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
6 $_[0]->SUPER::factoryParams, qw($field);
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
7 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
8
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
9 sub RemapFactoryParams {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
10 my ($self,$propInfo) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
11
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
12 return $self->SUPER::RemapFactoryParams($propInfo),$propInfo->Name;
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
13 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
14
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
15 sub GenerateGet {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
16 'return $this->get($field);';
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
17 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
18
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
19 sub GenerateSet {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
20 'return $this->set($field,@_);';
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
21 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
22
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
23 sub GenerateSetList {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
24 'my $val = IMPL::Object::List->new( (@_ == 1 and UNIVERSAL::isa($_[0], \'ARRAY\') ) ? $_[0] : [@_] );
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
25 $this->set($field,$val);
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
26 return( wantarray ? @{ $val } : $val );';
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
27 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
28
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
29 sub GenerateGetList {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
30 'my $val = $this->get($field);
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
31 $this->set($field,$val = IMPL::Object::List->new()) unless $val;
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
32 return( wantarray ? @{ $val } : $val );';
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
33 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
34
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 165
diff changeset
35 1;