VariantAccessor.has

Check if requested property is present in component.

Check if requested property is present in component. The method could have allocation side effects due to the fact that it is not restricted in calling access method of the accessor.

  1. bool has(ComponentType component, KType key, RCIAllocator allocator)
  2. bool has(ComponentType component, KeyType key, RCIAllocator allocator)
    class VariantAccessor(ComponentType, FieldType = ComponentType, KeyType = ComponentType)
    const nothrow
    bool
    has
    (
    ComponentType component
    ,
    in KeyType key
    ,
    RCIAllocator allocator = theAllocator
    )
    if (
    is(ComponentType : VariantN!(ComponentSize, ComponentTypes),
    size_t ComponentSize
    ComponentTypes...
    ) &&
    is(FieldType : VariantN!(FieldSize, FieldTypes),
    size_t FieldSize
    FieldTypes...
    )
    &&
    is(KeyType : VariantN!(KeySize, KeyTypes),
    size_t KeySize
    KeyTypes...
    )
    )

Parameters

component ComponentType

component which is supposed to have property

Return Value

Type: bool

true if property is in component

Meta