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.

121 lines
4.1 KiB

  1. /*
  2. ISC License
  3. Copyright (c) 2020, Antonio SJ Musumeci <trapexit@spawn.link>
  4. Permission to use, copy, modify, and/or distribute this software for any
  5. purpose with or without fee is hereby granted, provided that the above
  6. copyright notice and this permission notice appear in all copies.
  7. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #pragma once
  16. #include "policy_all.hpp"
  17. #include "policy_epall.hpp"
  18. #include "policy_epff.hpp"
  19. #include "policy_eplfs.hpp"
  20. #include "policy_eplus.hpp"
  21. #include "policy_epmfs.hpp"
  22. #include "policy_eppfrd.hpp"
  23. #include "policy_eprand.hpp"
  24. #include "policy_erofs.hpp"
  25. #include "policy_ff.hpp"
  26. #include "policy_lfs.hpp"
  27. #include "policy_lus.hpp"
  28. #include "policy_mfs.hpp"
  29. #include "policy_msplfs.hpp"
  30. #include "policy_msplus.hpp"
  31. #include "policy_mspmfs.hpp"
  32. #include "policy_msppfrd.hpp"
  33. #include "policy_newest.hpp"
  34. #include "policy_pfrd.hpp"
  35. #include "policy_rand.hpp"
  36. struct Policies
  37. {
  38. struct Action
  39. {
  40. static Policy::ActionImpl *find(const std::string &name);
  41. static Policy::All::Action all;
  42. static Policy::EPAll::Action epall;
  43. static Policy::EPFF::Action epff;
  44. static Policy::EPLFS::Action eplfs;
  45. static Policy::EPLUS::Action eplus;
  46. static Policy::EPMFS::Action epmfs;
  47. static Policy::EPPFRD::Action eppfrd;
  48. static Policy::EPRand::Action eprand;
  49. static Policy::ERoFS::Action erofs;
  50. static Policy::FF::Action ff;
  51. static Policy::LFS::Action lfs;
  52. static Policy::LUS::Action lus;
  53. static Policy::MFS::Action mfs;
  54. static Policy::MSPLFS::Action msplfs;
  55. static Policy::MSPLUS::Action msplus;
  56. static Policy::MSPMFS::Action mspmfs;
  57. static Policy::MSPPFRD::Action msppfrd;
  58. static Policy::Newest::Action newest;
  59. static Policy::PFRD::Action pfrd;
  60. static Policy::Rand::Action rand;
  61. };
  62. struct Create
  63. {
  64. static Policy::CreateImpl *find(const std::string &name);
  65. static Policy::All::Create all;
  66. static Policy::EPAll::Create epall;
  67. static Policy::EPFF::Create epff;
  68. static Policy::EPLFS::Create eplfs;
  69. static Policy::EPLUS::Create eplus;
  70. static Policy::EPMFS::Create epmfs;
  71. static Policy::EPPFRD::Create eppfrd;
  72. static Policy::EPRand::Create eprand;
  73. static Policy::ERoFS::Create erofs;
  74. static Policy::FF::Create ff;
  75. static Policy::LFS::Create lfs;
  76. static Policy::LUS::Create lus;
  77. static Policy::MFS::Create mfs;
  78. static Policy::MSPLFS::Create msplfs;
  79. static Policy::MSPLUS::Create msplus;
  80. static Policy::MSPMFS::Create mspmfs;
  81. static Policy::MSPPFRD::Create msppfrd;
  82. static Policy::Newest::Create newest;
  83. static Policy::PFRD::Create pfrd;
  84. static Policy::Rand::Create rand;
  85. };
  86. struct Search
  87. {
  88. static Policy::SearchImpl *find(const std::string &name);
  89. static Policy::All::Search all;
  90. static Policy::EPAll::Search epall;
  91. static Policy::EPFF::Search epff;
  92. static Policy::EPLFS::Search eplfs;
  93. static Policy::EPLUS::Search eplus;
  94. static Policy::EPMFS::Search epmfs;
  95. static Policy::EPPFRD::Search eppfrd;
  96. static Policy::EPRand::Search eprand;
  97. static Policy::ERoFS::Search erofs;
  98. static Policy::FF::Search ff;
  99. static Policy::LFS::Search lfs;
  100. static Policy::LUS::Search lus;
  101. static Policy::MFS::Search mfs;
  102. static Policy::MSPLFS::Search msplfs;
  103. static Policy::MSPLUS::Search msplus;
  104. static Policy::MSPMFS::Search mspmfs;
  105. static Policy::MSPPFRD::Search msppfrd;
  106. static Policy::Newest::Search newest;
  107. static Policy::PFRD::Search pfrd;
  108. static Policy::Rand::Search rand;
  109. };
  110. };