List having non-virtual destructor fixed (thanks to Thomas Jarosch) Proposed subset...
[libftdi] / ftdipp / ftdi.hpp
index 4c3b7c5..d56660d 100644 (file)
@@ -162,11 +162,9 @@ private:
     boost::shared_ptr<Private> d;
 };
 
-typedef std::list<Context> ListBase;
-
 /*! \brief Device list.
  */
-class List : public ListBase
+class List
 {
 public:
     List(struct ftdi_device_list* devlist = 0);
@@ -174,6 +172,28 @@ public:
 
     static List* find_all(int vendor, int product);
 
+    /*! List size */
+    int size();
+
+    /*! Append element */
+    void push_back(const Context& element);    
+    void append(const Context& element)
+    { push_back(element); }
+
+    /*! Prepend element */
+    void push_front(const Context& element);
+    void prepend(const Context& element)
+    { push_front(element); }
+
+    /*! Clear list */
+    void clear();
+
+    /* Iterators */
+    typedef std::list<Context>::iterator iterator;
+    std::list<Context>::iterator begin();
+    std::list<Context>::iterator end();
+
+
 private:
     class Private;
     boost::shared_ptr<Private> d;