Changeset 57
- Timestamp:
- 06/27/08 02:51:40 (4 months ago)
- Files:
-
- trunk/doost/util/serializer/archive/BinaryArchive.d (modified) (2 diffs)
- trunk/doost/util/serializer/archive/JsonArchive.d (modified) (2 diffs)
- trunk/doost/util/serializer/archive/TextArchive.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doost/util/serializer/archive/BinaryArchive.d
r55 r57 669 669 //BUG: a way to access all fields from class neverthless of protection attributes 670 670 foreach(i, BASE; BaseTypeTuple!(VALUE)) { 671 672 if (is (BASE == interface) || BASE.tupleof.length == 0) continue; 673 if (!skip(Marker.udtInherit)) 674 throw new ParsingException("Missing UDT inheritance indicator."); 675 676 BASE res = cast(BASE)value; 677 processMemberStruct(res); 671 static if (is (BASE == interface) || BASE.tupleof.length == 0) {} 672 else { 673 if (!skip(Marker.udtInherit)) 674 throw new ParsingException("Missing UDT inheritance indicator."); 675 676 BASE res = cast(BASE)value; 677 pragma(msg, "loadUdt BASE =='"~BASE.stringof~"'"); 678 processMemberStruct(res); 679 } 678 680 } 679 681 } … … 688 690 static if( is( VALUE == class )) { 689 691 foreach(i, BASE; BaseTypeTuple!(VALUE)) { 690 if (is (BASE == interface) || BASE.tupleof.length == 0) continue; 691 storage.put(Marker.udtInherit); 692 BASE val = cast(BASE)value; 693 processMemberStruct(val); 692 static if (is (BASE == interface) || BASE.tupleof.length == 0) {} 693 else { 694 storage.put(Marker.udtInherit); 695 BASE val = cast(BASE)value; 696 processMemberStruct(val); 697 } 694 698 } 695 699 } trunk/doost/util/serializer/archive/JsonArchive.d
r52 r57 721 721 722 722 foreach(i, BASE; BaseTypeTuple!(VALUE)) { 723 if (is (BASE == interface) || BASE.tupleof.length == 0) continue; 724 BASE res = cast(BASE)value; 725 tokenizeMemberStructFields(BASE.stringof, includedclasses); 726 processMemberStruct(res); 723 static if (is (BASE == interface) || BASE.tupleof.length == 0) {} 724 else { 725 BASE res = cast(BASE)value; 726 tokenizeMemberStructFields(BASE.stringof, includedclasses); 727 processMemberStruct(res); 728 } 727 729 } 728 730 } … … 743 745 static if( is( VALUE == class )) { 744 746 foreach(i, BASE; BaseTypeTuple!(VALUE)) { 745 if (is (BASE == interface) || BASE.tupleof.length == 0) continue; 746 if (line_begin) dumpIndent(); 747 storage.put(Udt.separator ~ Skip.newline); 748 line_begin = true; 749 BASE val = cast(BASE)value; 750 processMemberStruct(val); 747 static if (is (BASE == interface) || BASE.tupleof.length == 0) {} 748 else { 749 if (line_begin) dumpIndent(); 750 storage.put(Udt.separator ~ Skip.newline); 751 line_begin = true; 752 BASE val = cast(BASE)value; 753 processMemberStruct(val); 754 } 751 755 } 752 756 } trunk/doost/util/serializer/archive/TextArchive.d
r52 r57 603 603 //BUG: a way to access all fields from class neverthless of protection attributes 604 604 foreach(i, BASE; BaseTypeTuple!(VALUE)) { 605 606 if (is (BASE == interface) || BASE.tupleof.length == 0) continue; 607 if (!skip(storage, defUdt.inherit)) 608 throw new ParsingException("Missing UDT inheritance indicator."); 609 610 BASE res = cast(BASE)value; 611 processMemberStruct(res); 605 static if (is (BASE == interface) || BASE.tupleof.length == 0) {} 606 else { 607 if (!skip(storage, defUdt.inherit)) 608 throw new ParsingException("Missing UDT inheritance indicator."); 609 610 BASE res = cast(BASE)value; 611 processMemberStruct(res); 612 } 612 613 } 613 614 } … … 623 624 static if( is( VALUE == class )) { 624 625 foreach(i, BASE; BaseTypeTuple!(VALUE)) { 625 if (is (BASE == interface) || BASE.tupleof.length == 0) continue; 626 storage.put(defUdt.inherit); 627 BASE val = cast(BASE)value; 628 processMemberStruct(val); 626 static if (is (BASE == interface) || BASE.tupleof.length == 0) {} 627 else { 628 storage.put(defUdt.inherit); 629 BASE val = cast(BASE)value; 630 processMemberStruct(val); 631 } 629 632 } 630 633 }
