~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic-proposed

« back to all changes in this revision

Viewing changes to pgadmin/gqb/gqbCollection.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2011-06-07 23:03:54 UTC
  • mfrom: (1.3.1 upstream) (13 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20110607230354-3td4j9y71u4ahcvj
Tags: 1.14.0~beta1-1
* New upstream development release, adding Build-Depends on
  postgresql-server-dev-all >= 117~.
* Add Build-Depends on quilt, (un)patch to debian/rules and patch for fixing
  the include for kwlist.h in pgadmin/db/keywords.c.
* Add pg_config --includedir-server output to CPPFLAGS.
* Remove unrecognized configure options: --with-wx-config,
  --with-pgsql-include, --enable-gtk2, --enable-unicode.
* Clean up manually the files that are left behind after the broken
  distclean.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// pgAdmin III - PostgreSQL Tools
4
 
// 
5
 
// Copyright (C) 2002 - 2010, The pgAdmin Development Team
 
4
//
 
5
// Copyright (C) 2002 - 2011, The pgAdmin Development Team
6
6
// This software is released under the PostgreSQL Licence
7
7
//
8
8
// gqbCollection.cpp - Generic implementation of a Collection used by GQB.
21
21
 
22
22
gqbCollection::gqbCollection(gqbCollectionBase *collectionBase)
23
23
{
24
 
    collection=collectionBase;
 
24
        collection = collectionBase;
25
25
}
26
26
 
27
27
 
28
28
gqbCollection::~gqbCollection()
29
29
{
30
 
    if(collection)
31
 
        delete collection;
 
30
        if(collection)
 
31
                delete collection;
32
32
}
33
33
 
34
34
 
35
35
void gqbCollection::addItem(gqbObject *item)
36
36
{
37
 
    collection->addItem(item);
 
37
        collection->addItem(item);
38
38
}
39
39
 
40
40
 
41
41
void gqbCollection::removeItem(gqbObject *item)
42
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();
 
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
55
}
56
56
 
57
57
 
58
58
int gqbCollection::count()
59
59
{
60
 
    return collection->count();
 
60
        return collection->count();
61
61
}
62
62
 
63
63
 
64
64
bool gqbCollection::existsObject(gqbObject *item)
65
65
{
66
 
    return collection->existsObject(item);
 
66
        return collection->existsObject(item);
67
67
}
68
68
 
69
69
 
70
 
gqbObject* gqbCollection::getItemAt(int index)
 
70
gqbObject *gqbCollection::getItemAt(int index)
71
71
{
72
 
    return collection->getItemAt(index);
 
72
        return collection->getItemAt(index);
73
73
}
74
74
 
75
75
 
76
76
// Remove all items from collection without deleting each one.
77
77
void gqbCollection::removeAll()
78
78
{
79
 
    collection->removeAll();
 
79
        collection->removeAll();
80
80
}
81
81
 
82
82
 
83
83
void gqbCollection::deleteAll()
84
84
{
85
 
    collection->deleteAll();
 
85
        collection->deleteAll();
86
86
}
87
87
 
88
88
 
89
89
int gqbCollection::getIndex(gqbObject *item)
90
90
{
91
 
    return collection->getIndex(item);
 
91
        return collection->getIndex(item);
92
92
}
93
93
 
94
94
 
95
95
void gqbCollection::insertAtIndex(gqbObject *item, int index)
96
96
{
97
 
    collection->insertAtIndex(item,index);
 
97
        collection->insertAtIndex(item, index);
98
98
}