Changeset 2660 in Sophya for trunk/SophyaLib/BaseTools


Ignore:
Timestamp:
Apr 7, 2005, 11:49:11 AM (20 years ago)
Author:
ansari
Message:

1/ Ajout de la classe PPFWrapperSTLVector<T> pour gestion de persistence
PPF des vecteurs de STL (fichier ppfwrapstlv.h)
2/ Ajout de la classe SegDataBlock<T> (et l'interface SegDBInterface<T>)
pour la gestion de blocs de donnees segmentes (segdatablock.h) et son
gestionnaire PPF FIO_SegDataBlock<T> (fichier fiosegdb.h )
3/ Ajout de la classe SwSegDataBlock<T> (Data bloc segmente avec gestion
de swap) et la classe swapper PPF PPFDataSwapper<T> (fichiers
ppfswapper.h et swsegdb.h)
4/ Ajout de la classes utilitaire PPF_TPointer_IO<T> (fichier
ppftpointer.h)
5/ Enregistrement des classes handler PPF ds sophyainit.cc
6/ Amelioration de l'impression ds AnalyseTags (ppfbinstream.cc)
7/ MAJ Makefile et objlist.list (ajout de TimeStamp.cc en particulier)

Reza , 7 Avril 2005

Location:
trunk/SophyaLib/BaseTools
Files:
6 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/Makefile

    r2611 r2660  
    33all: $(LIB)libBaseTools.a
    44clean:
    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.o
     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)timestamp.o $(OBJ)gnumd5.o $(OBJ)srandgen.o
    66        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
    88        $(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS))
    99ifeq ($(CXX),cxx)
     
    1111endif
    1212 
    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
    3945$(OBJ)gnumd5.o: gnumd5.c $(INC)machdefs.h bithelp.h \
    40  gnumd5.h
     46  gnumd5.h
    4147$(OBJ)srandgen.o: srandgen.c $(INC)machdefs.h \
    42  srandgen.h smathconst.h
     48  srandgen.h smathconst.h
  • trunk/SophyaLib/BaseTools/objlist.list

    r2475 r2660  
    1111sophyainit.o
    1212srandgen.o
     13timestamp.o
  • trunk/SophyaLib/BaseTools/ppersist.h

    r2657 r2660  
    187187// On utilise le macro RAWPERSISTIO pour declarer POutPersist << et PInPersist >>
    188188// pour les types de base r_4 r_8 int_4 int_8 ...
     189  RAWPERSISTIO(int_8,I8);
     190  RAWPERSISTIO(uint_8,U8);
    189191  RAWPERSISTIO(int_4,I4);
    190192  RAWPERSISTIO(uint_4,U4);
  • trunk/SophyaLib/BaseTools/ppfbinstream.cc

    r2615 r2660  
    10071007  char * buff;
    10081008  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;
    10101016  cout << "\n ---------------------------------------------------------- " << endl;
    10111017  cout << " PPFBinaryInputStream::AnalyseTags(Level= " << lev << ")" << endl;
     
    10411047
    10421048      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;
    10441051        break;
    10451052
    10461053      case PPS_STRING :
    10471054        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
    10491057                           << " Length=" << i4 << endl;
    10501058        s->seekg(i4,ios::cur);
     
    10541062        GetRawU8(cid);
    10551063        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
    10571066             << "  ObjectId= " << oid << dec << endl;
     1067        idxind++;
     1068        idxindent = (idxind <= _MXINDENT_) ? idxind : _MXINDENT_;
    10581069        break;
    10591070
     
    10611072        GetRawU8(oid);
    10621073        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= "
    10641076             << oid << "  OrigPos=" << i8 << dec << endl;
    10651077        break;
    10661078
    10671079      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;
    10691082        break;
    10701083
    10711084      case PPS_POSTAG_MARK :
    10721085        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
    10741088             << " TPos=" << i8 << dec << endl;
    10751089        break;
     
    10771091      case PPS_ENDOBJECT :
    10781092        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= "
    10801095             << oid << dec << endl;
     1096        idxind--;
     1097        idxindent = (idxind >= 0) ? idxind : 0;
    10811098        break;
    10821099
     
    10841101        GetRawI4(i4);
    10851102        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;
    10871105        break;
    10881106
     
    10951113          buff[i4] = '\0';  str = buff;
    10961114          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
    10981117               << " Name= " << str << endl;
    10991118        }
    11001119        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;
    11021122          int_8 stats[8];
    11031123          GetI8s(stats,8);
     
    11171137      case PPS_EOF :
    11181138        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 
    11201141             << " TagPos=" << i8 << dec << endl;
    11211142        eofok = true;
     
    11481169
    11491170      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
    11511173                           << " DataType=" << dtype << endl;
    11521174        s->seekg(dsizeskip, ios::cur);
     
    11551177      case PPS_SIMPLE_ARRAY4 :
    11561178        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
    11581181                           << " DataType=" << dtype << " NElts= " << i4 << endl;
    11591182        s->seekg(dsizeskip*(int_8)i4, ios::cur);
     
    11621185      case PPS_SIMPLE_ARRAY8 :
    11631186        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
    11651189                           << " DataType=" << dtype << " NElts= " << ui8 << endl;
    11661190        s->seekg(dsizeskip*ui8, ios::cur);
  • trunk/SophyaLib/BaseTools/sophyainit.cc

    r2615 r2660  
    1414#include "fiondblock.h"
    1515#include "dvlist.h"
     16
     17#include "fiosegdb.h"
     18#include "ppfwrapstlv.h"
    1619
    1720#include "sversion.h"
     
    5255  #endif
    5356
     57  // Initialisation des mecanismes PPF I/O
    5458  PIOPersist::Initialize();
     59  // Enregistrement des handlers PPF pour les NDataBlock<T>
    5560  PPRegister(FIO_NDataBlock<uint_1>);
    5661  DObjRegister(FIO_NDataBlock<uint_1>, NDataBlock<uint_1>);
     
    7681  DObjRegister(FIO_NDataBlock< complex<r_8> >, NDataBlock< complex<r_8> >);
    7782
     83  // Enregistrement des handlers PPF pour les DVList
    7884  PPRegister(ObjFileIO<DVList>);
    7985  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>);
    80134
    81135
Note: See TracChangeset for help on using the changeset viewer.