TopicTemplate.h 671 B

1234567891011121314151617181920212223242526272829303132
  1. // This may look like C code, but it's really -*- C++ -*-
  2. /*
  3. * Copyright (C) 2012 Emweb bvba
  4. *
  5. * See the LICENSE file for terms of use.
  6. */
  7. #ifndef TOPIC_TEMPLATE_H_
  8. #define TOPIC_TEMPLATE_H_
  9. #include "Sample.h"
  10. #include <Wt/WTemplate>
  11. class TopicTemplate : public Wt::WTemplate
  12. {
  13. public:
  14. TopicTemplate(const char *trKey);
  15. virtual void resolveString(const std::string& varName,
  16. const std::vector<Wt::WString>& args,
  17. std::ostream& result);
  18. private:
  19. std::string docUrl(const std::string& className);
  20. std::string getString(const std::string& varName);
  21. static std::string escape(const std::string& name);
  22. };
  23. #endif // TOPIC_TEMPLATE_H_