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

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