summaryrefslogtreecommitdiffstats
path: root/src/datavectors.h
blob: 14e38d67869eb7ecd9eab992a8f58558f0c33e49 (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                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 KSharedPtr<Filter> FilterPtr;
  typedef Vector<Filter> FilterVec;

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

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

    class Entry;
    typedef KSharedPtr<Entry> EntryPtr;
    typedef KSharedPtr<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 KSharedPtr<Borrower> BorrowerPtr;
    typedef Vector<Borrower> BorrowerVec;
  }
}

#endif