Namespaces

Enumerations

enum NodeOptions
Name Value
None 0
AllowCopy (1 << 0)
AllowCopyFromContainer (1 << 1)
AllowMove (1 << 2)
AllowMoveFromContainer (1 << 3)
AllowCopyMove static_cast<uint64_t>(AllowCopy) | static_cast<uint64_t>(AllowMove)
AllowCopyMoveFromContainer static_cast<uint64_t>(AllowCopyFromContainer) | static_cast<uint64_t>(AllowMoveFromContainer)
AllowMultiContainerUptr (1 << 4)
AllowRemoveFromContainer (1 << 5)
AllowClearUnsafe (1 << 6)
ReservedBits 0xF000000000000000

A set of flag-style options which can be applied to container nodes in order

to control and sanity check their behavior and compatibility at compile time.

To control node options, users pass a set of options to either the

containable mix-in class (SinglyLinkedLisable, DoublyLinkedListable, or

WAVLTreeContainable), or directly to the node instance in the case that the

user is specifying custom container traits.

Defined at line 64 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/intrusive_container_utils.h

enum SizeOrder
Name Value
N 0
Constant 1

An enumeration which can be used as a template argument on list types to

control the order of operation needed to compute the size of the list. When

set to SizeOrder::N, the list's size will not be maintained and there will be

no valid size() method to call. The only way to fetch the size of a list

would be via |size_slow()|. Alternatively, a user may specify

SizeOrder::Constant. In this case, the storage size of the list itself will

grow by a size_t, and the size of the list will be maintained as elements are

added and removed.

Defined at line 365 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/intrusive_container_utils.h

Records

Functions

  • template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>>
    bool is_pow2 (T val)

    is_pow2

    <T

    >(T val)

    Tests to see if val (which may be any unsigned integer type) is a power of 2

    or not. 0 is not considered to be a power of 2.

    Defined at line 22 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/algorithm.h

  • template <class T, class U, class L = std::conditional_t<sizeof(T) >= sizeof(U), T, U>, class = std::enable_if_t<std::is_unsigned_v<T>>, class = std::enable_if_t<std::is_unsigned_v<U>>>
    const L round_up (const T & val_, const U & multiple_)

    round_up rounds up val until it is divisible by multiple.

    Zero is divisible by all multiples.

    Defined at line 31 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/algorithm.h

  • operation::NodeOptions operator| (operation::NodeOptions A, operation::NodeOptions B)

    Helper functions which make it a bit easier to use the enum class NodeOptions

    in a flag style fashion.

    The | operator will take two options and or them together to produce their

    composition without needing to do all sorts of nasty casting. In other

    words:

    operation::NodeOptions::AllowX | operation::NodeOptions::AllowY

    is legal.

    The

    &

    operator is overloaded to perform the bitwise and of the

    underlying flags and test against zero returning a bool. This allows us to

    say things like:

    if constexpr (SomeOptions | operation::NodeOptions::AllowX) { ... }

    Defined at line 196 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/intrusive_container_utils.h

  • bool operator& (operation::NodeOptions A, operation::NodeOptions B)

    Defined at line 202 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/intrusive_container_utils.h

  • template <typename TagType = DefaultObjectTag, typename Containable>
    bool InContainer (const Containable & c)

    These are free function because making it a member function presents

    complicated lookup issues since the specific Containable classes exist as

    members of the ContainableBaseClasses

    <

    ...>, and you'd need to say

    obj.template GetContainableByTag

    <TagType

    >().InContainer (or

    RemoveFromContainer), which is super ugly.

    Defined at line 340 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/intrusive_container_utils.h

  • template <typename TagType = DefaultObjectTagtypename Containable>
    auto RemoveFromContainer (Containable & c)

    Defined at line 349 of file ../../src/devices/lib/dev-operation/include/lib/operation/helpers/intrusive_container_utils.h