Ftdi::List Class Reference

Device list. More...

`#include <ftdi.hpp>`

## Classes

class | Private

## Public Types

typedef std::list< Context > | ListType
| List type storing "Context" objects. More...
typedef ListType::iterator | iterator
| Iterator type for the container. More...
typedef ListType::const_iterator | const_iterator
| Const iterator type for the container. More...
typedef ListType::reverse_iterator | reverse_iterator
| Reverse iterator type for the container. More...
typedef ListType::const_reverse_iterator | const_reverse_iterator
| Const reverse iterator type for the container. More...

## Public Member Functions

| List (struct ftdi_device_list *devlist=0)
| ~List ()
iterator | begin ()
iterator | end ()
const_iterator | begin () const
const_iterator | end () const
reverse_iterator | rbegin ()
reverse_iterator | rend ()
const_reverse_iterator | rbegin () const
const_reverse_iterator | rend () const
ListType::size_type | size () const
bool | empty () const
void | clear ()
void | push_back (const Context &element)
void | push_front (const Context &element)
iterator | erase (iterator pos)
iterator | erase (iterator beg, iterator end)

## Static Public Member Functions

static List * | find_all (int vendor, int product)

## Detailed Description

Device list.

Definition at line 178 of file ftdi.hpp.

## Member Typedef Documentation

## ListType

typedef std::list<Context> Ftdi::List::ListType

List type storing "Context" objects.

Definition at line 187 of file ftdi.hpp.

## iterator

typedef ListType::iterator Ftdi::List::iterator

Iterator type for the container.

Definition at line 189 of file ftdi.hpp.

## const_iterator

typedef ListType::const_iterator Ftdi::List::const_iterator

Const iterator type for the container.

Definition at line 191 of file ftdi.hpp.

## reverse_iterator

typedef ListType::reverse_iterator Ftdi::List::reverse_iterator

Reverse iterator type for the container.

Definition at line 193 of file ftdi.hpp.

## const_reverse_iterator

typedef ListType::const_reverse_iterator Ftdi::List::const_reverse_iterator

Const reverse iterator type for the container.

Definition at line 195 of file ftdi.hpp.

## Constructor & Destructor Documentation

## List()

Ftdi::List::List | ( | struct ftdi_device_list * | devlist = `0` | ) |

Definition at line 468 of file ftdi.cpp.

References ftdi_device_list::dev, Ftdi::Context::get_strings(), and Ftdi::Context::set_usb_device().

## ~List()

Ftdi::List::~List | ( |  | ) |

Definition at line 484 of file ftdi.cpp.

## Member Function Documentation

## find_all()

List * Ftdi::List::find_all | ( | int | vendor,
|  | int | product
| ) |  |

static

Definition at line 635 of file ftdi.cpp.

## begin() [1/2]

List::iterator Ftdi::List::begin | ( |  | ) |

Return begin iterator for accessing the contained list elements

Returns
  Iterator

Definition at line 492 of file ftdi.cpp.

## end() [1/2]

List::iterator Ftdi::List::end | ( |  | ) |

Return end iterator for accessing the contained list elements

Returns
  Iterator

Definition at line 501 of file ftdi.cpp.

## begin() [2/2]

List::const_iterator Ftdi::List::begin | ( |  | ) | const

Return begin iterator for accessing the contained list elements

Returns
  Const iterator

Definition at line 510 of file ftdi.cpp.

## end() [2/2]

List::const_iterator Ftdi::List::end | ( |  | ) | const

Return end iterator for accessing the contained list elements

Returns
  Const iterator

Definition at line 519 of file ftdi.cpp.

## rbegin() [1/2]

List::reverse_iterator Ftdi::List::rbegin | ( |  | ) |

Return begin reverse iterator for accessing the contained list elements

Returns
  Reverse iterator

Definition at line 528 of file ftdi.cpp.

## rend() [1/2]

List::reverse_iterator Ftdi::List::rend | ( |  | ) |

Return end reverse iterator for accessing the contained list elements

Returns
  Reverse iterator

Definition at line 537 of file ftdi.cpp.

## rbegin() [2/2]

List::const_reverse_iterator Ftdi::List::rbegin | ( |  | ) | const

Return begin reverse iterator for accessing the contained list elements

Returns
  Const reverse iterator

Definition at line 546 of file ftdi.cpp.

## rend() [2/2]

List::const_reverse_iterator Ftdi::List::rend | ( |  | ) | const

Return end reverse iterator for accessing the contained list elements

Returns
  Const reverse iterator

Definition at line 555 of file ftdi.cpp.

## size()

List::ListType::size_type Ftdi::List::size | ( |  | ) | const

Get number of elements stored in the list

Returns
  Number of elements

Definition at line 565 of file ftdi.cpp.

## empty()

bool Ftdi::List::empty | ( |  | ) | const

Check if list is empty

Returns
  True if empty, false otherwise

Definition at line 574 of file ftdi.cpp.

## clear()

void Ftdi::List::clear | ( |  | ) |

Removes all elements. Invalidates all iterators. Do it in a non-throwing way and also make sure we really free the allocated memory.

Definition at line 584 of file ftdi.cpp.

References ftdi_list_free().

## push_back()

void Ftdi::List::push_back | ( | const Context & | element | ) |

Appends a copy of the element as the new last element.

Parameters

  element | Value to copy and append

Definition at line 600 of file ftdi.cpp.

## push_front()

void Ftdi::List::push_front | ( | const Context & | element | ) |

Adds a copy of the element as the new first element.

Parameters

  element | Value to copy and add

Definition at line 609 of file ftdi.cpp.

## erase() [1/2]

List::iterator Ftdi::List::erase | ( | iterator | pos | ) |

Erase one element pointed by iterator

Parameters

  pos | Element to erase

Returns
  Position of the following element (or end())

Definition at line 619 of file ftdi.cpp.

## erase() [2/2]

List::iterator Ftdi::List::erase | ( | iterator | beg,
|  | iterator | end
| ) |  |

Erase a range of elements

Parameters

  beg | Begin of range
  end | End of range

Returns
  Position of the element after the erased range (or end())

Definition at line 630 of file ftdi.cpp.

References ftdi_init().

The documentation for this class was generated from the following files:

- ftdi.hpp
- ftdi.cpp