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 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /externals/g4tools/include/tools/wroot/info (Version 11.3.0) and /externals/g4tools/include/tools/wroot/info (Version 9.0.p2)


  1 // Copyright (C) 2010, Guy Barrand. All rights    
  2 // See the file tools.license for terms.          
  3                                                   
  4 #ifndef tools_wroot_info                          
  5 #define tools_wroot_info                          
  6                                                   
  7 #include "buffer"                                 
  8 #include "element"                                
  9 #include "named"                                  
 10                                                   
 11 namespace tools {                                 
 12 namespace wroot {                                 
 13                                                   
 14 // sizeof(vtbl)         = 4                       
 15 // sizeof(unsigned int) = 4                       
 16 // sizeof(TObject)   = 12  = 2 * (unsigned int    
 17 // sizeof(TString)   = 8   = char* + vtbl.        
 18 // sizeof(TNamed)    = 28  = TObject + 2 * TSt    
 19 // sizeof(TObjArray) = 40                         
 20                                                   
 21 class streamer_info : public virtual ibo {        
 22   static const std::string& s_class() {           
 23     static const std::string s_v("tools::wroot    
 24     return s_v;                                   
 25   }                                               
 26 public: //ibo                                     
 27   virtual const std::string& store_cls() const    
 28     static const std::string s_v("TStreamerInf    
 29     return s_v;                                   
 30   }                                               
 31   virtual bool stream(buffer& a_buffer) const     
 32     unsigned int c;                               
 33     if(!a_buffer.write_version(2,c)) return fa    
 34                                                   
 35     if(!Named_stream(a_buffer,fName,fTitle)) r    
 36     if(!a_buffer.write(fCheckSum)) return fals    
 37     if(!a_buffer.write(fStreamedClassVersion))    
 38                                                   
 39     //ObjArray                                    
 40     if(!a_buffer.write_object(fElements)) retu    
 41                                                   
 42     if(!a_buffer.set_byte_count(c)) return fal    
 43                                                   
 44     return true;                                  
 45   }                                               
 46 public:                                           
 47   virtual void out(std::ostream& a_out) const     
 48     a_out << "streamer_info for class :"          
 49           << " " << fName << ", version=" << f    
 50           << std::endl;                           
 51     tools_vforcit(streamer_element*,fElements,    
 52   }                                               
 53 public:                                           
 54   streamer_info(const std::string& a_cls_store    
 55   :fName(a_cls_store_name)                        
 56   ,fTitle("")                                     
 57   ,fCheckSum(a_cls_check_sum)                     
 58   ,fStreamedClassVersion(a_cls_vers)              
 59   {                                               
 60 #ifdef TOOLS_MEM                                  
 61     mem::increment(s_class().c_str());            
 62 #endif                                            
 63   }                                               
 64   virtual ~streamer_info(){                       
 65 #ifdef TOOLS_MEM                                  
 66     mem::decrement(s_class().c_str());            
 67 #endif                                            
 68   }                                               
 69 protected:                                        
 70   streamer_info(const streamer_info& a_from)      
 71   :ibo(a_from)                                    
 72   ,fName(a_from.fName)                            
 73   ,fTitle(a_from.fName)                           
 74   ,fCheckSum(a_from.fCheckSum)                    
 75   ,fStreamedClassVersion(a_from.fStreamedClass    
 76   ,fElements(a_from.fElements)                    
 77   {                                               
 78 #ifdef TOOLS_MEM                                  
 79     mem::increment(s_class().c_str());            
 80 #endif                                            
 81   }                                               
 82   streamer_info& operator=(const streamer_info    
 83     fName = a_from.fName;                         
 84     fTitle = a_from.fName;                        
 85     fCheckSum = a_from.fCheckSum;                 
 86     fStreamedClassVersion = a_from.fStreamedCl    
 87     fElements = a_from.fElements;                 
 88     return *this;                                 
 89   }                                               
 90 public:                                           
 91   void add(streamer_element* a_elem){fElements    
 92 protected: //Named                                
 93   std::string fName;                              
 94   std::string fTitle;                             
 95 protected:                                        
 96   unsigned int fCheckSum;    //checksum of ori    
 97   int fStreamedClassVersion; //Class version i    
 98   //int fNumber;               //!Unique ident    
 99   obj_array<streamer_element> fElements; //Arr    
100 };                                                
101                                                   
102 }}                                                
103                                                   
104 #endif