You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
1003 B

  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: override.h,v 1.3 2001/05/29 03:49:53 jgg Exp $
  4. /* ######################################################################
  5. Override
  6. Store the override file.
  7. ##################################################################### */
  8. /*}}}*/
  9. #ifndef OVERRIDE_H
  10. #define OVERRIDE_H
  11. #ifdef __GNUG__
  12. #pragma interface "override.h"
  13. #endif
  14. #include <map>
  15. #include <string>
  16. using std::string;
  17. using std::map;
  18. class Override
  19. {
  20. public:
  21. struct Item
  22. {
  23. string Priority;
  24. string Section;
  25. string OldMaint;
  26. string NewMaint;
  27. string SwapMaint(string Orig,bool &Failed);
  28. };
  29. map<string,Item> Mapping;
  30. inline Item *GetItem(string Package)
  31. {
  32. map<string,Item>::iterator I = Mapping.find(Package);
  33. if (I == Mapping.end())
  34. return 0;
  35. return &I->second;
  36. };
  37. bool ReadOverride(string File,bool Source = false);
  38. };
  39. #endif