Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CResourceImage.hpp
Go to the documentation of this file.
1#ifndef LIBS_GUI_CRESOURCEIMAGE_HPP_
2#define LIBS_GUI_CRESOURCEIMAGE_HPP_
3
4#include "core/assert.hpp"
5
6#include <string>
7
9{
10public:
11 CResourceImage(std::string_view nameResource, uint64_t width, uint64_t height)
12 {
13 m_nameResource = nameResource;
14 m_width = width;
15 m_height = height;
16 }
17
18 virtual ~CResourceImage() = default;
19
20 void getSize(uint64_t *width, uint64_t *height) const
21 {
24
25 *width = m_width;
26 *height = m_height;
27 }
28
29 void setSize(uint64_t width, uint64_t height)
30 {
31 m_width = width;
32 m_height = height;
33 }
34
35 [[nodiscard]] std::string getNameResource() const
36 {
37 return m_nameResource;
38 }
39
40 void setNameResource(std::string_view nameResource)
41 {
42 m_nameResource = nameResource;
43 }
44
45private:
46 std::string m_nameResource;
47 uint64_t m_width;
48 uint64_t m_height;
49};
50
51#endif /* LIBS_GUI_CRESOURCEIMAGE_HPP_ */
#define IV_ASSERT_NULL_POINTER(ptr)
Definition assert.hpp:128
Definition CResourceImage.hpp:9
virtual ~CResourceImage()=default
std::string m_nameResource
Definition CResourceImage.hpp:46
void setSize(uint64_t width, uint64_t height)
Definition CResourceImage.hpp:29
void setNameResource(std::string_view nameResource)
Definition CResourceImage.hpp:40
void getSize(uint64_t *width, uint64_t *height) const
Definition CResourceImage.hpp:20
std::string getNameResource() const
Definition CResourceImage.hpp:35
uint64_t m_height
Definition CResourceImage.hpp:48
uint64_t m_width
Definition CResourceImage.hpp:47
CResourceImage(std::string_view nameResource, uint64_t width, uint64_t height)
Definition CResourceImage.hpp:11