/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
android-943
drape/cpu_buffer.hpp
32 строки
801 B
r.kuznetsov
[drape][metal] Removed obsolete std usage, minor fixes.
25 сен 2018, 12:33
25 сен 2018, 12:33
320c691
Код
Авторство
О чём код?
#pragma once #include "drape/buffer_base.hpp" #include <memory> #include <vector> namespace dp { class CPUBuffer : public BufferBase { using TBase = BufferBase; public: CPUBuffer(uint8_t elementSize, uint32_t capacity); ~CPUBuffer() override; void UploadData(void const * data, uint32_t elementCount); // Set memory cursor on element with number == "elementNumber" // Element numbers start from 0 void Seek(uint32_t elementNumber) override; // Check function. In real world use must use it only in assert uint32_t GetCurrentElementNumber() const; unsigned char const * Data() const; private: unsigned char * NonConstData(); unsigned char * GetCursor() const; unsigned char * m_memoryCursor; std::shared_ptr<std::vector<unsigned char>> m_memory; }; } // namespace dp