21 using Container = std::vector<Byte>;
24 using iterator =
typename Container::iterator;
25 using const_iterator =
typename Container::const_iterator;
26 using reverse_iterator =
typename Container::reverse_iterator;
27 using const_reverse_iterator =
typename Container::const_reverse_iterator;
33 explicit BytesArray(
const std::initializer_list<Byte> &args);
42 std::size_t getSize()
const;
43 std::size_t getMaxSize()
const;
45 const Byte& at(
size_t index)
const;
47 std::string toString()
const;
48 bool toFile(
const std::string &pathFile)
const;
51 void reserve(
size_t size);
52 void resize(
size_t size, Byte value = 0);
54 void pushBack(Byte value);
55 void pushBack(std::string_view strView);
56 void pushBack(
const Byte *buffer,
size_t len);
59 void setFromString(std::string_view strView);
60 bool setFromFile(
const std::string &pathFile);
63 const Byte* dataConst()
const;
70 const_iterator cbegin()
const;
71 reverse_iterator rbegin();
72 const_reverse_iterator crbegin()
const;
74 const_iterator cend()
const;
75 reverse_iterator rend();
76 const_reverse_iterator crend()
const;
79 Byte& operator[](
size_t index);
80 const Byte& operator[](
size_t index)
const;
91 std::unique_ptr<Impl> d_ptr;