summaryrefslogtreecommitdiffstats
path: root/include/raul/RingBuffer.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-07 19:31:25 +0100
committerDavid Robillard <d@drobilla.net>2021-01-07 19:31:25 +0100
commit7cc90d01f3cd0c9fe620e8dec17e89a91d2d8345 (patch)
tree68c594c96457f73e1498f296adfd5761d994c012 /include/raul/RingBuffer.hpp
parentd1f6bd5a5828064b2cca487deff1065e33727fcf (diff)
downloadraul-7cc90d01f3cd0c9fe620e8dec17e89a91d2d8345.tar.gz
raul-7cc90d01f3cd0c9fe620e8dec17e89a91d2d8345.tar.bz2
raul-7cc90d01f3cd0c9fe620e8dec17e89a91d2d8345.zip
Clean up documentation comments
Diffstat (limited to 'include/raul/RingBuffer.hpp')
-rw-r--r--include/raul/RingBuffer.hpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/include/raul/RingBuffer.hpp b/include/raul/RingBuffer.hpp
index d194ca4..9c49d1b 100644
--- a/include/raul/RingBuffer.hpp
+++ b/include/raul/RingBuffer.hpp
@@ -39,8 +39,9 @@ class RingBuffer : public Noncopyable
public:
/**
Create a new RingBuffer.
+
@param size Size in bytes (note this may be rounded up).
- */
+ */
explicit RingBuffer(uint32_t size)
: _write_head(0)
, _read_head(0)
@@ -72,38 +73,28 @@ public:
_read_head = 0;
}
- /**
- Return the number of bytes of space available for reading.
- */
+ /// Return the number of bytes of space available for reading
inline uint32_t read_space() const
{
return read_space_internal(_read_head, _write_head);
}
- /**
- Return the number of bytes of space available for writing.
- */
+ /// Return the number of bytes of space available for writing
inline uint32_t write_space() const
{
return write_space_internal(_read_head, _write_head);
}
- /**
- Return the capacity (i.e. total write space when empty).
- */
+ /// Return the capacity (i.e. total write space when empty)
inline uint32_t capacity() const { return _size - 1; }
- /**
- Read from the RingBuffer without advancing the read head.
- */
+ /// Read from the RingBuffer without advancing the read head
inline uint32_t peek(uint32_t size, void* dst)
{
return peek_internal(_read_head, _write_head, size, dst);
}
- /**
- Read from the RingBuffer and advance the read head.
- */
+ /// Read from the RingBuffer and advance the read head
inline uint32_t read(uint32_t size, void* dst)
{
const uint32_t r = _read_head;
@@ -118,9 +109,7 @@ public:
return 0;
}
- /**
- Skip data in the RingBuffer (advance read head without reading).
- */
+ /// Skip data in the RingBuffer (advance read head without reading)
inline uint32_t skip(uint32_t size)
{
const uint32_t r = _read_head;
@@ -134,9 +123,7 @@ public:
return size;
}
- /**
- Write data to the RingBuffer.
- */
+ /// Write data to the RingBuffer
inline uint32_t write(uint32_t size, const void* src)
{
const uint32_t r = _read_head;