comparison Lib/IMPL/DOM/Node.pm @ 0:03e58a454b20

Создан репозитарий
author Sergey
date Tue, 14 Jul 2009 12:54:37 +0400
parents
children 3b418b134d8c
comparison
equal deleted inserted replaced
-1:000000000000 0:03e58a454b20
1 package IMPL::DOM::Node;
2 use strict;
3 use warnings;
4
5 use base qw(IMPL::Object IMPL::Object::Serializable IMPL::Object::Autofill);
6
7 use IMPL::Class::Property;
8 use IMPL::Class::Property::Direct;
9 use Scalar::Util qw(weaken);
10
11 __PACKAGE__->PassThroughArgs;
12
13 BEGIN {
14 public property nodeName => prop_get | owner_set;
15 public property isComplex => prop_get | owner_set;
16 public property nodeValue => prop_get | owner_set;
17 public property childNodes => prop_get | owner_set| prop_list;
18 public property parentNode => prop_get | owner_set;
19 private property _propertyMap => prop_all;
20 }
21
22 sub CTOR {
23 my $this = @_;
24
25 $this->_propertyMap({});
26 }
27
28 sub insertNode {
29 my ($this,$node,$pos) = @_;
30 }
31
32 sub removeNode {
33 my ($this,$node) = @_;
34 }
35
36 sub removeAt {
37 my ($this,$pos) = @_;
38 }
39
40 sub selectNodes {
41 my ($this,$name) = @_;
42 }
43
44 sub setParent {
45 my ($this,$parentNode) = @_;
46 }
47
48 sub text {
49 my ($this) = @_;
50 }
51
52 sub Property {
53 my $this = shift;
54 my $name = shift;
55
56 if (@_) {
57 # set
58 return $this->_propertyMap->{$name} = shift;
59 } else {
60 return $this->_propertyMap->{$name};
61 }
62 }
63
64 1;