~ubuntu-branches/debian/sid/pgadmin3/sid

« back to all changes in this revision

Viewing changes to pgadmin/gqb/gqbCollection.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2009-07-30 12:27:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730122716-fddbh42on721bbs2
Tags: 1.10.0-1
* New upstream release.
* Adjusted watch file to match release candidates.
* Updated to Standards-Version 3.8.2:
  - Moved to Section: database.
  - Add DEB_BUILD_OPTIONS support for parallel building.
  - Move from findstring to filter suggestion for DEB_BUILD_OPTIONS parsing.
* pgagent got split into its own separate source package by upstream.
* Exclude Docs.vcproj from installation.
* Move doc-base.enus from pgadmin3 to pgadmin3-data package, the files are
  in there too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// pgAdmin III - PostgreSQL Tools
 
4
// RCS-ID:      $Id: gqbCollection.cpp 7758 2009-03-26 20:49:59Z dpage $
 
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
 
6
// This software is released under the BSD Licence
 
7
//
 
8
// gqbCollection.cpp - Generic implementation of a Collection used by GQB.
 
9
//
 
10
//////////////////////////////////////////////////////////////////////////
 
11
 
 
12
// App headers
 
13
#include "pgAdmin3.h"
 
14
 
 
15
// wxWindows headers
 
16
#include <wx/wx.h>
 
17
 
 
18
// App headers
 
19
#include "gqb/gqbCollection.h"
 
20
#include "gqb/gqbObject.h"
 
21
 
 
22
gqbCollection::gqbCollection(gqbCollectionBase *collectionBase)
 
23
{
 
24
    collection=collectionBase;
 
25
}
 
26
 
 
27
 
 
28
gqbCollection::~gqbCollection()
 
29
{
 
30
    if(collection)
 
31
        delete collection;
 
32
}
 
33
 
 
34
 
 
35
void gqbCollection::addItem(gqbObject *item)
 
36
{
 
37
    collection->addItem(item);
 
38
}
 
39
 
 
40
 
 
41
void gqbCollection::removeItem(gqbObject *item)
 
42
{
 
43
    collection->removeItem(item);
 
44
}
 
45
 
 
46
 
 
47
gqbIteratorBase* gqbCollection::createIterator()
 
48
{
 
49
    return collection->createIterator();
 
50
}
 
51
 
 
52
gqbIteratorBase* gqbCollection::createDownIterator()
 
53
{
 
54
    return collection->createDownIterator();
 
55
}
 
56
 
 
57
 
 
58
int gqbCollection::count()
 
59
{
 
60
    return collection->count();
 
61
}
 
62
 
 
63
 
 
64
bool gqbCollection::existsObject(gqbObject *item)
 
65
{
 
66
    return collection->existsObject(item);
 
67
}
 
68
 
 
69
 
 
70
gqbObject* gqbCollection::getItemAt(int index)
 
71
{
 
72
    return collection->getItemAt(index);
 
73
}
 
74
 
 
75
 
 
76
// Remove all items from collection without deleting each one.
 
77
void gqbCollection::removeAll()
 
78
{
 
79
    collection->removeAll();
 
80
}
 
81
 
 
82
 
 
83
void gqbCollection::deleteAll()
 
84
{
 
85
    collection->deleteAll();
 
86
}
 
87
 
 
88
 
 
89
int gqbCollection::getIndex(gqbObject *item)
 
90
{
 
91
    return collection->getIndex(item);
 
92
}
 
93
 
 
94
 
 
95
void gqbCollection::insertAtIndex(gqbObject *item, int index)
 
96
{
 
97
    collection->insertAtIndex(item,index);
 
98
}