// file : brep/page -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #ifndef BREP_PAGE #define BREP_PAGE #include #include // size_t #include #include namespace brep { // Page common building blocks. // // A element default style. // struct A_STYLE { void operator() (xml::serializer& s) const; }; // Generates paging element. // class DIV_PAGER { public: DIV_PAGER (std::size_t current_page, std::size_t item_count, std::size_t item_per_page, std::size_t page_number_count, const std::string& url); void operator() (xml::serializer& s) const; private: std::size_t current_page_; std::size_t item_count_; std::size_t item_per_page_; std::size_t page_number_count_; const std::string& url_; }; // DIV_PAGER element default style. // struct DIV_PAGER_STYLE { void operator() (xml::serializer& s) const; }; // Generates url element. // class DIV_URL { public: DIV_URL (const url& u): url_ (u) {} void operator() (xml::serializer& s) const; private: const url& url_; }; // Generates email element. // class DIV_EMAIL { public: DIV_EMAIL (const email& e): email_ (e) {} void operator() (xml::serializer& s) const; private: const email& email_; }; // Generates package tags element. // class DIV_TAGS { public: DIV_TAGS (const strings& ts): tags_ (ts) {} void operator() (xml::serializer& s) const; private: const strings& tags_; }; // Generates package version license alternatives element. // class DIV_LICENSES { public: DIV_LICENSES (const license_alternatives& l): license_alternatives_ (l) {} void operator() (xml::serializer& s) const; private: const license_alternatives& license_alternatives_; }; // Generates package version priority element. // class DIV_PRIORITY { public: DIV_PRIORITY (const priority& p): priority_ (p) {} void operator() (xml::serializer& s) const; private: const priority& priority_; }; // Generates package search element. // class FORM_SEARCH { public: FORM_SEARCH (const std::string& q): query_ (q) {} void operator() (xml::serializer& s) const; private: const std::string& query_; }; } #endif // BREP_PAGE