Index: trunk/SophyaLib/BaseTools/ppfbinstream.cc
===================================================================
--- trunk/SophyaLib/BaseTools/ppfbinstream.cc	(revision 2615)
+++ trunk/SophyaLib/BaseTools/ppfbinstream.cc	(revision 2660)
@@ -1007,5 +1007,11 @@
   char * buff;
   string str;
-  
+  // Pour indenter lors de l'impression 
+  #define _MXINDENT_ 10 
+  char * indents[_MXINDENT_+1] = {"","  ", "    ", "      ", "        ", "          ",
+				    "            ", "              ", "                ",
+				    "                  ", "                    "};
+  int idxindent = 0;
+  int idxind = 0;
   cout << "\n ---------------------------------------------------------- " << endl;
   cout << " PPFBinaryInputStream::AnalyseTags(Level= " << lev << ")" << endl; 
@@ -1041,10 +1047,12 @@
 
       case PPS_NULL :
-	if (lev > 1)  cout << "<PPS_NULL> tag at position " << hex << cpos << dec << endl;
+	if (lev > 1)  cout << indents[idxindent] 
+			   << "<PPS_NULL> tag at position " << hex << cpos << dec << endl;
 	break;
 
       case PPS_STRING :
 	GetRawI4(i4);
-	if (lev > 1)  cout << "<PPS_STRING> tag at position " << hex << cpos << dec 
+	if (lev > 1)  cout << indents[idxindent]
+			   << "<PPS_STRING> tag at position " << hex << cpos << dec 
 			   << " Length=" << i4 << endl;
 	s->seekg(i4,ios::cur);
@@ -1054,6 +1062,9 @@
 	GetRawU8(cid);
 	GetRawU8(oid);
-	cout << "<PPS_OBJECT> tag at position " << hex << cpos << " ClassId= " << cid 
+	cout << indents[idxindent] 
+	     << "<PPS_OBJECT> tag at position " << hex << cpos << " ClassId= " << cid 
 	     << "  ObjectId= " << oid << dec << endl;
+	idxind++;
+	idxindent = (idxind <= _MXINDENT_) ? idxind : _MXINDENT_;
 	break;
 
@@ -1061,15 +1072,18 @@
 	GetRawU8(oid);
 	GetRawI8(i8);
-	cout << "<PPS_REFERENCE> tag at position " << hex << cpos << "  ObjectId= " 
+	cout << indents[idxindent] 
+	     << "<PPS_REFERENCE> tag at position " << hex << cpos << "  ObjectId= " 
 	     << oid << "  OrigPos=" << i8 << dec << endl;
 	break;
 
       case PPS_NAMETAG_MARK :
-	cout << "<PPS_NAMETAG_MARK> tag at position " << hex << cpos << dec << endl; 
+	cout << indents[idxindent] 
+	     << "<PPS_NAMETAG_MARK> tag at position " << hex << cpos << dec << endl; 
 	break;
 
       case PPS_POSTAG_MARK :
 	GetRawI8(i8);	
-	cout << "<PPS_POSTAG_MARK> tag at position " << hex << cpos 
+	cout << indents[idxindent] 
+	     << "<PPS_POSTAG_MARK> tag at position " << hex << cpos 
 	     << " TPos=" << i8 << dec << endl; 
 	break;
@@ -1077,6 +1091,9 @@
       case PPS_ENDOBJECT :
 	GetRawU8(oid);
-	cout << "<PPS_ENDOBJECT> tag at position " << hex << cpos << "  ObjectId= " 
+	cout << indents[idxindent] 
+	     << "<PPS_ENDOBJECT> tag at position " << hex << cpos << "  ObjectId= " 
 	     << oid << dec << endl;
+	idxind--;
+	idxindent = (idxind >= 0) ? idxind : 0;
 	break;
 
@@ -1084,5 +1101,6 @@
 	GetRawI4(i4);
 	for(int kkt=0; kkt<i4; kkt++)  GetRawI8(i8);	
-	cout << "<PPS_POSTAG_TABLE> tag at position " << hex << cpos << dec << endl; 
+	cout << indents[idxindent]
+	     << "<PPS_POSTAG_TABLE> tag at position " << hex << cpos << dec << endl; 
 	break;
 
@@ -1095,9 +1113,11 @@
 	  buff[i4] = '\0';  str = buff;
 	  delete[] buff;
-	  cout << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec 
+	  cout << indents[idxindent]
+	       << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec 
 	       << " Name= " << str << endl; 
 	}
 	else {
-	  cout << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec << endl;
+	  cout << indents[idxindent]
+	       << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec << endl;
 	  int_8 stats[8];
 	  GetI8s(stats,8); 
@@ -1117,5 +1137,6 @@
       case PPS_EOF :
 	if (Version() < 3) GetRawI8(i8);	
-	cout << "<PPS_EOF> tag at position " << hex << cpos  
+	cout << indents[idxindent]
+	     << "<PPS_EOF> tag at position " << hex << cpos  
 	     << " TagPos=" << i8 << dec << endl;
 	eofok = true;
@@ -1148,5 +1169,6 @@
 
       case PPS_SIMPLE :
-	if (lev > 2)  cout << "<PPS_SIMPLE> tag at position " << hex << cpos << dec 
+	if (lev > 2)  cout << indents[idxindent]
+			   << "<PPS_SIMPLE> tag at position " << hex << cpos << dec 
 			   << " DataType=" << dtype << endl;
 	s->seekg(dsizeskip, ios::cur);
@@ -1155,5 +1177,6 @@
       case PPS_SIMPLE_ARRAY4 :
 	GetRawI4(i4);
-	if (lev > 0)  cout << "<PPS_SIMPLE_ARRAY4> tag at position " << hex << cpos << dec 
+	if (lev > 0)  cout << indents[idxindent]
+			   << "<PPS_SIMPLE_ARRAY4> tag at position " << hex << cpos << dec 
 			   << " DataType=" << dtype << " NElts= " << i4 << endl;
 	s->seekg(dsizeskip*(int_8)i4, ios::cur);
@@ -1162,5 +1185,6 @@
       case PPS_SIMPLE_ARRAY8 :
 	GetRawU8(ui8);
-	if (lev > 0)  cout << "<PPS_SIMPLE_ARRAY8> tag at position " << hex << cpos << dec 
+	if (lev > 0)  cout << indents[idxindent]
+			   << "<PPS_SIMPLE_ARRAY8> tag at position " << hex << cpos << dec 
 			   << " DataType=" << dtype << " NElts= " << ui8 << endl;
 	s->seekg(dsizeskip*ui8, ios::cur);
