inlib  1.2.0
/Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/io/iwbuf
Go to the documentation of this file.
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
00002 // See the file inlib.license for terms.
00003 
00004 #ifndef inlib_io_iwbuf
00005 #define inlib_io_iwbuf
00006 
00007 #include "../typedefs"
00008 
00009 #include <vector>
00010 #include <string>
00011 
00012 namespace inlib {
00013 namespace io {
00014 
00015 class iwbuf {
00016 public:
00017   virtual ~iwbuf() {}
00018 public:
00019   virtual bool write(uchar) = 0;
00020   virtual bool write(char) = 0;
00021   virtual bool write(uint16) = 0;
00022   virtual bool write(int16) = 0;
00023   virtual bool write(uint32) = 0;
00024   virtual bool write(int32) = 0;
00025   virtual bool write(uint64) = 0;
00026   virtual bool write(int64) = 0;
00027   virtual bool write(float) = 0;
00028   virtual bool write(double) = 0;
00029   virtual bool write(bool) = 0;
00030 
00031   virtual bool write_vec(uint32,const uchar*) = 0;
00032   virtual bool write_vec(uint32,const char*) = 0;
00033   virtual bool write_vec(uint32,const uint16*) = 0;
00034   virtual bool write_vec(uint32,const int16*) = 0;
00035   virtual bool write_vec(uint32,const uint32*) = 0;
00036   virtual bool write_vec(uint32,const int32*) = 0;
00037   virtual bool write_vec(uint32,const uint64*) = 0;
00038   virtual bool write_vec(uint32,const int64*) = 0;
00039   virtual bool write_vec(uint32,const float*) = 0;
00040   virtual bool write_vec(uint32,const double*) = 0;
00041   virtual bool write_vec(uint32,const bool*) = 0;
00042 
00043   virtual bool write_vec(const std::vector<std::string>&) = 0;
00044 
00045   virtual bool write_cstr(const char* a_cstr) = 0;
00046 
00047   typedef std::vector< std::vector<unsigned int> > std_vec_vec_uint_t;
00048   virtual bool write_std_vec_vec(const std_vec_vec_uint_t&) = 0;
00049 
00050   typedef std::vector< std::vector<float> > std_vec_vec_float_t;
00051   virtual bool write_std_vec_vec(const std_vec_vec_float_t&) = 0;
00052 
00053   typedef std::vector< std::vector<std::string> > std_vec_vec_string_t;
00054   virtual bool write_std_vec_vec(const std_vec_vec_string_t&) = 0;
00055 public:
00056   virtual const char* buf() const = 0;
00057   virtual uint32 length() const = 0;
00058 };
00059 
00060 }}
00061 
00062 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines