Leap Motion C++ API Reference  0.8.0
Leap::DeviceList Class Reference

The DeviceList class represents a list of Device objects. More...

Inherits Leap::Interface.

Public Types

typedef ConstListIterator
< DeviceList, Device
const_iterator
 A C++ iterator type for this DeviceList objects.
 

Public Member Functions

DeviceListappend (const DeviceList &other)
 Appends the members of the specifed DeviceList to this DeviceList.
 
const_iterator begin () const
 The C++ iterator set to the beginning of this DeviceList.
 
int count () const
 Returns the number of devices in this list.
 
 DeviceList ()
 Constructs an empty list of devices.
 
const_iterator end () const
 The C++ iterator set to the end of this DeviceList.
 
bool isEmpty () const
 Reports whether the list is empty.
 
Device operator[] (int index) const
 Access a list member by its position in the list.
 

Detailed Description

The DeviceList class represents a list of Device objects.

Get a DeviceList object by calling Controller::devices().

Member Typedef Documentation

typedef ConstListIterator<DeviceList, Device> Leap::DeviceList::const_iterator

A C++ iterator type for this DeviceList objects.

Constructor & Destructor Documentation

Leap::DeviceList::DeviceList ( )

Constructs an empty list of devices.

Member Function Documentation

DeviceList& Leap::DeviceList::append ( const DeviceList other)

Appends the members of the specifed DeviceList to this DeviceList.

Parameters
otherA DeviceList object containing Device objects to append to the end of this DeviceList.
const_iterator Leap::DeviceList::begin ( ) const

The C++ iterator set to the beginning of this DeviceList.

int Leap::DeviceList::count ( ) const

Returns the number of devices in this list.

Returns
The number of devices in this list.
const_iterator Leap::DeviceList::end ( ) const

The C++ iterator set to the end of this DeviceList.

bool Leap::DeviceList::isEmpty ( ) const

Reports whether the list is empty.

Returns
True, if the list has no members.
Device Leap::DeviceList::operator[] ( int  index) const

Access a list member by its position in the list.

Parameters
indexThe zero-based list position index.
Returns
The Device object at the specified index.