00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef BANDWIDTHSTATADAPTER_H
00043 #define BANDWIDTHSTATADAPTER_H
00044
00045 #include <vpr/vprConfig.h>
00046 #include <vpr/Util/ReturnStatus.h>
00047
00048 namespace vpr
00049 {
00050
00063 template < class BASE_ONE, class BASE_TWO >
00064 class IOStatsStrategyAdapter : public BASE_ONE, public BASE_TWO
00065 {
00066 public:
00067 virtual void read_s(vpr::ReturnStatus& status, void* buffer,
00068 const vpr::Uint32 length, vpr::Uint32& bytesRead,
00069 const vpr::Interval timeout = vpr::Interval::NoTimeout)
00070 {
00071 BASE_ONE::read_s(status, buffer, length, bytesRead, timeout);
00072 BASE_TWO::read_s(status, buffer, length, bytesRead, timeout);
00073 }
00074
00075 virtual void readn_s(vpr::ReturnStatus& status, void* buffer,
00076 const vpr::Uint32 length, vpr::Uint32& bytesRead,
00077 const vpr::Interval timeout = vpr::Interval::NoTimeout)
00078 {
00079 BASE_ONE::readn_s(status, buffer, length, bytesRead, timeout);
00080 BASE_TWO::readn_s(status, buffer, length, bytesRead, timeout);
00081 }
00082
00083 virtual void write_s(vpr::ReturnStatus& status, const void* buffer,
00084 const vpr::Uint32 length, vpr::Uint32& bytesWritten,
00085 const vpr::Interval timeout = vpr::Interval::NoTimeout)
00086 {
00087 BASE_ONE::write_s(status, buffer, length, bytesWritten, timeout);
00088 BASE_TWO::write_s(status, buffer, length, bytesWritten, timeout);
00089 }
00090 };
00091
00092 }
00093
00094
00095 #endif //BANDWIDTHSTATADAPTER_H