renamed some macros to please doogie :P
[ntk/apt.git] / ftparchive / override.h
CommitLineData
b2e465d6
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
812f4169 3// $Id: override.h,v 1.3 2001/05/29 03:49:53 jgg Exp $
b2e465d6
AL
4/* ######################################################################
5
6 Override
7
8 Store the override file.
9
10 ##################################################################### */
11 /*}}}*/
12#ifndef OVERRIDE_H
13#define OVERRIDE_H
14
15#ifdef __GNUG__
16#pragma interface "override.h"
17#endif
18
19#include <map>
20#include <string>
812f4169
AL
21
22using std::string;
23using std::map;
b2e465d6
AL
24
25class Override
26{
27 public:
28
29 struct Item
30 {
31 string Priority;
32 string Section;
33 string OldMaint;
34 string NewMaint;
35
36 string SwapMaint(string Orig,bool &Failed);
37 };
38
39 map<string,Item> Mapping;
40
41 inline Item *GetItem(string Package)
42 {
43 map<string,Item>::iterator I = Mapping.find(Package);
44 if (I == Mapping.end())
45 return 0;
46 return &I->second;
47 };
48
49 bool ReadOverride(string File,bool Source = false);
50};
51
52#endif
53