/[suikacvs]/messaging/manakai/lib/Message/DOM/CharacterData.pm
Suika

Diff of /messaging/manakai/lib/Message/DOM/CharacterData.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Sun Apr 16 08:20:25 2006 UTC revision 1.2 by wakaba, Sun Apr 16 12:58:53 2006 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2  ## This file is automatically generated  ## This file is automatically generated
3  ##      at 2006-04-16T08:00:50+00:00,  ##      at 2006-04-16T12:54:40+00:00,
4  ##      from file "CharacterData.dis",  ##      from file "CharacterData.dis",
5  ##      module <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.CharacterData>,  ##      module <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.CharacterData>,
6  ##      for <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOMLatest>.  ##      for <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOMLatest>.
# Line 10  require Message::DOM::DOMCore; Line 10  require Message::DOM::DOMCore;
10  require Message::DOM::TreeCore;  require Message::DOM::TreeCore;
11  require Message::Util::Error::DOMException;  require Message::Util::Error::DOMException;
12  package Message::DOM::CharacterData;  package Message::DOM::CharacterData;
13  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
14  package Message::DOM::IFLatest::CharacterData;  package Message::DOM::IFLatest::CharacterData;
15  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
16  package Message::DOM::CharacterData::ManakaiDOMCharacterData;  package Message::DOM::CharacterData::ManakaiDOMCharacterData;
17  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
18  push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode',  push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode',
19  'Message::DOM::IF::CharacterData',  'Message::DOM::IF::CharacterData',
20  'Message::DOM::IF::Node',  'Message::DOM::IF::Node',
# Line 27  push our @ISA, 'Message::DOM::TreeCore:: Line 27  push our @ISA, 'Message::DOM::TreeCore::
27  'Message::DOM::IFLevel2::Node',  'Message::DOM::IFLevel2::Node',
28  'Message::DOM::IFLevel3::CharacterData',  'Message::DOM::IFLevel3::CharacterData',
29  'Message::DOM::IFLevel3::Node';  'Message::DOM::IFLevel3::Node';
30    use Message::Util::Error;
31  sub ___create_node_stem ($$$$) {  sub ___create_node_stem ($$$$) {
32  my ($self, $bag, $obj, $opt) = @_;  my ($self, $bag, $obj, $opt) = @_;
33  my $r = {};  my $r = {};
# Line 621  my $r = 0; Line 622  my $r = 0;
622  {  {
623    
624  my  my
625  $v = $self->  $v;
626  data  
627    
628    {
629    
630    
631    $v = $self->{
632    'b'
633    }->{${$self->{
634    'id'
635    }}}
636             ->{'con'};
637    
638    
639    }
640    
641  ;  ;
642  $r = CORE::length $v;  $r = CORE::length $$v;
643  $r++ while $v =~ /[\x{10000}-\x{10FFFF}]/g;  $r++ while $$v =~ /[\x{10000}-\x{10FFFF}]/g;
644    
645    
646  }  }
# Line 637  report Message::Util::Error::DOMExceptio Line 652  report Message::Util::Error::DOMExceptio
652  sub substring_data ($$$) {  sub substring_data ($$$) {
653  my ($self, $offset, $count) = @_;  my ($self, $offset, $count) = @_;
654  my $r = '';  my $r = '';
655  report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NOT_SUPPORTED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'substring_data', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_IMPL_METHOD_NOT_IMPLEMENTED', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData';  
656    {
657    
658    
659    {
660    
661    if
662    ($self->
663    manakai_read_only
664    ) {
665      
666    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';
667    
668    ;
669    }
670    
671    
672    }
673    
674    ;
675    if ($count < 0) {
676      
677    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INDEX_SIZE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'substring_data', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#length' => $count, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NEGATIVE_LENGTH_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'count';
678    
679    ;
680    }
681    my $eoffset32;
682    
683    
684    try {local $Error::Depth = $Error::Depth + 3;
685    
686    
687      $eoffset32 = $self->
688    find_offset32
689    
690                            ($offset + $count);
691    } catch
692    Message::DOM::IFLatest::DOMException with
693    {
694      my $err = shift;
695      if ($err->subtype eq
696    'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#StringIndexOutOfBoundsException'
697    ) {
698        $eoffset32 = ($offset + $count) * 2;
699      } else {
700        $err->throw;
701      }
702    };
703    
704    
705    {
706    
707    local $Error::Depth = $Error::Depth + 1;
708    
709    {
710    
711    
712      my
713    $offset32 = $self->
714    find_offset32
715     ($offset);
716      my $data = $self->
717    data
718    ;
719      $r = substr ($data, $offset32, $eoffset32 - $offset32);
720    
721    
722    
723    }
724    
725    
726    ;}
727    
728    ;
729    
730    
731    }
732  $r}  $r}
733  sub append_data ($$) {  sub append_data ($$) {
734  my ($self, $arg) = @_;  my ($self, $arg) = @_;
# Line 671  manakai_append_text Line 762  manakai_append_text
762  }  }
763  sub insert_data ($$$) {  sub insert_data ($$$) {
764  my ($self, $offset, $arg) = @_;  my ($self, $offset, $arg) = @_;
765  report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NOT_SUPPORTED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'insert_data', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_IMPL_METHOD_NOT_IMPLEMENTED', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData';  
766    {
767    
768    
769    {
770    
771    if
772    ($self->
773    manakai_read_only
774    ) {
775      
776    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';
777    
778    ;
779    }
780    
781    
782    }
783    
784    ;
785    
786    
787    {
788    
789    local $Error::Depth = $Error::Depth + 1;
790    
791    {
792    
793    
794      my
795    $offset32 = $self->
796    find_offset32
797     ($offset);
798      my $data = $self->
799    data
800    ;
801      substr ($data, $offset32, 0) = $arg;
802      $self->
803    data
804     ($data);
805    
806    
807    
808    }
809    
810    
811    ;}
812    
813    ;
814    
815    
816    }
817  }  }
818  sub delete_data ($$$) {  sub delete_data ($$$) {
819  my ($self, $offset, $count) = @_;  my ($self, $offset, $count) = @_;
820  report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NOT_SUPPORTED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'delete_data', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_IMPL_METHOD_NOT_IMPLEMENTED', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData';  
821    {
822    
823    
824    {
825    
826    if
827    ($self->
828    manakai_read_only
829    ) {
830      
831    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';
832    
833    ;
834    }
835    
836    
837    }
838    
839    ;
840    if ($count < 0) {
841      
842    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INDEX_SIZE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'delete_data', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#length' => $count, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NEGATIVE_LENGTH_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'count';
843    
844    ;
845    }
846    my $eoffset32;
847    
848    
849    try {local $Error::Depth = $Error::Depth + 3;
850    
851    
852      $eoffset32 = $self->
853    find_offset32
854    
855                            ($offset + $count);
856    } catch
857    Message::DOM::IFLatest::DOMException with
858    {
859      my $err = shift;
860      if ($err->subtype eq
861    'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#StringIndexOutOfBoundsException'
862    ) {
863        $eoffset32 = ($offset + $count) * 2;
864      } else {
865        $err->throw;
866      }
867    };
868    
869    
870    {
871    
872    local $Error::Depth = $Error::Depth + 1;
873    
874    {
875    
876    
877      my
878    $offset32 = $self->
879    find_offset32
880     ($offset);
881      my $data = $self->
882    data
883    ;
884      substr ($data, $offset32, $eoffset32 - $offset32) = '';
885      $self->
886    data
887     ($data);
888    
889    
890    
891    }
892    
893    
894    ;}
895    
896    ;
897    
898    
899    }
900  }  }
901  sub replace_data ($$$$) {  sub replace_data ($$$$) {
902  my ($self, $offset, $count, $arg) = @_;  my ($self, $offset, $count, $arg) = @_;
903    
904    {
905    
906    
907    {
908    
909    local $Error::Depth = $Error::Depth + 1;
910    
911    {
912    
913    
914    
915      $self->
916    delete_data
917     ($offset, $count);
918      $self->
919    insert_data
920     ($offset, $arg);
921    
922    
923    
924  }  }
925    
926    
927    ;}
928    
929    ;
930    
931    
932    }
933    }
934  $Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::CharacterData::ManakaiDOMCharacterData>}->{has_feature} = {'core',  $Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::CharacterData::ManakaiDOMCharacterData>}->{has_feature} = {'core',
935  {'',  {'',
936  '1',  '1',
# Line 713  $Message::Util::Grove::ClassProp{q<Messa Line 962  $Message::Util::Grove::ClassProp{q<Messa
962  'w0',  'w0',
963  ['od']};  ['od']};
964  package Message::DOM::IFLatest::Text;  package Message::DOM::IFLatest::Text;
965  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
966  package Message::DOM::CharacterData::ManakaiDOMText;  package Message::DOM::CharacterData::ManakaiDOMText;
967  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
968  push our @ISA, 'Message::DOM::CharacterData::ManakaiDOMCharacterData',  push our @ISA, 'Message::DOM::CharacterData::ManakaiDOMCharacterData',
969  'Message::DOM::IF::CharacterData',  'Message::DOM::IF::CharacterData',
970  'Message::DOM::IF::Node',  'Message::DOM::IF::Node',
# Line 933  $r} Line 1182  $r}
1182  sub split_text ($$) {  sub split_text ($$) {
1183  my ($self, $offset) = @_;  my ($self, $offset) = @_;
1184  my $r;  my $r;
1185  report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NOT_SUPPORTED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'split_text', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_IMPL_METHOD_NOT_IMPLEMENTED', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMText';  
1186    {
1187    
1188    
1189    {
1190    
1191    if
1192    ($self->
1193    manakai_read_only
1194    ) {
1195      
1196    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';
1197    
1198    ;
1199    }
1200    
1201    
1202    }
1203    
1204    ;
1205    my $parent = $self->
1206    parent_node
1207    ;
1208    if (defined $parent and $parent->
1209    manakai_read_only
1210    ) {
1211      
1212    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'split_text', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMText';
1213    
1214    ;
1215    }
1216    
1217    
1218    
1219    {
1220    
1221    local $Error::Depth = $Error::Depth + 1;
1222    
1223    {
1224    
1225    
1226      my
1227    $offset32 = $self->
1228    find_offset32
1229     ($offset);
1230      my $data1 = $self->
1231    data
1232    ;
1233      my $data2 = substr ($data1, $offset32);
1234      substr ($data1, $offset32) = '';
1235    
1236      $r = $self->
1237    node_type
1238     ==
1239    '3'
1240    
1241             ? $self->
1242    owner_document
1243    
1244                    ->
1245    create_text_node
1246     ($data2)
1247             : $self->
1248    owner_document
1249    
1250                    ->
1251    create_cdata_section
1252     ($data2);
1253      $r->
1254    is_element_content_whitespace
1255    
1256            ($self->
1257    is_element_content_whitespace
1258    );
1259      $self->
1260    data
1261     ($data1);
1262      if (defined $parent) {
1263        $parent->
1264    insert_before
1265    
1266                   ($r, $self->
1267    next_sibling
1268    );
1269      }
1270    
1271    
1272    
1273    }
1274    
1275    
1276    ;}
1277    
1278    ;
1279    
1280    
1281    }
1282  $r}  $r}
1283  $Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::CharacterData::ManakaiDOMText>}->{has_feature} = {'core',  $Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::CharacterData::ManakaiDOMText>}->{has_feature} = {'core',
1284  {'',  {'',
# Line 967  $Message::Util::Grove::ClassProp{q<Messa Line 1312  $Message::Util::Grove::ClassProp{q<Messa
1312  'w0',  'w0',
1313  ['od']};  ['od']};
1314  package Message::DOM::IFLatest::Comment;  package Message::DOM::IFLatest::Comment;
1315  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
1316  package Message::DOM::CharacterData::ManakaiDOMComment;  package Message::DOM::CharacterData::ManakaiDOMComment;
1317  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
1318  push our @ISA, 'Message::DOM::CharacterData::ManakaiDOMCharacterData',  push our @ISA, 'Message::DOM::CharacterData::ManakaiDOMCharacterData',
1319  'Message::DOM::IF::CharacterData',  'Message::DOM::IF::CharacterData',
1320  'Message::DOM::IF::Comment',  'Message::DOM::IF::Comment',
# Line 1138  $Message::Util::Grove::ClassProp{q<Messa Line 1483  $Message::Util::Grove::ClassProp{q<Messa
1483  'w0',  'w0',
1484  ['od']};  ['od']};
1485  package Message::DOM::IFLatest::StringExtended;  package Message::DOM::IFLatest::StringExtended;
1486  our $VERSION = 20060416.0800;  our $VERSION = 20060416.1254;
1487  for ($Message::DOM::IF::CharacterData::, $Message::DOM::IF::Comment::, $Message::DOM::IF::Node::, $Message::DOM::IF::Text::, $Message::DOM::IFLatest::Node::, $Message::DOM::IFLevel1::CharacterData::, $Message::DOM::IFLevel1::Comment::, $Message::DOM::IFLevel1::Node::, $Message::DOM::IFLevel1::Text::, $Message::DOM::IFLevel2::CharacterData::, $Message::DOM::IFLevel2::Comment::, $Message::DOM::IFLevel2::Node::, $Message::DOM::IFLevel2::Text::, $Message::DOM::IFLevel3::CharacterData::, $Message::DOM::IFLevel3::Comment::, $Message::DOM::IFLevel3::Node::, $Message::DOM::IFLevel3::Text::){}  for ($Message::DOM::IF::CharacterData::, $Message::DOM::IF::Comment::, $Message::DOM::IF::Node::, $Message::DOM::IF::Text::, $Message::DOM::IFLatest::Node::, $Message::DOM::IFLevel1::CharacterData::, $Message::DOM::IFLevel1::Comment::, $Message::DOM::IFLevel1::Node::, $Message::DOM::IFLevel1::Text::, $Message::DOM::IFLevel2::CharacterData::, $Message::DOM::IFLevel2::Comment::, $Message::DOM::IFLevel2::Node::, $Message::DOM::IFLevel2::Text::, $Message::DOM::IFLevel3::CharacterData::, $Message::DOM::IFLevel3::Comment::, $Message::DOM::IFLevel3::Node::, $Message::DOM::IFLevel3::Text::){}
1488  ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL>  ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL>
1489  1;  1;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24