From 97ebefcddcbf65a1bac4ecd48451680190d56a93 Mon Sep 17 00:00:00 2001 From: hasherezade Date: Mon, 21 Apr 2025 01:03:01 +0000 Subject: [PATCH] deploy: 60c435b27c950af99147fd3fd196397e429ab5c7 --- _byte_buffer_8cpp_source.html | 15 +- _byte_buffer_8h_source.html | 73 ++++++---- _file_buffer_8cpp_source.html | 4 +- class_byte_buffer-members.html | 67 ++++----- class_byte_buffer.html | 123 ++++++++++++++-- ...1d925353fc8e6b7c3b9fdcf351cd4d3_cgraph.map | 7 + ...1d925353fc8e6b7c3b9fdcf351cd4d3_cgraph.md5 | 1 + ...1d925353fc8e6b7c3b9fdcf351cd4d3_cgraph.png | Bin 0 -> 6102 bytes doxygen_crawl.html | 3 + functions_a.html | 1 + functions_func_a.html | 1 + functions_func_r.html | 1 + functions_m.html | 1 + functions_r.html | 1 + functions_vars.html | 1 + search/all_1.js | 35 ++--- search/all_b.js | 81 +++++------ search/all_f.js | 131 +++++++++--------- search/functions_1.js | 5 +- search/functions_f.js | 55 ++++---- search/variables_8.js | 15 +- 21 files changed, 385 insertions(+), 236 deletions(-) create mode 100644 class_byte_buffer_ad1d925353fc8e6b7c3b9fdcf351cd4d3_cgraph.map create mode 100644 class_byte_buffer_ad1d925353fc8e6b7c3b9fdcf351cd4d3_cgraph.md5 create mode 100644 class_byte_buffer_ad1d925353fc8e6b7c3b9fdcf351cd4d3_cgraph.png diff --git a/_byte_buffer_8cpp_source.html b/_byte_buffer_8cpp_source.html index 2cbe5797..753b9398 100644 --- a/_byte_buffer_8cpp_source.html +++ b/_byte_buffer_8cpp_source.html @@ -98,7 +98,7 @@ $(function(){ initResizable(false); });
5 : content(nullptr), contentSize(0), padding(v_padding),
- +
7{
8 if (v_size == 0) throw BufferException("Zero size requested");
9
@@ -111,7 +111,7 @@ $(function(){ initResizable(false); });
15ByteBuffer::ByteBuffer(BYTE *v_content, bufsize_t v_size, bufsize_t v_padding)
16 : content(nullptr), contentSize(0), padding(v_padding),
- +
17 originalSize(0), m_refs(0)
18{
19 if (v_size == 0) throw BufferException("Zero size requested");
20
@@ -127,7 +127,7 @@ $(function(){ initResizable(false); });
30 : content(NULL), contentSize(0), padding(0),
- +
31 originalSize(0), m_refs(0)
32{
33 if (!v_parent) throw BufferException("Cannot make subBuffer for NULL buffer!");
34 if (!v_size) throw BufferException("Cannot make 0 size buffer!");
@@ -213,13 +213,14 @@ $(function(){ initResizable(false); });
virtual BYTE * getContentAt(offset_t offset, bufsize_t size, bool allowExceptions=false)
-
bufsize_t originalSize
Definition ByteBuffer.h:28
-
BYTE * content
Definition ByteBuffer.h:24
+
bufsize_t originalSize
Definition ByteBuffer.h:44
+
BYTE * content
Definition ByteBuffer.h:40
virtual ~ByteBuffer()
-
bufsize_t contentSize
Definition ByteBuffer.h:25
+
bufsize_t contentSize
Definition ByteBuffer.h:41
ByteBuffer(bufsize_t v_size, bufsize_t padding=DEFAULT_PADDING)
Definition ByteBuffer.cpp:4
+
size_t m_refs
Definition ByteBuffer.h:46
BYTE * allocContent(bufsize_t v_size, bufsize_t padding)
-
bufsize_t padding
Definition ByteBuffer.h:26
+
bufsize_t padding
Definition ByteBuffer.h:42
virtual bool resize(bufsize_t newSize)
diff --git a/_byte_buffer_8h_source.html b/_byte_buffer_8h_source.html index 09591f10..c8e1f916 100644 --- a/_byte_buffer_8h_source.html +++ b/_byte_buffer_8h_source.html @@ -105,41 +105,66 @@ $(function(){ initResizable(false); });
10 ByteBuffer(BYTE *v_content, bufsize_t v_size, bufsize_t padding = DEFAULT_PADDING);
12
-
13 virtual ~ByteBuffer();
-
14
-
15 virtual bufsize_t getContentSize() { return contentSize; }
-
16 virtual BYTE* getContent() { return content; }
-
17 virtual bool resize(bufsize_t newSize);
-
18
-
19 virtual bool isResized() { return originalSize != contentSize; }
-
20
-
21protected:
- -
23
-
24 BYTE *content;
- - -
27
- -
29};
+
+
13 static bool release(ByteBuffer* buf)
+
14 {
+
15 if (!buf) return false;
+
16 if (buf->m_refs == 0) {
+
17 delete buf;
+
18 return true;
+
19 }
+
20 buf->m_refs--;
+
21 return false;
+
22 }
+
23
+
+
24 void addRef()
+
25 {
+
26 m_refs++;
+
27 }
+
+
28
+
29 virtual ~ByteBuffer();
30
+
31 virtual bufsize_t getContentSize() { return contentSize; }
+
32 virtual BYTE* getContent() { return content; }
+
33 virtual bool resize(bufsize_t newSize);
+
34
+
35 virtual bool isResized() { return originalSize != contentSize; }
+
36
+
37protected:
+ +
39
+
40 BYTE *content;
+ + +
43
+ +
45
+
46 size_t m_refs;
+
47};
+
+
48
uint32_t bufsize_t
uint64_t offset_t
#define DEFAULT_PADDING
Definition ByteBuffer.h:4
AbstractByteBuffer()
-
virtual BYTE * getContent()
Definition ByteBuffer.h:16
-
virtual bufsize_t getContentSize()
Definition ByteBuffer.h:15
-
virtual bool isResized()
Definition ByteBuffer.h:19
-
bufsize_t originalSize
Definition ByteBuffer.h:28
-
BYTE * content
Definition ByteBuffer.h:24
+
virtual BYTE * getContent()
Definition ByteBuffer.h:32
+
void addRef()
Definition ByteBuffer.h:24
+
virtual bufsize_t getContentSize()
Definition ByteBuffer.h:31
+
virtual bool isResized()
Definition ByteBuffer.h:35
+
bufsize_t originalSize
Definition ByteBuffer.h:44
+
BYTE * content
Definition ByteBuffer.h:40
virtual ~ByteBuffer()
-
bufsize_t contentSize
Definition ByteBuffer.h:25
+
bufsize_t contentSize
Definition ByteBuffer.h:41
ByteBuffer(bufsize_t v_size, bufsize_t padding=DEFAULT_PADDING)
Definition ByteBuffer.cpp:4
+
size_t m_refs
Definition ByteBuffer.h:46
BYTE * allocContent(bufsize_t v_size, bufsize_t padding)
-
bufsize_t padding
Definition ByteBuffer.h:26
+
bufsize_t padding
Definition ByteBuffer.h:42
virtual bool resize(bufsize_t newSize)
+
static bool release(ByteBuffer *buf)
Definition ByteBuffer.h:13