Warning, /include/Geant4/tools/io/iwbuf 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_io_iwbuf
0005 #define tools_io_iwbuf
0006
0007 #include "../typedefs"
0008
0009 #include <vector>
0010 #include <string>
0011
0012 namespace tools {
0013 namespace io {
0014
0015 class iwbuf {
0016 public:
0017 virtual ~iwbuf() {}
0018 public:
0019 virtual bool write(uchar) = 0;
0020 virtual bool write(char) = 0;
0021 virtual bool write(uint16) = 0;
0022 virtual bool write(int16) = 0;
0023 virtual bool write(uint32) = 0;
0024 virtual bool write(int32) = 0;
0025 virtual bool write(uint64) = 0;
0026 virtual bool write(int64) = 0;
0027 virtual bool write(float) = 0;
0028 virtual bool write(double) = 0;
0029 virtual bool write(bool) = 0;
0030
0031 virtual bool write_vec(uint32,const uchar*) = 0;
0032 virtual bool write_vec(uint32,const char*) = 0;
0033 virtual bool write_vec(uint32,const uint16*) = 0;
0034 virtual bool write_vec(uint32,const int16*) = 0;
0035 virtual bool write_vec(uint32,const uint32*) = 0;
0036 virtual bool write_vec(uint32,const int32*) = 0;
0037 virtual bool write_vec(uint32,const uint64*) = 0;
0038 virtual bool write_vec(uint32,const int64*) = 0;
0039 virtual bool write_vec(uint32,const float*) = 0;
0040 virtual bool write_vec(uint32,const double*) = 0;
0041 virtual bool write_vec(uint32,const bool*) = 0;
0042
0043 virtual bool write_vec(const std::vector<std::string>&) = 0;
0044
0045 virtual bool write_cstr(const char* a_cstr) = 0;
0046
0047 virtual bool write_img(uint32,uint32,uint32,const uchar*) = 0;
0048
0049 typedef std::vector< std::vector<unsigned int> > std_vec_vec_uint_t;
0050 virtual bool write_std_vec_vec(const std_vec_vec_uint_t&) = 0;
0051
0052 typedef std::vector< std::vector<float> > std_vec_vec_float_t;
0053 virtual bool write_std_vec_vec(const std_vec_vec_float_t&) = 0;
0054
0055 typedef std::vector< std::vector<double> > std_vec_vec_double_t;
0056 virtual bool write_std_vec_vec(const std_vec_vec_double_t&) = 0;
0057
0058 typedef std::vector< std::vector<std::string> > std_vec_vec_string_t;
0059 virtual bool write_std_vec_vec(const std_vec_vec_string_t&) = 0;
0060 public:
0061 virtual const char* buf() const = 0;
0062 virtual size_t length() const = 0;
0063 };
0064
0065 }}
0066
0067 #endif