Skip to content

Class uipc::geometry::AttributeSlot

template <typename T>

ClassList > uipc > geometry > AttributeSlot

Template class to represent a geometries attribute slot of type T in a geometries attribute collection. More...

  • #include <attribute_slot.h>

Inherits the following classes: uipc::geometry::IAttributeSlot

Public Types

Type Name
typedef T value_type

Public Functions

Type Name
AttributeSlot (std::string_view m_name, S< Attribute< T > > attribute, bool allow_destroy)
span< const T > view () noexcept const
Get the const attribute values.

Public Functions inherited from uipc::geometry::IAttributeSlot

See uipc::geometry::IAttributeSlot

Type Name
IAttributeSlot () = default
IAttributeSlot (const IAttributeSlot &) = delete
IAttributeSlot (IAttributeSlot &&) noexcept
bool allow_destroy () noexcept const
Check if the underlying attribute is allowed to be destroyed.
bool is_shared () noexcept const
Check if the underlying attribute is shared.
std::string_view name () noexcept const
Get the name of the attribute slot.
IAttributeSlot & operator= (const IAttributeSlot &) = delete
IAttributeSlot & operator= (IAttributeSlot &&) noexcept
SizeT size () noexcept const
Json to_json (SizeT i) const
Json to_json () const
std::string_view type_name () noexcept const
Get the type name of data stored in the attribute slot.
virtual ~IAttributeSlot () = default

Protected Functions

Type Name
virtual S< IAttributeSlot > do_clone (std::string_view name, bool allow_destroy) override const
virtual S< IAttributeSlot > do_clone_empty (std::string_view name, bool allow_destroy) override const
virtual void do_make_owned () override
virtual Json do_to_json (SizeT i) override const
virtual bool get_allow_destroy () noexcept override const
virtual IAttribute & get_attribute () noexcept override
virtual const IAttribute & get_attribute () noexcept override const
virtual std::string_view get_name () noexcept override const
virtual std::string_view get_type_name () noexcept override const
virtual SizeT get_use_count () noexcept override const

Protected Functions inherited from uipc::geometry::IAttributeSlot

See uipc::geometry::IAttributeSlot

Type Name
virtual IAttribute & attribute () noexcept
virtual const IAttribute & attribute () noexcept const
virtual S< IAttributeSlot > clone (std::string_view name, bool allow_destroy) const
virtual S< IAttributeSlot > clone_empty (std::string_view name, bool allow_destroy) const
virtual S< IAttributeSlot > do_clone (std::string_view name, bool allow_destroy) const = 0
virtual S< IAttributeSlot > do_clone_empty (std::string_view name, bool allow_destroy) const = 0
virtual void do_make_owned () = 0
virtual Json do_to_json (SizeT i) const = 0
virtual bool get_allow_destroy () noexcept const = 0
virtual IAttribute & get_attribute () noexcept = 0
virtual const IAttribute & get_attribute () noexcept const = 0
virtual std::string_view get_name () noexcept const = 0
virtual std::string_view get_type_name () noexcept const = 0
virtual SizeT get_use_count () const = 0
void make_owned ()
SizeT use_count () const

Detailed Description

Template parameters:

  • T The type of the attribute values.

Public Types Documentation

typedef value_type

using uipc::geometry::AttributeSlot< T >::value_type =  T;

Public Functions Documentation

function AttributeSlot

uipc::geometry::AttributeSlot::AttributeSlot (
    std::string_view m_name,
    S< Attribute < T > > attribute,
    bool allow_destroy
) 

function view [2/2]

Get the const attribute values.

span< const T > uipc::geometry::AttributeSlot::view () noexcept const

Returns:

span<const T>


Protected Functions Documentation

function do_clone

virtual S< IAttributeSlot > uipc::geometry::AttributeSlot::do_clone (
    std::string_view name,
    bool allow_destroy
) override const

Implements uipc::geometry::IAttributeSlot::do_clone


function do_clone_empty

virtual S< IAttributeSlot > uipc::geometry::AttributeSlot::do_clone_empty (
    std::string_view name,
    bool allow_destroy
) override const

Implements uipc::geometry::IAttributeSlot::do_clone_empty


function do_make_owned

virtual void uipc::geometry::AttributeSlot::do_make_owned () override

Implements uipc::geometry::IAttributeSlot::do_make_owned


function do_to_json

virtual Json uipc::geometry::AttributeSlot::do_to_json (
    SizeT i
) override const

Implements uipc::geometry::IAttributeSlot::do_to_json


function get_allow_destroy

virtual bool uipc::geometry::AttributeSlot::get_allow_destroy () noexcept override const

Implements uipc::geometry::IAttributeSlot::get_allow_destroy


function get_attribute [1/2]

virtual IAttribute & uipc::geometry::AttributeSlot::get_attribute () noexcept override

Implements uipc::geometry::IAttributeSlot::get_attribute


function get_attribute [2/2]

virtual const IAttribute & uipc::geometry::AttributeSlot::get_attribute () noexcept override const

Implements uipc::geometry::IAttributeSlot::get_attribute


function get_name

virtual std::string_view uipc::geometry::AttributeSlot::get_name () noexcept override const

Implements uipc::geometry::IAttributeSlot::get_name


function get_type_name

virtual std::string_view uipc::geometry::AttributeSlot::get_type_name () noexcept override const

Implements uipc::geometry::IAttributeSlot::get_type_name


function get_use_count

virtual SizeT uipc::geometry::AttributeSlot::get_use_count () noexcept override const

Implements uipc::geometry::IAttributeSlot::get_use_count


Friends Documentation

friend view [1/2]

Get the non-const attribute values.

template<typename U>
span< U > uipc::geometry::AttributeSlot::view (
    AttributeSlot < U > & slot
) 

Returns:

span<T>



The documentation for this class was generated from the following file include/uipc/geometry/attribute_slot.h