|
FastLED 3.9.15
|
Type-erased vector base class.
Holds all vector logic. vector<T> inherits this and provides the element type info. VectorN<T, N> inherits vector<T> and provides the inline buffer. This class cannot be constructed directly — only through vector<T>.
Definition at line 39 of file basic_vector.h.
#include <basic_vector.h>
Inherited by fl::vector< fl::i16 >, fl::vector< DrawItem >, fl::vector< Point >, fl::vector< value_type >, fl::vector< fl::shared_ptr< json_value > >, fl::vector< Key >, fl::iterator< T >, fl::const_iterator< T >, fl::reverse_iterator< T >, fl::const_reverse_iterator< T >, fl::vector< fl::DriverInfo >, fl::vector< fl::CRGB >, fl::vector< fl::pair< AnimartrixAnim, AnimartrixVizFactory > >, fl::vector< fl::Blend2d::Entry >, fl::vector< fl::vec2< float > >, fl::vector< u8 >, fl::vector< fl::ChannelManager::EngineEntry >, fl::vector< fl::Tile2x2_u8_wrap >, fl::vector< fl::vector< float > >, fl::vector< fl::i32 >, fl::vector< float >, fl::vector< fl::AudioFrame >, fl::vector< Entry >, fl::vector< fl::pair< int, int > >, fl::vector< fl::Luminova::Particle >, fl::vector< fl::ParamInfo >, fl::vector< fl::string >, fl::vector< fl::vector< fl::u8 > >, fl::vector< ChannelConfigPtr >, fl::vector< fl::AttackDecayFilter< float > >, fl::vector< fl::Particles1d::Particle >, fl::vector< fl::PerlinParticlePunch::AmbientParticle >, fl::vector< fl::PerlinParticlePunch::MeteorParticle >, fl::vector< fl::PerlinParticlePunch::DebrisParticle >, fl::vector< fl::RpcResult >, fl::vector< fl::LEDError >, fl::vector< fl::json >, fl::vector< int >, fl::vector< fl::SpiChannelEngineAdapter::ControllerInfo >, fl::vector< fl::SpiChannelEngineAdapter::ClockPinAssignment >, fl::vector< ChannelDataPtr >, fl::vector< fl::u8 >, fl::vector< i16 >, fl::vector< u16 >, fl::vector< fl::WLEDSegment >, fl::vector< fl::vector< u8 > >, fl::vector< fl::anonymous_namespace{json.cpp.hpp}::JsonBuilder::StackFrame >, fl::vector< char >, fl::vector< fl::asio::http::Server::RouteEntry >, fl::vector< fl::asio::http::Server::ClientConnection >, fl::vector< fl::audio::Context::FFTCacheEntry >, fl::vector< fl::shared_ptr< fl::audio::fft::Bins > >, fl::vector< fl::audio::fft::Bins >, fl::vector< fl::audio::FrequencyBinMapper::BinMapping >, fl::vector< fl::shared_ptr< fl::audio::Detector > >, fl::vector< bool >, fl::vector< SampleImplPtr >, fl::vector< fl::ExponentialSmoother< float > >, fl::vector< fl::audio::detector::TempoAnalyzer::TempoHypothesis >, fl::vector< fl::u16x16 >, fl::vector< fl::alpha16 >, fl::vector< fl::audio::fft::Context::OctaveInfo >, fl::vector< kiss_fft_scalar >, fl::vector< kiss_fft_cpx >, fl::vector< u32 >, fl::vector< fl::priority_queue_stable::StableElement >, fl::vector< fl::task::Promise< fl::net::http::Response > >, fl::vector< fl::spi::Lane >, fl::vector< fl::task::Runner * >, fl::vector< fl::task::Handle >, fl::vector< fl::test::TestContext::TestCaseInfo >, fl::vector< fl::test::SubcaseSignature >, fl::vector< fl::u32 >, fl::vector< fl::shared_ptr< fl::Frame > >, fl::vector< uint8_t >, and fl::vector< T >.
Collaboration diagram for fl::vector_basic:Public Member Functions | |
| ~vector_basic () FL_NOEXCEPT | |
| fl::size | capacity () const FL_NOEXCEPT |
| void | clear_impl () FL_NOEXCEPT |
| const void * | data_raw () const FL_NOEXCEPT |
| void * | data_raw () FL_NOEXCEPT |
| fl::size | element_size () const FL_NOEXCEPT |
| bool | empty () const FL_NOEXCEPT |
| void | erase_impl (fl::size index) FL_NOEXCEPT |
| Erase element at index. Shifts subsequent elements left. | |
| void | erase_range_impl (fl::size first_index, fl::size count) FL_NOEXCEPT |
| Erase range [first_index, first_index + count). | |
| bool | full () const FL_NOEXCEPT |
| void | insert_copy_impl (fl::size index, const void *element) FL_NOEXCEPT |
| Insert element at index by copy. Shifts subsequent elements right. | |
| void | insert_move_impl (fl::size index, void *element) FL_NOEXCEPT |
| Insert element at index by move. Shifts subsequent elements right. | |
| void | pop_back_impl () FL_NOEXCEPT |
| void | push_back_copy_impl (const void *element) FL_NOEXCEPT |
| void | push_back_move_impl (void *element) FL_NOEXCEPT |
| void | reserve_impl (fl::size n) FL_NOEXCEPT |
| void | resize_impl (fl::size n) FL_NOEXCEPT |
| Resize to n elements. New elements are default-constructed (zeroed for trivial). | |
| void | resize_value_impl (fl::size n, const void *value) FL_NOEXCEPT |
| Resize to n elements. New elements are copy-constructed from value. | |
| void | shrink_to_fit_impl () FL_NOEXCEPT |
| fl::size | size () const FL_NOEXCEPT |
| void | swap_impl (vector_basic &other) FL_NOEXCEPT |
| Swap contents with another vector_basic. | |
Protected Member Functions | |
| vector_basic (const vector_basic &) FL_NOEXCEPT=delete | |
| vector_basic (fl::size elementSize, memory_resource *resource, const vector_element_ops *ops) FL_NOEXCEPT | |
| Heap-only vector (no inline buffer). | |
| vector_basic (vector_basic &&) FL_NOEXCEPT=delete | |
| vector_basic (void *inlineBuffer, fl::size inlineCapacity, fl::size elementSize, memory_resource *resource, const vector_element_ops *ops) FL_NOEXCEPT | |
| Vector with inline buffer (for VectorN). | |
| void | copy_from (const vector_basic &other) FL_NOEXCEPT |
| Copy all elements from another vector_basic. | |
| const void * | element_ptr (fl::size index) const FL_NOEXCEPT |
| void * | element_ptr (fl::size index) FL_NOEXCEPT |
| Pointer to element at index (byte arithmetic). | |
| bool | hasInlineBuffer () const FL_NOEXCEPT |
| Does this vector have an inline buffer at all? | |
| const void * | inlineBufferPtr () const FL_NOEXCEPT |
| void * | inlineBufferPtr () FL_NOEXCEPT |
| Compute inline buffer pointer from offset. | |
| bool | isInline () const FL_NOEXCEPT |
| Is data currently in the inline buffer? | |
| void | move_assign (vector_basic &other) FL_NOEXCEPT |
| Move-assign from another vector_basic (clears this first). | |
| void | move_from (vector_basic &other) FL_NOEXCEPT |
| Move-steal contents from another vector_basic. | |
| vector_basic & | operator= (const vector_basic &) FL_NOEXCEPT=delete |
| vector_basic & | operator= (vector_basic &&) FL_NOEXCEPT=delete |
Protected Attributes | |
| void * | mArray = nullptr |
| fl::size | mCapacity = 0 |
| fl::size | mElementSize |
| fl::size | mInlineCapacity |
| fl::size | mInlineOffset |
| const vector_element_ops * | mOps |
| memory_resource * | mResource |
| fl::size | mSize = 0 |
Private Member Functions | |
| void | ensure_capacity (fl::size n) FL_NOEXCEPT |
| Ensure capacity for at least n elements. Grows if needed. | |
| void | grow_to (fl::size new_capacity) FL_NOEXCEPT |
| Grow to new_capacity. Moves existing elements. | |
| void | trivial_copy (void *dst, const void *src, fl::size count) const FL_NOEXCEPT |
| void | trivial_default_construct (void *ptr, fl::size count) const FL_NOEXCEPT |
| void | trivial_move_left (void *dst, const void *src, fl::size count) const FL_NOEXCEPT |
| void | trivial_swap (void *a, void *b) const FL_NOEXCEPT |