summaryrefslogtreecommitdiffstats
path: root/src/datavectors.h
blob: 73591e2d342ca94ce5aa04fa203528d0bc7f6550 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/***************************************************************************
    copyright            : (C) 2001-2006 by Robby Stephenson
    email                : robby@periapsis.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of version 2 of the GNU General Public License as  *
 *   published by the Free Software Foundation;                            *
 *                                                                         *
 ***************************************************************************/

#ifndef DATA_VECTORS_H
#define DATA_VECTORS_H

#include "ptrvector.h"

#include <tqmap.h>
#include <tqpair.h>

#include <ksharedptr.h>

namespace Tellico {
  typedef TQMap<TQString, TQString> StringMap;

  class Filter;
  typedef TDESharedPtr<Filter> FilterPtr;
  typedef Vector<Filter> FilterVec;

  namespace Data {
    class Collection;
    typedef TDESharedPtr<Collection> CollPtr;
    typedef TDESharedPtr<const Collection> ConstCollPtr;
    typedef Vector<Collection> CollVec;

    class Field;
    typedef TDESharedPtr<Field> FieldPtr;
    typedef TDESharedPtr<const Field> ConstFieldPtr;
    typedef Vector<Field> FieldVec;
    typedef FieldVec::Iterator FieldVecIt;
//    typedef Vector<ConstFieldPtr> ConstFieldVec;

    class Entry;
    typedef TDESharedPtr<Entry> EntryPtr;
    typedef TDESharedPtr<const Entry> ConstEntryPtr;
    typedef Vector<Entry> EntryVec;
    typedef EntryVec::Iterator EntryVecIt;
    typedef Vector<const Entry> ConstEntryVec;
    // complicated, I know
    // first item is a vector of all entries that got added in the merge process
    // second item is a pair of entries that had their track field modified
    // since a music collection is the only one that would actually merge entries
    typedef TQValueVector< TQPair<EntryPtr, TQString> > PairVector;
    typedef TQPair<Data::EntryVec, PairVector> MergePair;

    class Borrower;
    typedef TDESharedPtr<Borrower> BorrowerPtr;
    typedef Vector<Borrower> BorrowerVec;
  }
}

#endif