Mercurial > pub > Impl
comparison Lib/IMPL/DOM/Node.pm @ 6:e2cd73ccc5bd
DOM In development
author | Sergey |
---|---|
date | Fri, 14 Aug 2009 16:14:13 +0400 |
parents | e59f44f75f20 |
children | 94d47b388442 |
comparison
equal
deleted
inserted
replaced
5:efa7db58abae | 6:e2cd73ccc5bd |
---|---|
17 public _direct property nodeName => prop_get | owner_set; | 17 public _direct property nodeName => prop_get | owner_set; |
18 public _direct property isComplex => { get => \&_getIsComplex } ; | 18 public _direct property isComplex => { get => \&_getIsComplex } ; |
19 public _direct property nodeValue => prop_all; | 19 public _direct property nodeValue => prop_all; |
20 public _direct property childNodes => { get => \&_getChildNodes }; | 20 public _direct property childNodes => { get => \&_getChildNodes }; |
21 public _direct property parentNode => prop_get ; | 21 public _direct property parentNode => prop_get ; |
22 private _direct property _propertyMap => prop_all; | 22 private _direct property _propertyMap => prop_get ; |
23 } | 23 } |
24 | 24 |
25 sub CTOR { | 25 sub CTOR { |
26 my ($this,$name) = @_; | 26 my ($this,$name) = @_; |
27 | 27 |
28 $this->nodeName($name) or die new IMPL::InvalidArgumentException("A name is required"); | 28 $this->nodeName($name) or die new IMPL::InvalidArgumentException("A name is required"); |
29 $this->_propertyMap({}); | |
30 } | 29 } |
31 | 30 |
32 sub insertNode { | 31 sub insertNode { |
33 my ($this,$node,$pos) = @_; | 32 my ($this,$node,$pos) = @_; |
34 | 33 |
102 my $this = shift; | 101 my $this = shift; |
103 my $name = shift; | 102 my $name = shift; |
104 | 103 |
105 if (@_) { | 104 if (@_) { |
106 # set | 105 # set |
107 return $this->_propertyMap->{$name} = shift; | 106 return $this->{$_propertyMap}{$name} = shift; |
108 } else { | 107 } else { |
109 return $this->_propertyMap->{$name}; | 108 return $this->{$_propertyMap}{$name}; |
110 } | 109 } |
111 } | 110 } |
112 | 111 |
113 1; | 112 1; |