]> git.stg.codes - stg.git/blobdiff - include/stg/user_traff.h
Port to CMake, get rid of os_int.h.
[stg.git] / include / stg / user_traff.h
index d820588e3702d412436635474996da7d1a78b2c1..5abcee3389c0ea15c312966ee6031e8cf0557180 100644 (file)
 
 #include "resetable.h"
 #include "const.h"
-#include "os_int.h"
 
 #include <iostream>
 #include <vector>
+#include <cstdint>
 
 enum TRAFF_DIRECTION {TRAFF_UPLOAD, TRAFF_DOWNLOAD};
 
@@ -78,6 +78,7 @@ return o;
 class DIR_TRAFF_RES
 {
 public:
+    typedef RESETABLE<uint64_t> value_type;
     typedef RESETABLE<uint64_t> ValueType;
     typedef std::vector<ValueType> ContainerType;
     typedef ContainerType::size_type IndexType;
@@ -97,6 +98,7 @@ public:
     }
     const ValueType & operator[](IndexType idx) const { return traff[idx]; }
     ValueType & operator[](IndexType idx) { return traff[idx]; }
+    IndexType size() const { return traff.size(); }
     DIR_TRAFF GetData() const
     {
     DIR_TRAFF res;