Containers ========== Description ----------- The Container type is used when a column source needs to store a list rather than a scalar element. Such a situation arises, for example, when you have a Deephaven `group_by` operation. In this situation you will have a :cpp:type:`ContainerBaseColumnSource ` representing the column. To get the data out, you will use :cpp:func:`FillChunk ` to fill a :cpp:type:`ContainerBaseChunk `. Now you will have a Chunk containing the lists you want to look at. Each of the elements in this Chunk is a std::shared_ptr<:cpp:type:`ContainerBase `> However, to get at the elements inside these lists, you need to downcast the std::shared_ptr<:cpp:type:`ContainerBase `> to the correct derived type, e.g. std::shared_ptr< :cpp:type:`Container ` >. If you already know the element type you need, you can use a method like :cpp:func:`AsContainerPtr ` to downcast it directly. If not, you can use the :cpp:type:`ContainerVisitor ` to determine the type at runtime. Another way of determining the type at runtime is to use the :cpp:type:`ColumnSource `'s :cpp:func:`GetElementType ` method. The :cpp:class:`ElementType ` you get will represent a list type, and you can use its :cpp:func:`Id ` method to retrieve its :cpp:enum:`ElementTypeId::Enum `. Declarations ------------ .. doxygenclass:: deephaven::dhcore::container::ContainerBase :members: .. doxygenclass:: deephaven::dhcore::container::Container :members: Utility Declarations -------------------- .. doxygenclass:: deephaven::dhcore::container::ContainerVisitor :members: