Warning, /include/Geant4/tools/wroot/bufobj 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_wroot_bufobj
0005 #define tools_wroot_bufobj
0006
0007 #include "iobject"
0008 #include "buffer"
0009
0010 namespace tools {
0011 namespace wroot {
0012
0013 class bufobj : public virtual iobject,public buffer {
0014 public:
0015 static const std::string& s_class() {
0016 static const std::string s_v("tools::wroot::bufobj");
0017 return s_v;
0018 }
0019 public:
0020 virtual const std::string& name() const {return m_name;}
0021 virtual const std::string& title() const {return m_title;}
0022 virtual const std::string& store_class_name() const {return m_store_cls;}
0023 virtual bool stream(buffer& a_buffer) const {return a_buffer.write_fast_array(m_buffer,length());}
0024 public:
0025 bufobj(std::ostream& a_out,bool a_byte_swap,uint32 a_size,
0026 const std::string& a_name,
0027 const std::string& a_title,
0028 const std::string& a_store_cls)
0029 :buffer(a_out,a_byte_swap,a_size)
0030 ,m_name(a_name)
0031 ,m_title(a_title)
0032 ,m_store_cls(a_store_cls)
0033 {
0034 }
0035 virtual ~bufobj(){
0036 }
0037 protected:
0038 bufobj(const bufobj& a_from): iobject(a_from),buffer(a_from){
0039 }
0040 bufobj& operator=(const bufobj &){return *this;}
0041 protected:
0042 std::string m_name;
0043 std::string m_title;
0044 std::string m_store_cls;
0045 };
0046
0047 }}
0048
0049 #endif