types.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * BIBISH Is [a] Bible Interactive SHell, a front-end for the SWORD Project
  3. * inspired by Debian's bible package
  4. * Copyright (C) 2015 David "Judah's Shadow" Blue <yudahsshadow@gmx.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; version 2 of the License
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. *
  19. */
  20. #ifndef TYPES_H
  21. #define TYPES_H
  22. #include <string>
  23. #include <list>
  24. //Keep this around in case it is decided to keep lines as lists of words
  25. //instead of a block of text
  26. // typedef std::list<std::string> line;
  27. // typedef std::list<line> page;
  28. typedef std::string line;
  29. struct Page {
  30. int lineCount;
  31. line content;
  32. };
  33. //Create a page type of the preceding struct
  34. typedef Page page;
  35. /* Enumerated data type for commands. parseCommand in the Parser class
  36. * will take a command in, figure out what it is supposed to be based
  37. * on known localized equivalents to the commands.
  38. * Commands listed in an, as added order
  39. */
  40. enum Commands {
  41. cmdQuit,
  42. cmdList,
  43. cmdSelect,
  44. cmdSearch,
  45. cmdShow,
  46. cmdHelp,
  47. cmdUnknon
  48. };
  49. //convenience type so the project doesn't have to depend on glibc
  50. typedef unsigned int uint;
  51. #endif // TYPES_H