diff --git a/Doxyfile b/Doxyfile index 264645cd2..01f28e6aa 100644 --- a/Doxyfile +++ b/Doxyfile @@ -653,7 +653,7 @@ MAX_INITIALIZER_LINES = 30 # list will mention the files that were used to generate the documentation. # The default value is: YES. -SHOW_USED_FILES = YES +SHOW_USED_FILES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View diff --git a/customdoxygen.css b/customdoxygen.css index 48f003bda..dcce4f680 100644 --- a/customdoxygen.css +++ b/customdoxygen.css @@ -58,7 +58,11 @@ h2 { font-weight: normal; margin: 42px 0px 20px 0px; } - +/* +h3 { + font-family: "Courier New", courier, monospace; +} +*/ h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { text-shadow: 0 0 15px cyan; } @@ -195,7 +199,9 @@ pre.fragment { div.fragment { padding: 6px 10px; - margin: 15px 0px 15px 30px; + /*margin: 15px 0px 15px 30px;*/ + margin-top: 15px; + margin-bottom: 15px; border: solid 1px rgb(221, 221, 221); border-radius: 3px; width: fit-content; @@ -554,6 +560,17 @@ table.memberdecls { padding: 2px; } +.memtitle { + font-size: 0%; + padding: 0; + /*padding-top: 5px; + padding-bottom: 5px; + margin-right: 5px;*/ + width: 100%; + background-image: none; + display: none; +} + .mempage { width: 100%; } @@ -561,7 +578,7 @@ table.memberdecls { .memitem { padding: 0; margin-bottom: 10px; - margin-right: 5px; + /*margin-right: 5px;*/ -webkit-transition: box-shadow 0.5s linear; -moz-transition: box-shadow 0.5s linear; -ms-transition: box-shadow 0.5s linear; @@ -569,8 +586,9 @@ table.memberdecls { transition: box-shadow 0.5s linear; display: table !important; width: 100%; - box-shadow: 0 0 15px silver; - border: 1px solid silver +/* box-shadow: 0 0 15px silver; + border: 1px solid silver; */ + border-bottom: 1px solid silver; } .memitem.glow { @@ -593,41 +611,27 @@ table.memberdecls { .memproto, dl.reflist dt { margin-top: 1.5em; - border-top: none; +/* border-top: none; border-left: none; border-right: none; - border-bottom: 1px solid rgb(172, 172, 172); + border-bottom: 1px solid rgb(172, 172, 172);*/ + border: solid 1px rgb(221, 221, 221); + background-color: rgb(250, 250, 250); padding: 2px; color: black; - //font-family: Courier, Consolas, monospace; font-weight: bold; - //text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - //text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3); text-shadow: none; - //background-image:url('nav_f.png'); background-image: none; - //background-repeat:repeat-x; - //background-color: #E2E8F2; - //background-color: rgb(235, 238, 241); - //background-color: #ccc; - background-color: white; + /*background-color: white;*/ /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - //border-top-right-radius: 4px; - //border-top-left-radius: 4px; border-top-right-radius: 0px; border-top-left-radius: 0px; /* firefox specific markup */ - //-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - //-moz-border-radius-topright: 4px; - //-moz-border-radius-topleft: 4px; -moz-box-shadow: none; -moz-border-radius-topright: 0px; -moz-border-radius-topleft: 0px; /* webkit specific markup */ - //-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - //-webkit-border-top-right-radius: 4px; - //-webkit-border-top-left-radius: 4px; -webkit-box-shadow: none; -webkit-border-top-right-radius: 0px; -webkit-border-top-left-radius: 0px; @@ -636,35 +640,17 @@ table.memberdecls { .memdoc, dl.reflist dd { border: none; - //border-bottom: 1px solid #A8B8D9; - //border-left: 1px solid #A8B8D9; - //border-right: 1px solid #A8B8D9; font-weight: normal; - padding: 6px; - background-color: #FBFCFD; - border-top-width: 0; - //background-image:url('nav_g.png'); - background-image: none; - //background-repeat:repeat-x; + padding: 6px; + padding-left: 24px; + background-image: none; background-color: #FFFFFF; - /* opera specific markup */ - //border-bottom-left-radius: 4px; - //border-bottom-right-radius: 4px; - //box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; box-shadow: none; /* firefox specific markup */ - //-moz-border-radius-bottomleft: 4px; - //-moz-border-radius-bottomright: 4px; - //-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-bottomleft: 0px; -moz-border-radius-bottomright: 0px; -moz-box-shadow: none; /* webkit specific markup */ - //-webkit-border-bottom-left-radius: 4px; - //-webkit-border-bottom-right-radius: 4px; - //-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-bottom-left-radius: 0px; -webkit-border-bottom-right-radius: 0px; -webkit-box-shadow: none; diff --git a/include/ozo/detail/strong_typedef.h b/include/ozo/detail/strong_typedef.h index ce06ac720..90f318695 100644 --- a/include/ozo/detail/strong_typedef.h +++ b/include/ozo/detail/strong_typedef.h @@ -59,7 +59,7 @@ constexpr auto StrongTypedef = is_strong_typedef>::value; /** * @brief Strong typedef - * @ingroup group-type_system + * @ingroup group-core-types * * C++ `typedef` creates only an alias to a base type, so the both types are the same. * To get a really new type it is necessary to make some boilerplate code. diff --git a/include/ozo/error.h b/include/ozo/error.h index b02d14bca..a43862ca0 100644 --- a/include/ozo/error.h +++ b/include/ozo/error.h @@ -4,13 +4,13 @@ #include /** - * @defgroup error-codes Error codes + * @defgroup group-errors Errors system * @brief Errors system and codes description */ namespace ozo { /** - * @ingroup error-codes + * @ingroup group-errors * @brief Error code representation of the library. * * In this library the @@ -32,36 +32,36 @@ using error_condition = boost::system::error_condition; using error_code = boost::system::error_code; /** - * @ingroup error-codes + * @ingroup group-errors * @brief Error code contaning exception of the library. * @sa error_code , error_category, error_condition */ using system_error = boost::system::system_error; /** - * @ingroup error-codes + * @ingroup group-errors * @brief Error category representation of the library. * @sa error_code, system_error, error_condition */ using error_category = boost::system::error_category; /** - * @ingroup error-codes + * @ingroup group-errors * @brief Error condition representation of the library. * @sa error_code, system_error, error_category */ using error_condition = boost::system::error_condition; /** - * @defgroup error-codes-errors error + * @defgroup group-errors-errors error * @brief OZO related errors * - * @ingroup error-codes + * @ingroup group-errors */ namespace error { /** * @brief OZO related error codes * - * @ingroup error-codes-errors + * @ingroup group-errors-errors * * Enumeration of error codes provided by the OZO library. Mainly it contains errors related * to underlying libpq functions errors, data reflection and so on. In most cases the additional context @@ -89,7 +89,7 @@ enum code { /** * @brief OZO related errors category - * @ingroup error-codes-errors + * @ingroup group-errors-errors * * OZO related errors category object is used to construct error_code. * @@ -100,17 +100,17 @@ const error_category& category() noexcept; } // namespace error /** - * @defgroup error-codes-sqlstate sqlstate + * @defgroup group-errors-sqlstate sqlstate * @brief SQL state related errors and conditions * - * @ingroup error-codes + * @ingroup group-errors */ namespace sqlstate { /** * @brief SQL state error conditions * -* @ingroup error-codes-sqlstate +* @ingroup group-errors-sqlstate * * This is a set of error conditions. It may not be complete, since new versions * of PostgreSQL may add another sql state codes and users may create new ones inside diff --git a/include/ozo/ozo.h b/include/ozo/ozo.h index 77056103a..3bfa85667 100644 --- a/include/ozo/ozo.h +++ b/include/ozo/ozo.h @@ -6,19 +6,19 @@ */ /** - * @defgroup group-core-functions Utility functions + * @defgroup group-core-functions Functions * @ingroup group-core * @brief Core utility functions of the library. */ /** - * @defgroup group-core-types Utility types + * @defgroup group-core-types Types * @ingroup group-core * @brief Core utility types of the library. */ /** - * @defgroup group-requests Requests + * @defgroup group-requests Database requests * @brief Database requests related concepts, types and functions. */ diff --git a/include/ozo/time_traits.h b/include/ozo/time_traits.h index d1fe52a36..0473fb403 100644 --- a/include/ozo/time_traits.h +++ b/include/ozo/time_traits.h @@ -2,18 +2,11 @@ #include -/** - * @defgroup group-core-time Time - * @ingroup group-core - * @brief Database related type system of the library. - */ namespace ozo { /** * @brief Time traits of the library - * - * The structure containts time related types traits. - * @ingroup group-core-time + * @ingroup group-core-types */ struct time_traits { using duration = std::chrono::steady_clock::duration; //!< Time duration type of the library diff --git a/include/ozo/type_traits.h b/include/ozo/type_traits.h index ddc76d4c5..a77b008d1 100644 --- a/include/ozo/type_traits.h +++ b/include/ozo/type_traits.h @@ -34,9 +34,38 @@ /** * @defgroup group-type_system Type system - * @ingroup group-core * @brief Database-related type system of the library. */ + +/** + * @defgroup group-type_system-types Types + * @ingroup group-type_system + * @brief Database-related type system types. + */ + +/** + * @defgroup group-type_system-concepts Concepts + * @ingroup group-type_system + * @brief Database-related type system concepts. + */ + +/** + * @defgroup group-type_system-constants Constants + * @ingroup group-type_system + * @brief Database-related type system constants. + */ + +/** + * @defgroup group-type_system-functions Functions + * @ingroup group-type_system + * @brief Database-related type system functions. + */ + +/** + * @defgroup group-type_system-mapping Mapping + * @ingroup group-type_system + * @brief Types mapping C++ to PostgreSQL + */ namespace ozo { namespace hana = boost::hana; @@ -45,27 +74,27 @@ using namespace hana::literals; namespace fusion = boost::fusion; /** * @brief PostgreSQL OID type - object identifier - * @ingroup group-type_system + * @ingroup group-type_system-types */ using oid_t = ::Oid; /** * @brief Type for OID constant type definition. - * @ingroup group-type_system - * @tparam `Oid` --- OID value + * @ingroup group-type_system-types + * @tparam Oid --- OID value */ template struct oid_constant : std::integral_constant {}; /** * @brief Type for non initialized OID - * @ingroup group-type_system + * @ingroup group-type_system-types */ using null_oid_t = oid_constant<0>; /** * @brief Constant for empty OID - * @ingroup group-type_system + * @ingroup group-type_system-constants */ constexpr null_oid_t null_oid; @@ -276,7 +305,7 @@ inline void reset_nullable(T& n) { /** * @brief Type traits template forward declaration. - * @ingroup group-type_system + * @ingroup group-type_system-types * * Type traits contains information * related to it's representation in the database. There are two different @@ -315,7 +344,7 @@ template struct type_size_match : std::true_type {}; /** * @brief Helper for the type traits definitions. - * @ingroup group-type_system + * @ingroup group-type_system-types * * @tparam Name --- type which can be converted into a string representation * which contain the fully qualified type name in DB @@ -339,8 +368,8 @@ struct type_traits : type_traits_helper {}; /** * @brief Condition indicates if the specified type is built-in for PG - * @ingroup group-type_system - * @tparam T -- type to check + * @ingroup group-type_system-types + * @tparam T --- type to check */ template struct is_built_in : std::bool_constant< @@ -350,8 +379,10 @@ template using is_dynamic_size = std::is_same::size, dynamic_size>; /** -* Function returns type name in Postgre SQL. For custom types user must -* define this name. +* @brief Function returns type name in Postgre SQL. +* @tparam T --- type +* @return `boost::hana::string` --- name of the type +* @ingroup group-type_system-functions */ template constexpr auto type_name() noexcept { @@ -362,6 +393,12 @@ constexpr auto type_name() noexcept { return retval; } +/** +* @brief Function returns type name in Postgre SQL. +* @param T --- type +* @return `boost::hana::string` --- name of the type +* @ingroup group-type_system-functions +*/ template constexpr auto type_name(const T&) noexcept {return type_name();} @@ -435,7 +472,7 @@ OZO_STRONG_TYPEDEF(std::vector, bytea) /** * @brief Helper macro to define type mapping - * @ingroup group-type_system + * @ingroup group-type_system-mapping * In general type mapping is provided via `ozo::type_traits` specialization. * But for a single type you need to define a type, an array of the type, an * optional of the type (to support null), shared_ptr... and many other boilerplate. @@ -494,6 +531,10 @@ OZO_PG_DEFINE_TYPE_AND_ARRAY(smtp::message, "code.message", null_oid, null_oid, >{};\ } +/** + * @brief Bool type mapping + * @ingroup group-type_system-mapping + */ OZO_PG_DEFINE_TYPE_AND_ARRAY(bool, "bool", BOOLOID, 1000, bytes<1>) OZO_PG_DEFINE_TYPE_AND_ARRAY(char, "char", CHAROID, 1002, bytes<1>) OZO_PG_DEFINE_TYPE_AND_ARRAY(ozo::pg::bytea, "bytea", BYTEAOID, 1001, dynamic_size) @@ -517,7 +558,7 @@ namespace ozo { /** * @brief OidMap implementation type. - * @ingroup group-type_system + * @ingroup group-type_system-types * * This type implements OidMap concept based on `boost::hana::map`. */ @@ -538,7 +579,7 @@ struct is_oid_map> : std::true_type {}; /** * @brief Map of C++ types to corresponding PostgreSQL types OIDs * - * @ingroup group-type_system + * @ingroup group-type_system-concepts * `OidMap` is needed to store information about C++ types and corresponding * custom database types' OIDs. For PostgreSQL built-in types no mapping is needed since their * `OID`s are defined in PostgreSQL sources. For custom types their `OID`s are defined @@ -585,7 +626,7 @@ constexpr decltype(auto) register_types() noexcept { /** * @brief Provides #OidMap implementation for user-defined types. * - * @ingroup group-type_system + * @ingroup group-type_system-functions * This function have to be used to provide information about custom types are being used * within requests for a #ConnectionSource. * @@ -615,13 +656,13 @@ constexpr decltype(auto) register_types() noexcept { /** * @brief Type alias for empty #OidMap - * @ingroup group-type_system + * @ingroup group-type_system-types */ using empty_oid_map = std::decay_t())>; /** * Function sets oid for type in #OidMap. -* @ingroup group-type_system +* @ingroup group-type_system-functions * @tparam T --- type to set oid for. * @param map --- #OidMap to modify. * @param oid --- OID to set. @@ -633,11 +674,16 @@ inline void set_type_oid(oid_map_t& map, oid_t oid) noexcept { } /** -* Function returns oid for type from #OidMap. -* @ingroup group-type_system +* @brief Function returns oid for type from #OidMap. +* @ingroup group-type_system-functions * @tparam T --- type to get OID for. * @param map --- #OidMap to get OID from. +* @return oid_t --- OID of the type */ +#ifdef OZO_DOCUMENTATION +template +oid_t type_oid(const OidMap& map) noexcept; +#else template inline auto type_oid(const oid_map_t& map) noexcept -> std::enable_if_t::value, oid_t> { @@ -649,16 +695,29 @@ constexpr auto type_oid(const oid_map_t&) noexcept -> std::enable_if_t::value, oid_t> { return typename type_traits::oid(); } +#endif +/** +* @brief Function returns oid for type from #OidMap. +* @ingroup group-type_system-functions +* @param map --- #OidMap to get OID from. +* @param v --- object for which type's OID will return. +* @return oid_t --- OID of the type +*/ +#ifdef OZO_DOCUMENTATION +template +oid_t type_oid(const OidMap& map, const T& v) noexcept +#else template inline auto type_oid(const oid_map_t& map, const T&) noexcept{ return type_oid>(map); } +#endif /** * Function returns true if type can be obtained from DB response with * specified OID. -* @ingroup group-type_system +* @ingroup group-type_system-functions * @tparam T --- type to examine * @param map --- #OidMap to get type OID from * @param oid --- OID to check for compatibility @@ -671,7 +730,7 @@ inline bool accepts_oid(const oid_map_t& map, oid_t oid) noexcept { /** * Function returns true if type can be obtained from DB response with * specified OID. -* @ingroup group-type_system +* @ingroup group-type_system-functions * @param map --- #OidMap to get type OID from * @param const T& --- type to examine * @param oid --- OID to check for compatibility @@ -683,7 +742,7 @@ inline bool accepts_oid(const oid_map_t& map, const T& , oid_t oid) no /** * Checks if #OidMap contains no items. - * @ingroup group-type_system + * @ingroup group-type_system-functions * * ### Example *