20template<std::
size_t TN
bytes>
23 for (std::size_t i = 0; i < TNbytes; ++i)
29template<std::
size_t TN
bytes>
32 if (index < TNbytes * 8)
34 this->g_data[index / 8] =
static_cast<uint8_t
>(flag) << (index % 8);
37template<std::
size_t TN
bytes>
40 if (index < TNbytes * 8)
42 return this->g_data[index / 8] & (0x01 << (index % 8));
46template<std::
size_t TN
bytes>
51 return this->g_data[index];
56template<std::
size_t TN
bytes>
62template<std::
size_t TN
bytes>
65 pck.append(&this->g_data, TNbytes);
67template<std::
size_t TN
bytes>
70 pck.read(&this->g_data, TNbytes);
bool get(std::size_t index) const
Get the value of a bit.
Definition C_bitBank.inl:38
void unpack(fge::net::Packet &pck)
Unpack the bank data from the packet.
Definition C_bitBank.inl:68
void pack(fge::net::Packet &pck)
Pack the bank data into the packet.
Definition C_bitBank.inl:63
std::size_t getSize() const
Get the number of bytes in the bank.
Definition C_bitBank.inl:57
void set(std::size_t index, bool flag)
Set a bit to 1 or 0.
Definition C_bitBank.inl:30
uint8_t getByte(std::size_t index) const
Get the specified byte.
Definition C_bitBank.inl:47
void clear()
Clear the bank.
Definition C_bitBank.inl:21
Definition C_packet.hpp:70