Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::PlugEnumerator Struct Referenceabstract

Interface for enumerating the Plugs an object provides. More...

#include <C:/Trend/Development/Trax3/Code/trax/Plug.h>

Inheritance diagram for trax::PlugEnumerator:

Public Types

Type information for iterator implementation
typedef PlugEnumerator collection_type
typedef Plug value_type

Public Member Functions

virtual int CountPlugs () const =0
GetPlug

Get one of the object's Plugs.

Parameters
nameidx The zero based index of the Plug.
Exceptions
std::range_errorif idx is not in [0,SizePlugs()(
PlugGetPlug (int idx)
const PlugGetPlug (int idx) const

Protected Member Functions

 PlugEnumerator (const PlugEnumerator &)=default
 PlugEnumerator (PlugEnumerator &&)=default
PlugEnumerator & operator= (const PlugEnumerator &)=default
PlugEnumerator & operator= (PlugEnumerator &&)=default
virtual const Plug_GetPlug (int idx) const =0
 to be implemented for an object that provides plugs.

Detailed Description

Interface for enumerating the Plugs an object provides.

The interface can be retrieved by dynamic_cast for every object that provides Plugs. There is a begin/end pair of functions defined, that can get used for iterating, e.g. in a range-for loop.

Member Function Documentation

◆ _GetPlug()

virtual const Plug & trax::PlugEnumerator::_GetPlug ( int idx) const
protectedpure virtual

to be implemented for an object that provides plugs.

Do not rely on constness of the returned plug. The alternative would have been to implement all the GetPlug a second time for constness.

Returns
a plug by index.

◆ CountPlugs()

virtual int trax::PlugEnumerator::CountPlugs ( ) const
pure virtual
Returns
The total number of plugs available through this interface.

The documentation for this struct was generated from the following file:
  • C:/Trend/Development/Trax3/Code/trax/Plug.h