2 * Copyright (c) 2001, Robert Collins.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
16 #ifndef _PACKAGE_DB_H_
17 #define _PACKAGE_DB_H_
19 /* required to parse this file */
26 class PackageSpecification
;
35 typedef std::vector
<packagemeta
*>::iterator PackageDBConnectedIterator
;
44 packagemeta
* findBinary (PackageSpecification
const &) const;
45 packagemeta
* findSource (PackageSpecification
const &) const;
46 PackageDBConnectedIterator
connectedBegin();
47 PackageDBConnectedIterator
connectedEnd();
48 /* all seen binary packages */
49 static std::vector
< packagemeta
*> packages
;
50 /* all seen source packages */
51 static std::vector
<packagemeta
*> sourcePackages
;
52 /* all seen categories */
53 typedef std::map
<String
, std::vector
<packagemeta
*>, String::caseless
> categoriesType
;
54 static categoriesType categories
;
55 static PackageDBActions task
;
57 static int installeddbread
; /* do we have to reread this */
58 friend class ConnectedLoopFinder
;
59 static std::vector
<packagemeta
*> dependencyOrderedPackages
;
62 #endif /* _PACKAGE_DB_H_ */