![]() |
NDEVR
API Documentation
|
The equivelent of std::vector but with a bit more control. More...
Inherits BufferBase.
Inherited by QueueBuffer< OverrideMatrixValue, BufferAllocator< OverrideMatrixValue, AlignmentDeterminator< OverrideMatrixValue >::Size(), true > > [protected], QueueBuffer< PositionReading, BufferAllocator< PositionReading, AlignmentDeterminator< PositionReading >::Size(), true > > [protected], QueueBuffer< IndexMatchQueue::NodeA > [protected], QueueBuffer< IndexMatchQueue::NodeB > [protected], QueueBuffer< OrientationReading > [protected], and QueueBuffer< t_type, t_memory_manager > [protected].
Public Member Functions | |
| constexpr | Buffer () noexcept |
| Creates an empty buffer. | |
| constexpr | Buffer (Buffer &&buffer) noexcept |
| Optimized move constructor. | |
| constexpr | Buffer (const Buffer &buffer) |
| Optimized copy consturctor. | |
| template<class t_iterator> | |
| Buffer (const t_iterator &begin, const t_iterator &end) | |
| Constructor that allows for an iterator begin and end. | |
| constexpr | Buffer (const t_type *buffer, t_index_type size) |
| Constructor that allows for an a start pointer, and size, and adds all elements to the buffer. | |
| Buffer (std::initializer_list< t_type > l) | |
| Constructor that allows for an initializer list, allowing { and } to be used. | |
| Buffer (t_index_type size) | |
| Constructor that reserves space. | |
| constexpr | Buffer (t_index_type size, const t_type &fill_object) |
| Constructor that allows for a set size, and then fills the buffer with the specified object. | |
| ~Buffer () | |
| void | add (const t_type &object) |
| Adds object to the end of the buffer. | |
| void | add (t_index_type location, const t_type &object) |
| Adds and object to a specific location. | |
| void | add (t_index_type location, t_type &&object) |
| Adds an object to a specific location. | |
| void | add (t_type &&object) |
| Adds object to the end of the buffer. | |
| template<bool t_managed> | |
| void | addSpace (t_index_type space_to_add) |
| Adds a space to the end of the buffer. | |
| operator decltype | auto () |
| Gets the first location of type* in the array. | |
| operator decltype | auto () const |
| Gets the first location of type* in the array. | |
| sint04 | compare (const Buffer &value) const |
| Compares this Buffer to another to determine their relative ordering. | |
| template<class t_other_type, class t_other_memory_manager = t_memory_manager> | |
| Buffer< t_other_type, t_other_memory_manager > | getAs () const |
| Gets a copy of this buffer, with filled objects t_other_type, where all objects are created using the contents of this buffer. | |
| void | insert (const t_index_type location, const t_type *buffer) |
| Inserts data into the buffer, assumed to be null terminated. | |
| void | insert (t_index_type location, const t_type &object) |
| Adds an object to a specific location. | |
| void | insert (t_index_type location, t_type &&object) |
| Adds an object to a specific location. | |
| void | insert (t_index_type offset, const t_type *const buffer, t_index_type buffer_size) |
| Inserts data into the buffer. | |
| void | removeAllOrdered (const t_type &object) |
| Removes all instances of the object. | |
| template<class t_functor> | |
| void | removeAllOrderedFn (const t_functor &functor) |
| Removes all items based on the functor. | |
| template<class t_functor> | |
| void | removeAllUnordered (const t_functor &functor) |
| Removes all items based on the functor. | |
| void | removeAllUnordered (const t_type &object) |
| Removes all unordered described by object. | |
The equivelent of std::vector but with a bit more control.
The basic array unit of the library.
t_type = what the buffer holds t_index_type = the index reference (default uint04 but can be made uint08 for large buffer support) t_memory_allocator = The object in charge of object allocation when creating space t_memory_manager = The thing that actually stores the memory Author: Tyler Parke
Date: 2017-11-19
Definition at line 57 of file Buffer.hpp.
|
inlineexplicit |
Constructor that reserves space.
Note that the buffer will still be empty, but allocation will be more efficient using add or inserts.
Definition at line 89 of file Buffer.hpp.
|
inline |
Adds object to the end of the buffer.
| [in] | object | The object to add to the end. |
Definition at line 199 of file Buffer.hpp.
|
inline |
Adds and object to a specific location.
Equivelent to insert
| [in] | location | The index where the object should be inserted. |
| [in] | object | The object to add to the buffer at the specified location. |
Definition at line 210 of file Buffer.hpp.
|
inline |
Adds an object to a specific location.
Equivelent to insert.
| [in] | location | The index where the object should be inserted. |
| [in] | object | The object to add to the buffer at the specified location. |
Definition at line 221 of file Buffer.hpp.
|
inline |
Adds object to the end of the buffer.
| [in] | object | The object to add to the end. |
Definition at line 190 of file Buffer.hpp.
Referenced by BlockSolver< Traits >::buildStructure(), GravityIntersection::calculateIntersection(), ConcavePolygon< t_type, t_vertex >::convexDecomp(), Path::createMonotoneAngleCubicPathSorted(), Path::createMonotoneCubicPathAzimuth(), Path::createMonotoneCubicPathSorted(), Extruder::Extrude(), FactoryModelFilters::FilterGeometryModels(), FactoryModelFilters::FilterGeometryModels(), GravityIntersection::FilterSamples(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), Buffer< t_type, t_memory_manager >< File, 64 >::getAs(), TranslationTools::getDirs(), TranslationTools::getFiles(), ViewPortSmoothShaderLogic::getInput(), DesignObjectSearchWidget::getObjectsBeginningWithSearch(), DesignObjectSearchWidget::getObjectsContainingSearch(), Model::getTypeChildren(), Model::getTypeDescendants(), IMUNoiseSimulator::groups(), DevActionTree::init(), Geometry::lineSegments(), DBFParser::readColumn(), DevActionTree::selectedActions(), BuildActionProgramLogic::setTreeWidgetsForSelection(), QCustomComboBox::setup(), QCustomComboBox::setup(), QCustomComboBox::setup(), and SparseBlockMatrix< MatrixType >::takePatternFromHash().
|
inline |
Adds a space to the end of the buffer.
| [in] | space_to_add | The number of elements to add. |
Definition at line 400 of file Buffer.hpp.
Referenced by RealSenseServer::ReadNetworkPacket().
|
inlinenodiscard |
Gets the first location of type* in the array.
Definition at line 165 of file Buffer.hpp.
|
inlinenodiscard |
Gets the first location of type* in the array.
Definition at line 156 of file Buffer.hpp.
|
inlinenodiscard |
Compares this Buffer to another to determine their relative ordering.
| [in] | value | The Buffer to compare to this object. |
Definition at line 476 of file Buffer.hpp.
|
inlinenodiscard |
Gets a copy of this buffer, with filled objects t_other_type, where all objects are created using the contents of this buffer.
Definition at line 176 of file Buffer.hpp.
|
inline |
Inserts data into the buffer, assumed to be null terminated.
| [in] | location | The offset where the data should be inserted. |
| [in] | buffer | The buffer. |
Definition at line 382 of file Buffer.hpp.
|
inline |
Adds an object to a specific location.
| [in] | location | The index where the object should be inserted. |
| [in] | object | The object to add to the buffer at the specified location. |
Definition at line 233 of file Buffer.hpp.
Referenced by Buffer< t_type, t_memory_manager >< File, 64 >::insert(), and SparseBlockMatrix< MatrixType >::slice().
|
inline |
Adds an object to a specific location.
| [in] | location | The index where the object should be inserted. |
| [in] | object | The object to add to the buffer at the specified location. |
Definition at line 244 of file Buffer.hpp.
|
inline |
Inserts data into the buffer.
| [in] | offset | The offset where the data should be inserted. |
| [in] | buffer | The buffer of objects to insert. |
| [in] | buffer_size | number of elements of the data to insert. |
Definition at line 361 of file Buffer.hpp.
|
inline |
Removes all instances of the object.
Function is slower than removeAllUnordered but order is preserved.
| [in] | object | The object. |
Definition at line 719 of file Buffer.hpp.
|
inline |
Removes all items based on the functor.
The functor should return true if the item is deleted or false if the item should stay in the array. Function is slower than removeAllUnordered but order is preserved.
| [in] | functor | A functor that takes a value and returns true if value is to be removed, or false otherwise. |
Definition at line 739 of file Buffer.hpp.
|
inline |
Removes all items based on the functor.
The functor should return true if the item is deleted or false if the item should stay in the array. Faster function then removeAllOrdered but order is not preserved.
| [in] | functor | A functor that takes a value and returns true if value is to be removed, or false otherwise. |
Definition at line 701 of file Buffer.hpp.
|
inline |
Removes all unordered described by object.
This function does not preserve the order of the buffer.
| [in] | object | The object to remove. |
Definition at line 679 of file Buffer.hpp.