Fork de wikipp, le moteur de wiki en c++, basé sur cppcms. Le fork ajoute la langue française
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.

wiki.h 871B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef WIKI_H
  2. #define WIKI_H
  3. #include <cppcms/application.h>
  4. #include <cppdb/frontend.h>
  5. #include "page.h"
  6. #include "users.h"
  7. #include "index.h"
  8. #include "options.h"
  9. namespace apps {
  10. class wiki : public cppcms::application {
  11. friend class apps::page;
  12. friend class apps::options;
  13. friend class apps::users;
  14. friend class apps::index;
  15. friend class apps::master;
  16. std::string script;
  17. public:
  18. std::string conn;
  19. // Data
  20. std::string locale_name;
  21. // Applications
  22. apps::page page;
  23. apps::options options;
  24. apps::users users;
  25. apps::index index;
  26. std::string language_default;
  27. std::string root(std::string locale_name="");
  28. bool set_locale(std::string);
  29. void run(std::string lang,std::string url);
  30. //virtual void on_404();
  31. virtual void main(std::string url);
  32. wiki(cppcms::service &s);
  33. private:
  34. std::map<std::string,std::string> lang_map;
  35. };
  36. }
  37. #endif