Warning, /include/Geant4/tools/rroot/branch_object is written in an unsupported language. File is not indexed.
0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003
0004 #ifndef tools_rroot_branch_object
0005 #define tools_rroot_branch_object
0006
0007 #include "branch"
0008
0009 namespace tools {
0010 namespace rroot {
0011
0012 class branch_object : public branch {
0013 typedef branch parent;
0014 public:
0015 static const std::string& s_class() {
0016 static const std::string s_v("tools::rroot::branch_object");
0017 return s_v;
0018 }
0019 public: //iro
0020 virtual void* cast(const std::string& a_class) const {
0021 if(void* p = cmp_cast<branch_object>(this,a_class)) return p;
0022 return parent::cast(a_class);
0023 }
0024 virtual const std::string& s_cls() const {return s_class();}
0025 public:
0026 static cid id_class() {return branch_object_cid();}
0027 virtual void* cast(cid a_class) const {
0028 if(void* p = cmp_cast<branch_object>(this,a_class)) {return p;}
0029 return parent::cast(a_class);
0030 }
0031 public:
0032 virtual bool stream(buffer& a_buffer) {
0033 short v;
0034 unsigned int _s,_c;
0035 if(!a_buffer.read_version(v,_s,_c)) return false;
0036 if(!parent::stream(a_buffer)) return false;
0037 if(!a_buffer.read(fClassName)) return false;
0038 if(!a_buffer.check_byte_count(_s,_c,"TBranchObject")) return false;
0039 return true;
0040 }
0041 public: //branch
0042 public:
0043 branch_object(std::ostream& a_out,ifac& a_fac)
0044 :parent(a_out,a_fac)
0045 //,m_obj(0)
0046 ,fClassName()
0047 {}
0048
0049 virtual ~branch_object(){
0050 //delete m_obj;
0051 }
0052 protected:
0053 branch_object(const branch_object& a_from)
0054 :iro(a_from),parent(a_from){}
0055 branch_object& operator=(const branch_object&){return *this;}
0056 public:
0057 const std::string& class_name() const {return fClassName;}
0058 // iro* object() {return m_obj;}
0059 protected:
0060 // iro* m_obj;
0061 protected:
0062 std::string fClassName; //Class name of referenced object
0063 };
0064
0065 }}
0066
0067 #endif