]> git.saurik.com Git - apt.git/blob - apt-pkg/indexfile.cc
* remove all the remaining #pragma implementation
[apt.git] / apt-pkg / indexfile.cc
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
3 // $Id: indexfile.cc,v 1.2.2.1 2003/12/24 23:09:17 mdz Exp $
4 /* ######################################################################
5
6 Index File - Abstraction for an index of archive/souce file.
7
8 ##################################################################### */
9 /*}}}*/
10 // Include Files /*{{{*/
11 #include <apt-pkg/indexfile.h>
12 #include <apt-pkg/error.h>
13 /*}}}*/
14
15 // Global list of Item supported
16 static pkgIndexFile::Type *ItmList[10];
17 pkgIndexFile::Type **pkgIndexFile::Type::GlobalList = ItmList;
18 unsigned long pkgIndexFile::Type::GlobalListLen = 0;
19
20 // Type::Type - Constructor /*{{{*/
21 // ---------------------------------------------------------------------
22 /* */
23 pkgIndexFile::Type::Type()
24 {
25 ItmList[GlobalListLen] = this;
26 GlobalListLen++;
27 }
28 /*}}}*/
29 // Type::GetType - Locate the type by name /*{{{*/
30 // ---------------------------------------------------------------------
31 /* */
32 pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type)
33 {
34 for (unsigned I = 0; I != GlobalListLen; I++)
35 if (strcmp(GlobalList[I]->Label,Type) == 0)
36 return GlobalList[I];
37 return 0;
38 }
39 /*}}}*/
40
41 // IndexFile::ArchiveInfo - Stub /*{{{*/
42 // ---------------------------------------------------------------------
43 /* */
44 string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
45 {
46 return string();
47 }
48 /*}}}*/
49 // IndexFile::FindInCache - Stub /*{{{*/
50 // ---------------------------------------------------------------------
51 /* */
52 pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const
53 {
54 return pkgCache::PkgFileIterator(Cache);
55 }
56 /*}}}*/
57 // IndexFile::SourceIndex - Stub /*{{{*/
58 // ---------------------------------------------------------------------
59 /* */
60 string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
61 pkgSrcRecords::File const &File) const
62 {
63 return string();
64 }
65 /*}}}*/