template <typename Interface>

class InterfacePtrSet

Defined at line 29 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h

Contains a set of |InterfacePtr| objects, each with their own channels.

An |InterfacePtr| is removed from the set and destroyed when its underlying

channel experiences an error. When the set is destroyed, all the underlying

channels are closed.

An |InterfacePtrSet| is useful for broadcasting messages to a set of clients,

each with their own implementation of |Interface|.

See also:

* |BindingSet|, which is the server analog of an |InterfacePtrSet|.

Public Methods

void InterfacePtrSet<Interface> ()

Creates an empty |InterfacePtrSet|.

Defined at line 35 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h

void InterfacePtrSet<Interface> (const InterfacePtrSet<Interface> & other)

Defined at line 37 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h

InterfacePtrSet<Interface> & operator= (const InterfacePtrSet<Interface> & other)

Defined at line 38 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h

void AddInterfacePtr (InterfacePtr<Interface> ptr)

Adds the given |InterfacePtr| to the set.

The |InterfacePtr| must already be bound to a channel. The |InterfacePtr|

will be removed from the set when its underlying channel experiences an

error.

Defined at line 45 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h

const StorageType & ptrs ()

The |InterfacePtr| objects stored in this set.

This collection of bindings can be invalidated when an |InterfacePtr| in

the set encounters a connection error because connection errors causes the

|InterfacePtrSet| to remove the |InterfacePtr| from the set.

Defined at line 61 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h

void CloseAll ()

Closes all channels associated with |InterfacePtr| objects in the set.

After this method returns, the set is empty.

Defined at line 66 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h

size_t size ()

The number of |InterfacePtr| objects in the set.

This number might be smaller than the number of |InterfacePtr| objects

added to the set if some of the underlying channels have experienced an

error.

Defined at line 73 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/interface_ptr_set.h