File: Vector.h

package info (click to toggle)
bouml 4.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 64,396 kB
  • ctags: 49,113
  • sloc: cpp: 244,497; makefile: 219
file content (32 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _VECTOR_H
#define _VECTOR_H


#include <qvector.h>

class UmlItem;

// The original html generator was written in Java to test the Java 
// version of the API, this class allows to have a source code similar
// in C++
class Vector {
  public:
    bool isEmpty() const {return v.isEmpty(); }

    unsigned int size() const { return v.count(); }

    void addElement(const UmlItem * x);

    UmlItem * elementAt(unsigned int i) const { return v[i]; }

    void setElementAt(const UmlItem * x, unsigned int i) { v.insert(i, x); }

    bool contains(const UmlItem * x) { return (!v.isEmpty() && (v.findRef(x) != -1)); }


  protected:
    QVector<UmlItem> v;

};

#endif