// @(#)root/gviz3d:$Id$
// Author: Tomasz Sosnicki   18/09/09

/************************************************************************
* Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
* All rights reserved.                                                  *
*                                                                       *
* For the licensing terms see $ROOTSYS/LICENSE.                         *
* For the list of contributors see $ROOTSYS/README/CREDITS.             *
*************************************************************************/

#include "TStructViewer.h"
#include "TStructNodeProperty.h"
#include "TStructViewerGUI.h"
#include "TStructNode.h"

#include <TDataMember.h>
#include <TVirtualCollectionProxy.h>
#include <TClassEdit.h>
#include <vector>

ClassImp(TStructViewer);

class TA {
public:
   virtual ~TA() {}
};

//________________________________________________________________________
//////////////////////////////////////////////////////////////////////////
//
// TStructViewer viewer represents class, struct or other type as an object in 3D space.
// At the top of the scene we can see objects which is our pointer. Under it we see
// pointers and collection elements. Collection must inherit from TCollection
// or be STL collecion.
//
// We can change the number of visible levels or objects on the scene with the  GUI or
// methods. The size of geometry objects is proportional to the memory taken by this object
// or to the number of members inside this object.
//
// An easy way to find some class in the viewer is to change the color of the type.
// We can connect for example a TF2 class with red color or connect all classes
// inheriting from TF2 by adding plus to name. For example typename "TF2+" tells us
// that all classes inheriting from TF2 will be red.
//
// Navigation in viewer is very simple like in usual GLViewer. When you put the mouse over
// some object you can see some information about it (e.g. name, size, actual level).
// When you double click this object, it becames top object on scene.
// Undo and redo operation are supported.
//
// Begin_Html
// <p> In this picture we can see TStructViewer with pointer to TList which contains
// other collections and objects of various classes</p>
// <img src="gif/TStructViewer1.jpg">
// End_Html
//
// Begin_Html
// <p> Other screenshot presents opened TStructNodeEditor</p>
// <img src="gif/TStructViewer2.jpg">
// End_Html
//
//
//////////////////////////////////////////////////////////////////////////


//________________________________________________________________________
TStructViewer::TStructViewer(void* ptr, const char * clname)
{
   // Default constructor. An argument "ptr" is a main pointer of type "clname", which should be shown in the viewer

   fPointer = NULL;
   fPointerClass = NULL;
   fTopNode = NULL;

   // add default color
   fColors.Add(new TStructNodeProperty("+", 17));

   // creating GUI
   fGUI = new TStructViewerGUI(this, NULL, &fColors);

   SetPointer(ptr, clname);
}

//________________________________________________________________________
TStructViewer::~TStructViewer()
{
   // Destructor. Clean all object after closing the viewer

   Reset();
   fColors.SetOwner();
   fColors.Clear();
}

//________________________________________________________________________
void TStructViewer::AddNode(TStructNode* node, ULong_t size)
{
   // Find list with nodes on specified level and add node to this list and increment list of sizes and list of members

   TList* list = (TList*)fLevelArray[node->GetLevel()];
   // if list doesn't exist -> create one
   if(!list) {
      fLevelArray[node->GetLevel()] = list = new TList();
   }
   list->Add(node);

   // increase number of members on this level
   fLevelMembersCount(node->GetLevel())++;
   // increase size of this level
   fLevelSize(node->GetLevel()) += size;
}

//________________________________________________________________________
void TStructViewer::CountMembers(TClass* cl, TStructNode* parent, void* pointer)
{
   // Count allocated memory, increase member counters, find child nodes

   if(!cl) {
      return;
   }

   if (cl->InheritsFrom(TClass::Class())) {
      return;
   }

   //////////////////////////////////////////////////////////////////////////
   // DATA MEMBERS
   //////////////////////////////////////////////////////////////////////////
   // Set up list of RealData so TClass doesn't create a new object itself
   cl->BuildRealData(parent->GetPointer());
   TIter it(cl->GetListOfDataMembers());
   TDataMember* dm;
   while ((dm = (TDataMember*) it() ))
   {
      // increase counters in parent node
      parent->SetAllMembersCount(parent->GetAllMembersCount() + 1);
      parent->SetMembersCount(parent->GetMembersCount() + 1);

      if (dm->Property() & kIsStatic) {
         continue;
      }


      void* ptr = NULL;

      if(dm->IsaPointer()) {
         TString trueTypeName = dm->GetTrueTypeName();

         // skip if pointer to pointer
         if(trueTypeName.EndsWith("**")) {
            continue;
         }

         if (!pointer) {
            continue;
         }

         void** pptr = (void**)((ULong_t)pointer + dm->GetOffset());
         ptr = *pptr;

         if (!ptr) {
            continue;
         }

         if(fPointers.GetValue((ULong_t)ptr)) {
            continue;
         } else {
            fPointers.Add((ULong_t)ptr, (ULong_t)ptr);
         }

         ULong_t size = 0;
         if (TClass* cl2 = TClass::GetClass(dm->GetTypeName())) {
            size = cl2->Size();
         }

         if(size == 0) {
            size = dm->GetUnitSize();
         }

         ENodeType type;
         if(dm->GetDataType()) {   // pointer to basic type
            type = kBasic;
         } else {
            type = kClass;
         }

         // creating TStructNode
         TStructNode* node = new TStructNode(dm->GetName(), dm->GetTypeName(), ptr, parent, size, type);
         AddNode(node, size);

         CountMembers(TClass::GetClass(dm->GetTypeName()), node, ptr);

         // total size = size of parent + size of nodes daughters
         parent->SetTotalSize(parent->GetTotalSize() + node->GetTotalSize() - size);
         // all members of node = all nodes of parent + nodes of daughter - 1 because node is added twice
         parent->SetAllMembersCount(parent->GetAllMembersCount() + node->GetAllMembersCount() - 1);
      } else {
         ptr = (void*)((ULong_t)pointer + dm->GetOffset());

         if (!ptr) {
            continue;
         }
         CountMembers(TClass::GetClass(dm->GetTypeName()), parent, ptr);
      }

      //////////////////////////////////////////////////////////////////////////
      // STL COLLECTION
      //////////////////////////////////////////////////////////////////////////
      if (dm->IsSTLContainer()) {
         parent->SetNodeType(kSTLCollection);

         //it works only for pointer in std object (not pointer)
         TClass* stlClass = TClass::GetClass(dm->GetTypeName());
         if (!stlClass) {
            continue;
         }

         TVirtualCollectionProxy* proxy = stlClass->GetCollectionProxy();
         if (!proxy) {
            continue;
         }
         TVirtualCollectionProxy::TPushPop helper(proxy, ptr);

         UInt_t count = proxy->Size();
         parent->SetMembersCount(parent->GetMembersCount() + count);

         if (!proxy->HasPointers() || proxy->GetType() != kNoType_t) { // only objects or pointers to basic type
            parent->SetTotalSize(parent->GetTotalSize() + count * proxy->Sizeof());
            parent->SetAllMembersCount(parent->GetAllMembersCount() + count);
         } else {
            TClass* clProxy = proxy->GetValueClass();
            TString name;
            TString typeName;
            // get size of element
            ULong_t size = 0;
            if (clProxy) {
               name = clProxy->GetName();
               typeName = clProxy->GetName();
               size = clProxy->Size();
            } else {
               continue;
            }

            // if there is no dictionary
            if (size == 0) {
               size = proxy->Sizeof();
            }

            // searching pointer to pointer
            Bool_t ptp = kFALSE;
            std::vector<std::string> parts;
            int loc;
            TClassEdit::GetSplit(dm->GetTypeName(), parts, loc);
            std::vector<std::string>::const_iterator iPart = parts.begin();
            while (iPart != parts.end() && *iPart == "")
               ++iPart;
            if (iPart != parts.end() && *iPart != dm->GetTypeName()) {
               for (std::vector<std::string>::const_iterator iP = iPart,
                  iPE = parts.end(); iP != iPE; ++iP) {
                     if (TString(TClassEdit::ResolveTypedef(iP->c_str(), true).c_str()).EndsWith("**")){
                        ptp = kTRUE;
                        break;
                     }
               }
            }
            if (ptp) {
               continue;
            }


            void* element;
            for (UInt_t i = 0; i < count ; i++) {
               element = *(void**)proxy->At(i);

               if (!element) {
                  continue;
               }
               if (clProxy->IsTObject()) {
                  name = ((TObject*) element)->GetName();
               }

               // create node
               TStructNode* node = new TStructNode(name, typeName, element, parent, size, kClass);
               // add addition information
               AddNode(node, size);
               // increase parents counter
               parent->SetMembersCount(parent->GetMembersCount() + 1);

               CountMembers(clProxy, node, element);
               parent->SetTotalSize(parent->GetTotalSize() + node->GetTotalSize());
               parent->SetAllMembersCount(parent->GetAllMembersCount() + node->GetAllMembersCount());
            }
         }
      }
   }

   //////////////////////////////////////////////////////////////////////////
   // COLLECTION
   //////////////////////////////////////////////////////////////////////////
   // if our parent node is collection
   if(cl->InheritsFrom(TCollection::Class())) {
      // we change type of node to collection
      parent->SetNodeType(kCollection);

      // return if invalid pointer to collection
      if (!pointer) {
         return;
      }

      TIter it2((TCollection*)pointer);
      TObject* item;
      // loop through all elements in collection
      while((item = it2())) {
         // get size of element
         ULong_t size = 0;
         if (TClass* cl3 = item->IsA()){
            size = cl3->Size();
         }

         // if there is no dictionary
         if (size == 0) {
            size = sizeof(item);
         }

         // create node
         TStructNode* node = new TStructNode(item->GetName(), item->ClassName(), item, parent, size, kClass);
         // add addition information
         AddNode(node, size);
         // increase parents counter
         parent->SetMembersCount(parent->GetMembersCount() + 1);

         CountMembers(item->IsA(), node, item);

         parent->SetTotalSize(parent->GetTotalSize() + node->GetTotalSize());
         parent->SetAllMembersCount(parent->GetAllMembersCount() + node->GetAllMembersCount());
      }
   }
}

//________________________________________________________________________
void TStructViewer::Draw(Option_t *option)
{
   // Draw object if there is valid pointer

   TString opt(option);
   if(opt == "count") {

   } else if (opt == "size") {

   }


   if (fTopNode) {
      fGUI->SetNodePtr(fTopNode);
   } else {

   }
}

//________________________________________________________________________
TCanvas* TStructViewer::GetCanvas()
{
   // Returns canvas used to keep TGeoVolumes

   return fGUI->GetCanvas();
}

//________________________________________________________________________
TGMainFrame* TStructViewer::GetFrame()
{
   // Returns pointer to main window

   return fGUI;
}
//________________________________________________________________________
void* TStructViewer::GetPointer() const
{
   // Return main pointer

   return fPointer;
}

//________________________________________________________________________
TExMap TStructViewer::GetLevelMembersCount() const
{
   // Returns TExMap with pairs <level number, number of objects>

   return fLevelMembersCount;
}

//________________________________________________________________________
TExMap TStructViewer::GetLevelSize() const
{
   // Returns TExMap with pairs <level number, size of level in bytes>

   return fLevelSize;
}

//________________________________________________________________________
Bool_t TStructViewer::GetLinksVisibility() const
{
   // Get visibility of links between objects

   return fGUI->GetLinksVisibility();
}

//________________________________________________________________________
void TStructViewer::Prepare()
{
   // Create top node and find all member nodes
   if (fTopNode) {
      Reset();
   }

   ULong_t size = fPointerClass->Size();

   TString name = "Main pointer";
   if (fPointerClass->IsTObject()) {
      name = ((TObject*) fPointer)->GetName();
   }
   fTopNode = new TStructNode(name, fPointerClass->GetName(), fPointer, NULL, size, kClass);
   AddNode(fTopNode, size);
   CountMembers(fPointerClass, fTopNode, fPointer);
}

//________________________________________________________________________
void TStructViewer::Reset()
{
   // Deleting nodes, maps and array

   TList* lst;
   TIter it(&fLevelArray);
   while ((lst = (TList*) it() )) {
      lst->SetOwner();
      lst->Clear();
   }

   // deleting maps and array
   fLevelMembersCount.Clear();
   fLevelSize.Clear();
   fPointers.Clear();
   fLevelArray.Clear();

   fTopNode = NULL;
}

//________________________________________________________________________
void TStructViewer::SetColor(TString name, Int_t color)
{
   // Sets color for the class "name" to color "color"

   TIter it(&fColors);
   TStructNodeProperty* prop;
   while ((prop = (TStructNodeProperty*) it() )) {
      if (name == prop->GetName()) {
         prop->SetColor(TColor::GetColor(color));
         fGUI->Update();

         return;
      }
   }

   // add color
   prop = new TStructNodeProperty(name.Data(), color);
   fColors.Add(prop);
   fColors.Sort();
}

//________________________________________________________________________
void TStructViewer::SetLinksVisibility(Bool_t val)
{
   // ISets links visibility

   fGUI->SetLinksVisibility(val);
}

//________________________________________________________________________
void TStructViewer::SetPointer(void* ptr, const char* clname)
{
   // Set main pointer of class "clname"

   if (ptr) {
      TA* a = (TA*) ptr;
      if (clname) {
         fPointerClass = TClass::GetClass(clname);
      } else {
         fPointerClass = TClass::GetClass(typeid(*a));
      }

      if (!fPointerClass) {
         return;
      }

      fPointer = ptr;
      Prepare();
      fGUI->SetNodePtr(fTopNode);
   }
}

//________________________________________________________________________
TColor TStructViewer::GetColor(const char* typeName)
{
   // Returns color associated with type "typeName"

   TIter it(&fColors);
   TStructNodeProperty* prop;
   while((prop = (TStructNodeProperty*) it())) {
      if (!strcmp(prop->GetName(), typeName)) {
         return prop->GetColor();
      }
   }

   return TColor();
}
 TStructViewer.cxx:1
 TStructViewer.cxx:2
 TStructViewer.cxx:3
 TStructViewer.cxx:4
 TStructViewer.cxx:5
 TStructViewer.cxx:6
 TStructViewer.cxx:7
 TStructViewer.cxx:8
 TStructViewer.cxx:9
 TStructViewer.cxx:10
 TStructViewer.cxx:11
 TStructViewer.cxx:12
 TStructViewer.cxx:13
 TStructViewer.cxx:14
 TStructViewer.cxx:15
 TStructViewer.cxx:16
 TStructViewer.cxx:17
 TStructViewer.cxx:18
 TStructViewer.cxx:19
 TStructViewer.cxx:20
 TStructViewer.cxx:21
 TStructViewer.cxx:22
 TStructViewer.cxx:23
 TStructViewer.cxx:24
 TStructViewer.cxx:25
 TStructViewer.cxx:26
 TStructViewer.cxx:27
 TStructViewer.cxx:28
 TStructViewer.cxx:29
 TStructViewer.cxx:30
 TStructViewer.cxx:31
 TStructViewer.cxx:32
 TStructViewer.cxx:33
 TStructViewer.cxx:34
 TStructViewer.cxx:35
 TStructViewer.cxx:36
 TStructViewer.cxx:37
 TStructViewer.cxx:38
 TStructViewer.cxx:39
 TStructViewer.cxx:40
 TStructViewer.cxx:41
 TStructViewer.cxx:42
 TStructViewer.cxx:43
 TStructViewer.cxx:44
 TStructViewer.cxx:45
 TStructViewer.cxx:46
 TStructViewer.cxx:47
 TStructViewer.cxx:48
 TStructViewer.cxx:49
 TStructViewer.cxx:50
 TStructViewer.cxx:51
 TStructViewer.cxx:52
 TStructViewer.cxx:53
 TStructViewer.cxx:54
 TStructViewer.cxx:55
 TStructViewer.cxx:56
 TStructViewer.cxx:57
 TStructViewer.cxx:58
 TStructViewer.cxx:59
 TStructViewer.cxx:60
 TStructViewer.cxx:61
 TStructViewer.cxx:62
 TStructViewer.cxx:63
 TStructViewer.cxx:64
 TStructViewer.cxx:65
 TStructViewer.cxx:66
 TStructViewer.cxx:67
 TStructViewer.cxx:68
 TStructViewer.cxx:69
 TStructViewer.cxx:70
 TStructViewer.cxx:71
 TStructViewer.cxx:72
 TStructViewer.cxx:73
 TStructViewer.cxx:74
 TStructViewer.cxx:75
 TStructViewer.cxx:76
 TStructViewer.cxx:77
 TStructViewer.cxx:78
 TStructViewer.cxx:79
 TStructViewer.cxx:80
 TStructViewer.cxx:81
 TStructViewer.cxx:82
 TStructViewer.cxx:83
 TStructViewer.cxx:84
 TStructViewer.cxx:85
 TStructViewer.cxx:86
 TStructViewer.cxx:87
 TStructViewer.cxx:88
 TStructViewer.cxx:89
 TStructViewer.cxx:90
 TStructViewer.cxx:91
 TStructViewer.cxx:92
 TStructViewer.cxx:93
 TStructViewer.cxx:94
 TStructViewer.cxx:95
 TStructViewer.cxx:96
 TStructViewer.cxx:97
 TStructViewer.cxx:98
 TStructViewer.cxx:99
 TStructViewer.cxx:100
 TStructViewer.cxx:101
 TStructViewer.cxx:102
 TStructViewer.cxx:103
 TStructViewer.cxx:104
 TStructViewer.cxx:105
 TStructViewer.cxx:106
 TStructViewer.cxx:107
 TStructViewer.cxx:108
 TStructViewer.cxx:109
 TStructViewer.cxx:110
 TStructViewer.cxx:111
 TStructViewer.cxx:112
 TStructViewer.cxx:113
 TStructViewer.cxx:114
 TStructViewer.cxx:115
 TStructViewer.cxx:116
 TStructViewer.cxx:117
 TStructViewer.cxx:118
 TStructViewer.cxx:119
 TStructViewer.cxx:120
 TStructViewer.cxx:121
 TStructViewer.cxx:122
 TStructViewer.cxx:123
 TStructViewer.cxx:124
 TStructViewer.cxx:125
 TStructViewer.cxx:126
 TStructViewer.cxx:127
 TStructViewer.cxx:128
 TStructViewer.cxx:129
 TStructViewer.cxx:130
 TStructViewer.cxx:131
 TStructViewer.cxx:132
 TStructViewer.cxx:133
 TStructViewer.cxx:134
 TStructViewer.cxx:135
 TStructViewer.cxx:136
 TStructViewer.cxx:137
 TStructViewer.cxx:138
 TStructViewer.cxx:139
 TStructViewer.cxx:140
 TStructViewer.cxx:141
 TStructViewer.cxx:142
 TStructViewer.cxx:143
 TStructViewer.cxx:144
 TStructViewer.cxx:145
 TStructViewer.cxx:146
 TStructViewer.cxx:147
 TStructViewer.cxx:148
 TStructViewer.cxx:149
 TStructViewer.cxx:150
 TStructViewer.cxx:151
 TStructViewer.cxx:152
 TStructViewer.cxx:153
 TStructViewer.cxx:154
 TStructViewer.cxx:155
 TStructViewer.cxx:156
 TStructViewer.cxx:157
 TStructViewer.cxx:158
 TStructViewer.cxx:159
 TStructViewer.cxx:160
 TStructViewer.cxx:161
 TStructViewer.cxx:162
 TStructViewer.cxx:163
 TStructViewer.cxx:164
 TStructViewer.cxx:165
 TStructViewer.cxx:166
 TStructViewer.cxx:167
 TStructViewer.cxx:168
 TStructViewer.cxx:169
 TStructViewer.cxx:170
 TStructViewer.cxx:171
 TStructViewer.cxx:172
 TStructViewer.cxx:173
 TStructViewer.cxx:174
 TStructViewer.cxx:175
 TStructViewer.cxx:176
 TStructViewer.cxx:177
 TStructViewer.cxx:178
 TStructViewer.cxx:179
 TStructViewer.cxx:180
 TStructViewer.cxx:181
 TStructViewer.cxx:182
 TStructViewer.cxx:183
 TStructViewer.cxx:184
 TStructViewer.cxx:185
 TStructViewer.cxx:186
 TStructViewer.cxx:187
 TStructViewer.cxx:188
 TStructViewer.cxx:189
 TStructViewer.cxx:190
 TStructViewer.cxx:191
 TStructViewer.cxx:192
 TStructViewer.cxx:193
 TStructViewer.cxx:194
 TStructViewer.cxx:195
 TStructViewer.cxx:196
 TStructViewer.cxx:197
 TStructViewer.cxx:198
 TStructViewer.cxx:199
 TStructViewer.cxx:200
 TStructViewer.cxx:201
 TStructViewer.cxx:202
 TStructViewer.cxx:203
 TStructViewer.cxx:204
 TStructViewer.cxx:205
 TStructViewer.cxx:206
 TStructViewer.cxx:207
 TStructViewer.cxx:208
 TStructViewer.cxx:209
 TStructViewer.cxx:210
 TStructViewer.cxx:211
 TStructViewer.cxx:212
 TStructViewer.cxx:213
 TStructViewer.cxx:214
 TStructViewer.cxx:215
 TStructViewer.cxx:216
 TStructViewer.cxx:217
 TStructViewer.cxx:218
 TStructViewer.cxx:219
 TStructViewer.cxx:220
 TStructViewer.cxx:221
 TStructViewer.cxx:222
 TStructViewer.cxx:223
 TStructViewer.cxx:224
 TStructViewer.cxx:225
 TStructViewer.cxx:226
 TStructViewer.cxx:227
 TStructViewer.cxx:228
 TStructViewer.cxx:229
 TStructViewer.cxx:230
 TStructViewer.cxx:231
 TStructViewer.cxx:232
 TStructViewer.cxx:233
 TStructViewer.cxx:234
 TStructViewer.cxx:235
 TStructViewer.cxx:236
 TStructViewer.cxx:237
 TStructViewer.cxx:238
 TStructViewer.cxx:239
 TStructViewer.cxx:240
 TStructViewer.cxx:241
 TStructViewer.cxx:242
 TStructViewer.cxx:243
 TStructViewer.cxx:244
 TStructViewer.cxx:245
 TStructViewer.cxx:246
 TStructViewer.cxx:247
 TStructViewer.cxx:248
 TStructViewer.cxx:249
 TStructViewer.cxx:250
 TStructViewer.cxx:251
 TStructViewer.cxx:252
 TStructViewer.cxx:253
 TStructViewer.cxx:254
 TStructViewer.cxx:255
 TStructViewer.cxx:256
 TStructViewer.cxx:257
 TStructViewer.cxx:258
 TStructViewer.cxx:259
 TStructViewer.cxx:260
 TStructViewer.cxx:261
 TStructViewer.cxx:262
 TStructViewer.cxx:263
 TStructViewer.cxx:264
 TStructViewer.cxx:265
 TStructViewer.cxx:266
 TStructViewer.cxx:267
 TStructViewer.cxx:268
 TStructViewer.cxx:269
 TStructViewer.cxx:270
 TStructViewer.cxx:271
 TStructViewer.cxx:272
 TStructViewer.cxx:273
 TStructViewer.cxx:274
 TStructViewer.cxx:275
 TStructViewer.cxx:276
 TStructViewer.cxx:277
 TStructViewer.cxx:278
 TStructViewer.cxx:279
 TStructViewer.cxx:280
 TStructViewer.cxx:281
 TStructViewer.cxx:282
 TStructViewer.cxx:283
 TStructViewer.cxx:284
 TStructViewer.cxx:285
 TStructViewer.cxx:286
 TStructViewer.cxx:287
 TStructViewer.cxx:288
 TStructViewer.cxx:289
 TStructViewer.cxx:290
 TStructViewer.cxx:291
 TStructViewer.cxx:292
 TStructViewer.cxx:293
 TStructViewer.cxx:294
 TStructViewer.cxx:295
 TStructViewer.cxx:296
 TStructViewer.cxx:297
 TStructViewer.cxx:298
 TStructViewer.cxx:299
 TStructViewer.cxx:300
 TStructViewer.cxx:301
 TStructViewer.cxx:302
 TStructViewer.cxx:303
 TStructViewer.cxx:304
 TStructViewer.cxx:305
 TStructViewer.cxx:306
 TStructViewer.cxx:307
 TStructViewer.cxx:308
 TStructViewer.cxx:309
 TStructViewer.cxx:310
 TStructViewer.cxx:311
 TStructViewer.cxx:312
 TStructViewer.cxx:313
 TStructViewer.cxx:314
 TStructViewer.cxx:315
 TStructViewer.cxx:316
 TStructViewer.cxx:317
 TStructViewer.cxx:318
 TStructViewer.cxx:319
 TStructViewer.cxx:320
 TStructViewer.cxx:321
 TStructViewer.cxx:322
 TStructViewer.cxx:323
 TStructViewer.cxx:324
 TStructViewer.cxx:325
 TStructViewer.cxx:326
 TStructViewer.cxx:327
 TStructViewer.cxx:328
 TStructViewer.cxx:329
 TStructViewer.cxx:330
 TStructViewer.cxx:331
 TStructViewer.cxx:332
 TStructViewer.cxx:333
 TStructViewer.cxx:334
 TStructViewer.cxx:335
 TStructViewer.cxx:336
 TStructViewer.cxx:337
 TStructViewer.cxx:338
 TStructViewer.cxx:339
 TStructViewer.cxx:340
 TStructViewer.cxx:341
 TStructViewer.cxx:342
 TStructViewer.cxx:343
 TStructViewer.cxx:344
 TStructViewer.cxx:345
 TStructViewer.cxx:346
 TStructViewer.cxx:347
 TStructViewer.cxx:348
 TStructViewer.cxx:349
 TStructViewer.cxx:350
 TStructViewer.cxx:351
 TStructViewer.cxx:352
 TStructViewer.cxx:353
 TStructViewer.cxx:354
 TStructViewer.cxx:355
 TStructViewer.cxx:356
 TStructViewer.cxx:357
 TStructViewer.cxx:358
 TStructViewer.cxx:359
 TStructViewer.cxx:360
 TStructViewer.cxx:361
 TStructViewer.cxx:362
 TStructViewer.cxx:363
 TStructViewer.cxx:364
 TStructViewer.cxx:365
 TStructViewer.cxx:366
 TStructViewer.cxx:367
 TStructViewer.cxx:368
 TStructViewer.cxx:369
 TStructViewer.cxx:370
 TStructViewer.cxx:371
 TStructViewer.cxx:372
 TStructViewer.cxx:373
 TStructViewer.cxx:374
 TStructViewer.cxx:375
 TStructViewer.cxx:376
 TStructViewer.cxx:377
 TStructViewer.cxx:378
 TStructViewer.cxx:379
 TStructViewer.cxx:380
 TStructViewer.cxx:381
 TStructViewer.cxx:382
 TStructViewer.cxx:383
 TStructViewer.cxx:384
 TStructViewer.cxx:385
 TStructViewer.cxx:386
 TStructViewer.cxx:387
 TStructViewer.cxx:388
 TStructViewer.cxx:389
 TStructViewer.cxx:390
 TStructViewer.cxx:391
 TStructViewer.cxx:392
 TStructViewer.cxx:393
 TStructViewer.cxx:394
 TStructViewer.cxx:395
 TStructViewer.cxx:396
 TStructViewer.cxx:397
 TStructViewer.cxx:398
 TStructViewer.cxx:399
 TStructViewer.cxx:400
 TStructViewer.cxx:401
 TStructViewer.cxx:402
 TStructViewer.cxx:403
 TStructViewer.cxx:404
 TStructViewer.cxx:405
 TStructViewer.cxx:406
 TStructViewer.cxx:407
 TStructViewer.cxx:408
 TStructViewer.cxx:409
 TStructViewer.cxx:410
 TStructViewer.cxx:411
 TStructViewer.cxx:412
 TStructViewer.cxx:413
 TStructViewer.cxx:414
 TStructViewer.cxx:415
 TStructViewer.cxx:416
 TStructViewer.cxx:417
 TStructViewer.cxx:418
 TStructViewer.cxx:419
 TStructViewer.cxx:420
 TStructViewer.cxx:421
 TStructViewer.cxx:422
 TStructViewer.cxx:423
 TStructViewer.cxx:424
 TStructViewer.cxx:425
 TStructViewer.cxx:426
 TStructViewer.cxx:427
 TStructViewer.cxx:428
 TStructViewer.cxx:429
 TStructViewer.cxx:430
 TStructViewer.cxx:431
 TStructViewer.cxx:432
 TStructViewer.cxx:433
 TStructViewer.cxx:434
 TStructViewer.cxx:435
 TStructViewer.cxx:436
 TStructViewer.cxx:437
 TStructViewer.cxx:438
 TStructViewer.cxx:439
 TStructViewer.cxx:440
 TStructViewer.cxx:441
 TStructViewer.cxx:442
 TStructViewer.cxx:443
 TStructViewer.cxx:444
 TStructViewer.cxx:445
 TStructViewer.cxx:446
 TStructViewer.cxx:447
 TStructViewer.cxx:448
 TStructViewer.cxx:449
 TStructViewer.cxx:450
 TStructViewer.cxx:451
 TStructViewer.cxx:452
 TStructViewer.cxx:453
 TStructViewer.cxx:454
 TStructViewer.cxx:455
 TStructViewer.cxx:456
 TStructViewer.cxx:457
 TStructViewer.cxx:458
 TStructViewer.cxx:459
 TStructViewer.cxx:460
 TStructViewer.cxx:461
 TStructViewer.cxx:462
 TStructViewer.cxx:463
 TStructViewer.cxx:464
 TStructViewer.cxx:465
 TStructViewer.cxx:466
 TStructViewer.cxx:467
 TStructViewer.cxx:468
 TStructViewer.cxx:469
 TStructViewer.cxx:470
 TStructViewer.cxx:471
 TStructViewer.cxx:472
 TStructViewer.cxx:473
 TStructViewer.cxx:474
 TStructViewer.cxx:475
 TStructViewer.cxx:476
 TStructViewer.cxx:477
 TStructViewer.cxx:478
 TStructViewer.cxx:479
 TStructViewer.cxx:480
 TStructViewer.cxx:481
 TStructViewer.cxx:482
 TStructViewer.cxx:483
 TStructViewer.cxx:484
 TStructViewer.cxx:485
 TStructViewer.cxx:486
 TStructViewer.cxx:487
 TStructViewer.cxx:488
 TStructViewer.cxx:489
 TStructViewer.cxx:490
 TStructViewer.cxx:491
 TStructViewer.cxx:492
 TStructViewer.cxx:493
 TStructViewer.cxx:494
 TStructViewer.cxx:495
 TStructViewer.cxx:496
 TStructViewer.cxx:497
 TStructViewer.cxx:498
 TStructViewer.cxx:499
 TStructViewer.cxx:500
 TStructViewer.cxx:501
 TStructViewer.cxx:502
 TStructViewer.cxx:503
 TStructViewer.cxx:504
 TStructViewer.cxx:505
 TStructViewer.cxx:506
 TStructViewer.cxx:507
 TStructViewer.cxx:508
 TStructViewer.cxx:509
 TStructViewer.cxx:510
 TStructViewer.cxx:511
 TStructViewer.cxx:512
 TStructViewer.cxx:513