Changeset 2660 in Sophya for trunk/SophyaLib/BaseTools
- Timestamp:
- Apr 7, 2005, 11:49:11 AM (20 years ago)
- Location:
- trunk/SophyaLib/BaseTools
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/Makefile
r2611 r2660 3 3 all: $(LIB)libBaseTools.a 4 4 clean: 5 rm -f $(OBJ)datatype.o $(OBJ)dvlist.o $(OBJ)fiondblock.o $(OBJ)mutyv.o $(OBJ)ndatablock.o $(OBJ)pexceptions.o $(OBJ)ppersist.o $(OBJ)ppfbinstream.o $(OBJ)rawstream.o $(OBJ)sophyainit.o $(OBJ) gnumd5.o $(OBJ)srandgen.o5 rm -f $(OBJ)datatype.o $(OBJ)dvlist.o $(OBJ)fiondblock.o $(OBJ)mutyv.o $(OBJ)ndatablock.o $(OBJ)pexceptions.o $(OBJ)ppersist.o $(OBJ)ppfbinstream.o $(OBJ)rawstream.o $(OBJ)sophyainit.o $(OBJ)timestamp.o $(OBJ)gnumd5.o $(OBJ)srandgen.o 6 6 rm -f $(LIB)libBaseTools.a 7 $(LIB)libBaseTools.a : $(OBJ)datatype.o $(OBJ)dvlist.o $(OBJ)fiondblock.o $(OBJ)gnumd5.o $(OBJ)mutyv.o $(OBJ)ndatablock.o $(OBJ)pexceptions.o $(OBJ)ppersist.o $(OBJ)ppfbinstream.o $(OBJ)rawstream.o $(OBJ)sophyainit.o $(OBJ)srandgen.o 7 $(LIB)libBaseTools.a : $(OBJ)datatype.o $(OBJ)dvlist.o $(OBJ)fiondblock.o $(OBJ)gnumd5.o $(OBJ)mutyv.o $(OBJ)ndatablock.o $(OBJ)pexceptions.o $(OBJ)ppersist.o $(OBJ)ppfbinstream.o $(OBJ)rawstream.o $(OBJ)sophyainit.o $(OBJ)srandgen.o $(OBJ)timestamp.o 8 8 $(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS)) 9 9 ifeq ($(CXX),cxx) … … 11 11 endif 12 12 13 $(OBJ)datatype.o: datatype.cc datatype.h \ 14 $(INC)machdefs.h 15 $(OBJ)dvlist.o: dvlist.cc $(INC)machdefs.h dvlist.h \ 16 objfio.h anydataobj.h ppersist.h pexceptions.h gnumd5.h \ 17 ppfbinstream.h rawstream.h ppfnametag.h mutyv.h \ 18 $(INC)strutil.h 19 $(OBJ)fiondblock.o: fiondblock.cc $(INC)machdefs.h \ 20 pexceptions.h datatype.h fiondblock.h ppersist.h gnumd5.h \ 21 ppfbinstream.h rawstream.h ppfnametag.h ndatablock.h anydataobj.h 22 $(OBJ)mutyv.o: mutyv.cc mutyv.h $(INC)machdefs.h 23 $(OBJ)ndatablock.o: ndatablock.cc $(INC)machdefs.h \ 24 pexceptions.h ndatablock.h anydataobj.h 25 $(OBJ)pexceptions.o: pexceptions.cc pexceptions.h \ 26 $(INC)machdefs.h 27 $(OBJ)ppersist.o: ppersist.cc $(INC)machdefs.h \ 28 pexceptions.h ppersist.h gnumd5.h ppfbinstream.h rawstream.h \ 29 ppfnametag.h anydataobj.h 30 $(OBJ)ppfbinstream.o: ppfbinstream.cc \ 31 $(INC)machdefs.h ppfbinstream.h rawstream.h \ 32 pexceptions.h 33 $(OBJ)rawstream.o: rawstream.cc rawstream.h \ 34 $(INC)machdefs.h pexceptions.h 35 $(OBJ)sophyainit.o: sophyainit.cc $(INC)machdefs.h \ 36 sophyainit.h pexceptions.h ppersist.h gnumd5.h ppfbinstream.h \ 37 rawstream.h ppfnametag.h fiondblock.h ndatablock.h anydataobj.h \ 38 dvlist.h objfio.h mutyv.h sversion.h 13 $(OBJ)datatype.o: datatype.cc sopnamsp.h datatype.h \ 14 $(INC)machdefs.h 15 $(OBJ)dvlist.o: dvlist.cc sopnamsp.h $(INC)machdefs.h \ 16 dvlist.h objfio.h anydataobj.h ppersist.h pexceptions.h gnumd5.h \ 17 ppfbinstream.h rawstream.h ppfnametag.h mutyv.h \ 18 $(INC)strutil.h 19 $(OBJ)fiondblock.o: fiondblock.cc sopnamsp.h \ 20 $(INC)machdefs.h pexceptions.h datatype.h \ 21 fiondblock.h ppersist.h gnumd5.h ppfbinstream.h rawstream.h \ 22 ppfnametag.h ndatablock.h anydataobj.h 23 $(OBJ)mutyv.o: mutyv.cc sopnamsp.h mutyv.h \ 24 $(INC)machdefs.h 25 $(OBJ)ndatablock.o: ndatablock.cc sopnamsp.h \ 26 $(INC)machdefs.h pexceptions.h ndatablock.h \ 27 anydataobj.h 28 $(OBJ)pexceptions.o: pexceptions.cc sopnamsp.h pexceptions.h \ 29 $(INC)machdefs.h 30 $(OBJ)ppersist.o: ppersist.cc sopnamsp.h \ 31 $(INC)machdefs.h pexceptions.h ppersist.h \ 32 gnumd5.h ppfbinstream.h rawstream.h ppfnametag.h anydataobj.h 33 $(OBJ)ppfbinstream.o: ppfbinstream.cc sopnamsp.h \ 34 $(INC)machdefs.h ppfbinstream.h rawstream.h \ 35 pexceptions.h 36 $(OBJ)rawstream.o: rawstream.cc sopnamsp.h rawstream.h \ 37 $(INC)machdefs.h pexceptions.h 38 $(OBJ)sophyainit.o: sophyainit.cc sopnamsp.h \ 39 $(INC)machdefs.h sophyainit.h pexceptions.h \ 40 ppersist.h gnumd5.h ppfbinstream.h rawstream.h ppfnametag.h \ 41 fiondblock.h ndatablock.h anydataobj.h dvlist.h objfio.h mutyv.h \ 42 fiosegdb.h segdatablock.h ppftpointerio.h ppfwrapstlv.h sversion.h 43 $(OBJ)timestamp.o: timestamp.cc sopnamsp.h \ 44 $(INC)machdefs.h timestamp.h pexceptions.h 39 45 $(OBJ)gnumd5.o: gnumd5.c $(INC)machdefs.h bithelp.h \ 40 gnumd5.h46 gnumd5.h 41 47 $(OBJ)srandgen.o: srandgen.c $(INC)machdefs.h \ 42 srandgen.h smathconst.h48 srandgen.h smathconst.h -
trunk/SophyaLib/BaseTools/objlist.list
r2475 r2660 11 11 sophyainit.o 12 12 srandgen.o 13 timestamp.o -
trunk/SophyaLib/BaseTools/ppersist.h
r2657 r2660 187 187 // On utilise le macro RAWPERSISTIO pour declarer POutPersist << et PInPersist >> 188 188 // pour les types de base r_4 r_8 int_4 int_8 ... 189 RAWPERSISTIO(int_8,I8); 190 RAWPERSISTIO(uint_8,U8); 189 191 RAWPERSISTIO(int_4,I4); 190 192 RAWPERSISTIO(uint_4,U4); -
trunk/SophyaLib/BaseTools/ppfbinstream.cc
r2615 r2660 1007 1007 char * buff; 1008 1008 string str; 1009 1009 // Pour indenter lors de l'impression 1010 #define _MXINDENT_ 10 1011 char * indents[_MXINDENT_+1] = {""," ", " ", " ", " ", " ", 1012 " ", " ", " ", 1013 " ", " "}; 1014 int idxindent = 0; 1015 int idxind = 0; 1010 1016 cout << "\n ---------------------------------------------------------- " << endl; 1011 1017 cout << " PPFBinaryInputStream::AnalyseTags(Level= " << lev << ")" << endl; … … 1041 1047 1042 1048 case PPS_NULL : 1043 if (lev > 1) cout << "<PPS_NULL> tag at position " << hex << cpos << dec << endl; 1049 if (lev > 1) cout << indents[idxindent] 1050 << "<PPS_NULL> tag at position " << hex << cpos << dec << endl; 1044 1051 break; 1045 1052 1046 1053 case PPS_STRING : 1047 1054 GetRawI4(i4); 1048 if (lev > 1) cout << "<PPS_STRING> tag at position " << hex << cpos << dec 1055 if (lev > 1) cout << indents[idxindent] 1056 << "<PPS_STRING> tag at position " << hex << cpos << dec 1049 1057 << " Length=" << i4 << endl; 1050 1058 s->seekg(i4,ios::cur); … … 1054 1062 GetRawU8(cid); 1055 1063 GetRawU8(oid); 1056 cout << "<PPS_OBJECT> tag at position " << hex << cpos << " ClassId= " << cid 1064 cout << indents[idxindent] 1065 << "<PPS_OBJECT> tag at position " << hex << cpos << " ClassId= " << cid 1057 1066 << " ObjectId= " << oid << dec << endl; 1067 idxind++; 1068 idxindent = (idxind <= _MXINDENT_) ? idxind : _MXINDENT_; 1058 1069 break; 1059 1070 … … 1061 1072 GetRawU8(oid); 1062 1073 GetRawI8(i8); 1063 cout << "<PPS_REFERENCE> tag at position " << hex << cpos << " ObjectId= " 1074 cout << indents[idxindent] 1075 << "<PPS_REFERENCE> tag at position " << hex << cpos << " ObjectId= " 1064 1076 << oid << " OrigPos=" << i8 << dec << endl; 1065 1077 break; 1066 1078 1067 1079 case PPS_NAMETAG_MARK : 1068 cout << "<PPS_NAMETAG_MARK> tag at position " << hex << cpos << dec << endl; 1080 cout << indents[idxindent] 1081 << "<PPS_NAMETAG_MARK> tag at position " << hex << cpos << dec << endl; 1069 1082 break; 1070 1083 1071 1084 case PPS_POSTAG_MARK : 1072 1085 GetRawI8(i8); 1073 cout << "<PPS_POSTAG_MARK> tag at position " << hex << cpos 1086 cout << indents[idxindent] 1087 << "<PPS_POSTAG_MARK> tag at position " << hex << cpos 1074 1088 << " TPos=" << i8 << dec << endl; 1075 1089 break; … … 1077 1091 case PPS_ENDOBJECT : 1078 1092 GetRawU8(oid); 1079 cout << "<PPS_ENDOBJECT> tag at position " << hex << cpos << " ObjectId= " 1093 cout << indents[idxindent] 1094 << "<PPS_ENDOBJECT> tag at position " << hex << cpos << " ObjectId= " 1080 1095 << oid << dec << endl; 1096 idxind--; 1097 idxindent = (idxind >= 0) ? idxind : 0; 1081 1098 break; 1082 1099 … … 1084 1101 GetRawI4(i4); 1085 1102 for(int kkt=0; kkt<i4; kkt++) GetRawI8(i8); 1086 cout << "<PPS_POSTAG_TABLE> tag at position " << hex << cpos << dec << endl; 1103 cout << indents[idxindent] 1104 << "<PPS_POSTAG_TABLE> tag at position " << hex << cpos << dec << endl; 1087 1105 break; 1088 1106 … … 1095 1113 buff[i4] = '\0'; str = buff; 1096 1114 delete[] buff; 1097 cout << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec 1115 cout << indents[idxindent] 1116 << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec 1098 1117 << " Name= " << str << endl; 1099 1118 } 1100 1119 else { 1101 cout << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec << endl; 1120 cout << indents[idxindent] 1121 << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec << endl; 1102 1122 int_8 stats[8]; 1103 1123 GetI8s(stats,8); … … 1117 1137 case PPS_EOF : 1118 1138 if (Version() < 3) GetRawI8(i8); 1119 cout << "<PPS_EOF> tag at position " << hex << cpos 1139 cout << indents[idxindent] 1140 << "<PPS_EOF> tag at position " << hex << cpos 1120 1141 << " TagPos=" << i8 << dec << endl; 1121 1142 eofok = true; … … 1148 1169 1149 1170 case PPS_SIMPLE : 1150 if (lev > 2) cout << "<PPS_SIMPLE> tag at position " << hex << cpos << dec 1171 if (lev > 2) cout << indents[idxindent] 1172 << "<PPS_SIMPLE> tag at position " << hex << cpos << dec 1151 1173 << " DataType=" << dtype << endl; 1152 1174 s->seekg(dsizeskip, ios::cur); … … 1155 1177 case PPS_SIMPLE_ARRAY4 : 1156 1178 GetRawI4(i4); 1157 if (lev > 0) cout << "<PPS_SIMPLE_ARRAY4> tag at position " << hex << cpos << dec 1179 if (lev > 0) cout << indents[idxindent] 1180 << "<PPS_SIMPLE_ARRAY4> tag at position " << hex << cpos << dec 1158 1181 << " DataType=" << dtype << " NElts= " << i4 << endl; 1159 1182 s->seekg(dsizeskip*(int_8)i4, ios::cur); … … 1162 1185 case PPS_SIMPLE_ARRAY8 : 1163 1186 GetRawU8(ui8); 1164 if (lev > 0) cout << "<PPS_SIMPLE_ARRAY8> tag at position " << hex << cpos << dec 1187 if (lev > 0) cout << indents[idxindent] 1188 << "<PPS_SIMPLE_ARRAY8> tag at position " << hex << cpos << dec 1165 1189 << " DataType=" << dtype << " NElts= " << ui8 << endl; 1166 1190 s->seekg(dsizeskip*ui8, ios::cur); -
trunk/SophyaLib/BaseTools/sophyainit.cc
r2615 r2660 14 14 #include "fiondblock.h" 15 15 #include "dvlist.h" 16 17 #include "fiosegdb.h" 18 #include "ppfwrapstlv.h" 16 19 17 20 #include "sversion.h" … … 52 55 #endif 53 56 57 // Initialisation des mecanismes PPF I/O 54 58 PIOPersist::Initialize(); 59 // Enregistrement des handlers PPF pour les NDataBlock<T> 55 60 PPRegister(FIO_NDataBlock<uint_1>); 56 61 DObjRegister(FIO_NDataBlock<uint_1>, NDataBlock<uint_1>); … … 76 81 DObjRegister(FIO_NDataBlock< complex<r_8> >, NDataBlock< complex<r_8> >); 77 82 83 // Enregistrement des handlers PPF pour les DVList 78 84 PPRegister(ObjFileIO<DVList>); 79 85 DObjRegister(ObjFileIO<DVList>, DVList); 86 87 // Enregistrement des handlers PPF pour les SegDataBlock<T> 88 PPRegister(FIO_SegDataBlock<uint_2>); 89 DObjRegister(FIO_SegDataBlock<uint_2>, SegDataBlock<uint_2>); 90 PPRegister(FIO_SegDataBlock<int_2>); 91 DObjRegister(FIO_SegDataBlock<int_2>, SegDataBlock<int_2>); 92 PPRegister(FIO_SegDataBlock<int_4>); 93 DObjRegister(FIO_SegDataBlock<int_4>, SegDataBlock<int_4>); 94 PPRegister(FIO_SegDataBlock<int_8>); 95 DObjRegister(FIO_SegDataBlock<int_8>, SegDataBlock<int_8>); 96 PPRegister(FIO_SegDataBlock<uint_4>); 97 DObjRegister(FIO_SegDataBlock<uint_4>, SegDataBlock<uint_4>); 98 PPRegister(FIO_SegDataBlock<uint_8>); 99 DObjRegister(FIO_SegDataBlock<uint_8>, SegDataBlock<uint_8>); 100 PPRegister(FIO_SegDataBlock<r_4>); 101 DObjRegister(FIO_SegDataBlock<r_4>, SegDataBlock<r_4>); 102 PPRegister(FIO_SegDataBlock<r_8>); 103 DObjRegister(FIO_SegDataBlock<r_8>, SegDataBlock<r_8>); 104 PPRegister(FIO_SegDataBlock< complex<r_4> >); 105 DObjRegister(FIO_SegDataBlock< complex<r_4> >, SegDataBlock< complex<r_4> >); 106 PPRegister(FIO_SegDataBlock< complex<r_8> >); 107 DObjRegister(FIO_SegDataBlock< complex<r_8> >, SegDataBlock< complex<r_8> >); 108 PPRegister(FIO_SegDataBlock<string>); 109 DObjRegister(FIO_SegDataBlock<string>, SegDataBlock<string>); 110 111 // Enregistrement des handlers PPF pour les vecteurs de la STL 112 PPRegister(PPFWrapperSTLVector<uint_2>); 113 DObjRegister(PPFWrapperSTLVector<uint_2>, std::vector<uint_2>); 114 PPRegister(PPFWrapperSTLVector<int_2>); 115 DObjRegister(PPFWrapperSTLVector<int_2>, std::vector<int_2>); 116 PPRegister(PPFWrapperSTLVector<int_4>); 117 DObjRegister(PPFWrapperSTLVector<int_4>, std::vector<int_4>); 118 PPRegister(PPFWrapperSTLVector<int_8>); 119 DObjRegister(PPFWrapperSTLVector<int_8>, std::vector<int_8>); 120 PPRegister(PPFWrapperSTLVector<uint_4>); 121 DObjRegister(PPFWrapperSTLVector<uint_4>, std::vector<uint_4>); 122 PPRegister(PPFWrapperSTLVector<uint_8>); 123 DObjRegister(PPFWrapperSTLVector<uint_8>, std::vector<uint_8>); 124 PPRegister(PPFWrapperSTLVector<r_4>); 125 DObjRegister(PPFWrapperSTLVector<r_4>, std::vector<r_4>); 126 PPRegister(PPFWrapperSTLVector<r_8>); 127 DObjRegister(PPFWrapperSTLVector<r_8>, std::vector<r_8>); 128 PPRegister(PPFWrapperSTLVector< complex<r_4> >); 129 DObjRegister(PPFWrapperSTLVector< complex<r_4> >, std::vector< complex<r_4> >); 130 PPRegister(PPFWrapperSTLVector< complex<r_8> >); 131 DObjRegister(PPFWrapperSTLVector< complex<r_8> >, std::vector< complex<r_8> >); 132 PPRegister(PPFWrapperSTLVector<string>); 133 DObjRegister(PPFWrapperSTLVector<string>, std::vector<string>); 80 134 81 135
Note:
See TracChangeset
for help on using the changeset viewer.