Class UserBufferMap

Class Documentation

class UserBufferMap

Public Functions

UserBufferMap()

Creates a new empty UserBuffer map.

UserBufferMap(const UserBufferMap &other)

Copy constructor.

Parameters

other[in] : Handle to the other userBufferMap to be copied from.

UserBufferMap(UserBufferMap &&other) noexcept
UserBufferMap &operator=(const UserBufferMap &other)

Assigns the contents of this handle into other handle.

Parameters

other – Destination UserBufferMap handle

Returns

SNPE_SUCCESS on successful Assignment

UserBufferMap &operator=(UserBufferMap &&other) noexcept

Assigns the contents of this handle into other handle.

Parameters

other – Destination UserBufferMap handle

Returns

SNPE_SUCCESS on successful Assignment

DlSystem::ErrorCode add(const char *name, IUserBuffer *buffer)

Adds a name and the corresponding UserBuffer pointer to the map.

Parameters
  • name[in] : The name of the UserBuffer

  • buffer[in] : Pointer to the UserBuffer

Note

If a UserBuffer with the same name already exists, the new UserBuffer pointer would be updated.

DlSystem::ErrorCode remove(const char *name) noexcept

Removes a mapping of one UserBuffer and its name by its name.

Parameters

name[in] : The name of UserBuffer to be removed

Note

If no UserBuffer with the specified name is found, nothing is done.

size_t size() const noexcept

Returns the number of UserBuffers in the map.

DlSystem::ErrorCode clear() noexcept

Removes all UserBuffers from the map.

IUserBuffer *getUserBuffer(const char *name) const noexcept

Returns the UserBuffer given its name.

Parameters

name[in] : The name of the UserBuffer to get.

Returns

nullptr if no UserBuffer with the specified name is found; otherwise, a valid pointer to the UserBuffer.

StringList getUserBufferNames() const

Returns the names of all UserBuffers.

Returns

A list of UserBuffer names.