OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_RAPPOR_BYTEVECTOR_H_ |
| 6 #define CHROME_BROWSER_RAPPOR_BYTEVECTOR_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 #include <vector> |
| 11 |
| 12 // ByteVector is a class that extends a vector of one byte integers with |
| 13 // methods for manipulating it's content as a set of binary bits. |
| 14 |
| 15 namespace rappor { |
| 16 |
| 17 class ByteVector : public std::vector<uint8_t> { |
| 18 public: |
| 19 explicit ByteVector(size_t bytes_size); |
| 20 explicit ByteVector(const std::vector<uint8_t>& v); |
| 21 ByteVector(const char* bytes, int bytes_size); |
| 22 |
| 23 ByteVector operator&(ByteVector rhs) const; |
| 24 |
| 25 ByteVector operator|(ByteVector rhs) const; |
| 26 |
| 27 ByteVector operator~() const; |
| 28 }; |
| 29 |
| 30 } // namespace rappor |
| 31 |
| 32 #endif // CHROME_BROWSER_RAPPOR_BYTEVECTOR_H_ |
OLD | NEW |