class ov::ValueAccessor<void>

Overview

ValueAccessor<void> provides an accessor for values that do not have get/set methods via AttributeVisitor.on_adapter. More…

#include <attribute_adapter.hpp>

template <>
class ValueAccessor<void>
{
public:
    // methods

    virtual const DiscreteTypeInfo& get_type_info() const = 0;
    virtual void set_as_any(const ov::Any& x);
};

// direct descendants

template <>
class ValueAccessor<void \*>;

class VisitorAdapter;

Detailed Documentation

ValueAccessor<void> provides an accessor for values that do not have get/set methods via AttributeVisitor.on_adapter.

All ValueAccessors must be derived from ValueAccessor<void> so that an AttributeVisitor only needs to implement a subset of the on_adapter methods.

Methods

virtual const DiscreteTypeInfo& get_type_info() const = 0

type info enables identification of the value accessor, as well as is_type and as_type.

class ov::ValueAccessor<void *>

#include <attribute_adapter.hpp>

template <>
class ValueAccessor<void \*>: public ov::ValueAccessor<void>
{
public:
    // methods

    virtual void \* get_ptr() = 0;
    virtual size_t size() = 0;
};

Inherited Members

public:
    // methods

    virtual const DiscreteTypeInfo& get_type_info() const = 0;
    virtual void set_as_any(const ov::Any& x);

class ov::ValueAccessor

Overview

Provides access to an attribute of type AT as a value accessor type VAT. More…

#include <attribute_adapter.hpp>

template <typename VAT>
class ValueAccessor
{
public:
    // methods

    virtual const VAT& get() = 0;
    virtual void set(const VAT& value) = 0;
    void set_as_any(const ov::Any& x);
};

// direct descendants

template <typename AT>
class DirectValueAccessor;

template <typename AT, typename VAT>
class IndirectScalarValueAccessor;

template <typename AT, typename VAT>
class IndirectVectorValueAccessor;

Detailed Documentation

Provides access to an attribute of type AT as a value accessor type VAT.

Provides access to values via get/set methods from an m_value, typically from ValueReference.

The m_buffer holds a VAT, which may be wider than the attribute AT. For example, serializers that only support int64_t integers would use a ValueAccessor<vector<int64_t>> to reference a vector<int8_t> attribute. Destruction moves the value back to the attribute if it was changed.

Parameters:

VAT

The adapter value type; may be wider than the value being accessed.

Methods

virtual const VAT& get() = 0

Returns the value.

virtual void set(const VAT& value) = 0

Sets the value.