├── .gitignore ├── test.cpp ├── README.md ├── LICENSE ├── src ├── date.h └── date.cpp └── Doxyfile /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | *.smod 19 | 20 | # Compiled Static libraries 21 | *.lai 22 | *.la 23 | *.a 24 | *.lib 25 | 26 | # Executables 27 | *.exe 28 | *.out 29 | *.app 30 | -------------------------------------------------------------------------------- /test.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * test.cpp 3 | * 4 | * Created on: 2016年10月9日 5 | * Author: havesnag 6 | */ 7 | 8 | #include 9 | using namespace std; 10 | 11 | #include "src/date.h" 12 | using namespace ec; 13 | 14 | int main(int argc, char *argv[]) 15 | { 16 | Date d(2000, 1, 1); 17 | cout << "d = " << d.format() << endl; 18 | 19 | Time t = d.toTime().addHour(1); 20 | cout << "t = " << t.toDate().format() << endl; 21 | 22 | return 0; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # overview 2 | a c++ date class 3 | 4 | the namespace is ec 5 | 6 | ``` 7 | using namespace ec; 8 | ``` 9 | 10 | 11 | include three class 12 | 13 | - Duration: a period of time 14 | - Date: convenient for date of operation 15 | - Time: the precise time 16 | 17 | [The API Documentation](http://www.baiyy.com/public/project/ecdate/index.html) 18 | 19 | [The Porject Home Page](http://www.baiyy.com/portal/page/index/id/23) 20 | 21 | # detail 22 | Please directly add the source code to your project 23 | 24 | The source code in the "src" directory. 25 | 26 | example: 27 | 28 | --- 29 | 30 | ``` 31 | #include 32 | #include "date.h" 33 | 34 | int main(int argc, char *argv[]) 35 | { 36 | // The current time 37 | ec::Time now; 38 | 39 | // 10 hours 40 | ec::Duration d(10, ec::Duration::Hour); 41 | 42 | // After 10 hours 43 | now += d; 44 | 45 | // output like 2016-01-01 12:00:00 46 | std::cout << now.toString() << std::endl; 47 | return 0; 48 | } 49 | ``` 50 | ## Duration 51 | 52 | ``` 53 | // 10 days 54 | ec::Duration d0(10, ec::Duration::Day); 55 | 56 | // 240 hours 57 | ec::Duration d1 = d0.down(); 58 | 59 | // 864000 seconds 60 | int64 seconds = d0.valueAs(ec::Duration::Second); 61 | 62 | ``` 63 | 64 | ## Date 65 | 66 | ``` 67 | // 2016-01-01 00:00:00 68 | ec::Date d0(2016, 1, 1, 0, 0, 0); 69 | 70 | // 2016-01-02 00:00:00 71 | d0.add(ec::Duration(1, ec::Duration::Hour); 72 | 73 | // 2015-01-02 00:00:00 74 | d0.setYear(2015); 75 | ``` 76 | 77 | ## Time 78 | 79 | ``` 80 | // The current time 81 | ec::Time t0; 82 | 83 | // 2016-01-01 00:00:00 84 | ec::Time t1(ec::Date(2016, 1, 1)); 85 | 86 | // seconds 87 | int64 seconds = t1.diff(t0, ec::Duration::Second); 88 | ``` 89 | 90 | # 中文简介 91 | 这是C++简单对时间操作的封装,命名空间为ec 92 | 93 | 包含三个类: 94 | Duration: 时间段 95 | Date: 日期类 96 | Time: 时间类 97 | 98 | 由于代码比较简单,没有提供编辑成链接库的makefile,请直接将源代码(src目录 )加入你的工程。 99 | 100 | 101 | [完整API参考文档](http://www.baiyy.com/public/project/ecdate/index.html) 102 | 103 | [项目主页地址](http://www.baiyy.com/portal/page/index/id/23) 104 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /src/date.h: -------------------------------------------------------------------------------- 1 | /* 2 | * date.h 3 | * 4 | * Created on: 2016年6月7日 5 | * Author: havesnag 6 | */ 7 | 8 | #ifndef INCLUDE_EC_DATE_H_ 9 | #define INCLUDE_EC_DATE_H_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #if (defined _WIN32) || (defined WIN32) || (defined _WIN64) || (defined WIN64) 16 | #define PLATFORM_WINDOWS 17 | #endif 18 | 19 | #ifdef PLATFORM_WINDOWS 20 | #include 21 | #else 22 | #include 23 | #endif // PLATFORM_WINDOWS 24 | 25 | typedef int64_t int64; 26 | 27 | namespace ec 28 | { 29 | 30 | class Time; 31 | class Date; 32 | class Duration; 33 | 34 | /** 35 | * @brief 表示时间段 36 | */ 37 | class Duration 38 | { 39 | public: 40 | /** @brief 时间类型,级别依次上升,精度依次下降 */ 41 | enum Period 42 | { 43 | /** @brief 微秒 1/1000000秒 */ 44 | MicroSecond = 5, 45 | /** @brief 毫秒 1/1000秒 */ 46 | MilliSecond = 6, 47 | /** @brief 秒 */ 48 | Second = 11, 49 | /** @brief 分 60秒 */ 50 | Minute = 12, 51 | /** @brief 小时 3600秒 */ 52 | Hour = 13, 53 | /** @brief 天 86400秒 */ 54 | Day = 14, 55 | /** @brief 周 604800秒 */ 56 | Week = 15, 57 | /** @brief 月 周与月相互转换比例为1:4 */ 58 | Month = 22, 59 | /** @brief 年 */ 60 | Year = 23, 61 | }; 62 | 63 | Duration(int64 value = 1, Period period = Second); 64 | Duration(const Duration &duration); 65 | ~Duration(); 66 | 67 | /** @brief 克隆当前对象 */ 68 | Duration clone() const; 69 | 70 | /** @brief 获取数值 */ 71 | inline int64 value() const 72 | { 73 | return _value; 74 | } 75 | 76 | /** @brief 获取周期 */ 77 | inline Period period() const 78 | { 79 | return _period; 80 | } 81 | 82 | /** @brief 设置时间段的数值和周期 */ 83 | Duration & set(int64 value, Period period = Second); 84 | /** @brief 设置时间段的数值 */ 85 | Duration & setValue(int64 value); 86 | /** @brief 设置时间段的周期 */ 87 | Duration & setPeriod(Period period); 88 | 89 | /** @brief 提升级别,降低精度,这种转换方式并不是准确的,周与月转换时换1:4换算 */ 90 | Duration & rase(); 91 | /** @brief 降低级别,提升精度,这种转换方式并不是准确的,周与月转换时换1:4换算 */ 92 | Duration & down(); 93 | /** @brief 转换成指定类型的时间段 */ 94 | Duration & as(Period period); 95 | /** @brief 获取值转换成某种类型后的值 */ 96 | int64 valueAs(Period period) const; 97 | 98 | Duration operator + (const Duration &other); 99 | Duration operator + (int64 value); 100 | Duration operator - (const Duration &other); 101 | Duration operator - (int64 value); 102 | Duration & operator += (const Duration &other); 103 | Duration & operator += (int64 value); 104 | Duration & operator -= (const Duration &other); 105 | Duration & operator -= (int64 value); 106 | bool operator > (const Duration & other); 107 | bool operator >= (const Duration & other); 108 | bool operator == (const Duration & other); 109 | bool operator != (const Duration & other); 110 | bool operator < (const Duration & other); 111 | bool operator <= (const Duration & other); 112 | private: 113 | int64 _value; 114 | Period _period; 115 | }; 116 | 117 | /** 118 | * @brief 日期类 119 | * @details 精确到秒,Windows下仅能表示1970-01-01 00:00:00之前的日期,Linux不受此限制。 120 | */ 121 | class Date 122 | { 123 | public: 124 | /** @brief 返回当前系统时区,比如UTC+8的时区为8 */ 125 | static int localTimeZone(); 126 | /** @brief 返回当前系统时区偏移,以秒为单位,比如UTC+8的时区为-28800 */ 127 | static time_t localTimeZoneOffset(); 128 | /** @brief 判断是否是闰年 */ 129 | static bool isLeapYear(int year); 130 | /** @brief 某年某月一共有多少天 */ 131 | static int yearMonthDays(int year, int month); 132 | 133 | public: 134 | /** @brief 以当前时间构造 */ 135 | Date(); 136 | /** 137 | * @brief 以时间戳(秒)构造 138 | * @param stamp 时间戳 139 | * @param utc 是否为UTC基准时间,为false则按本地日历时间构造 140 | */ 141 | Date(time_t stamp, bool utc = false); 142 | /** @brief 以Time对象构造 */ 143 | Date(const Time &time); 144 | /** @brief 以Date对象复制 */ 145 | Date(const Date &other); 146 | 147 | /** 148 | * @brief 以指定时间构造 149 | * @note Windows下最小为1970-01-01 00:00:00 150 | * @param year 年,取值范围[1970, ) 151 | * @param month 月,取值范围[1,12] 152 | * @param day 日,取值范围[1,31] 153 | * @param hour 时,取值范围[0,23],默认为0 154 | * @param minute 分,取值范围[0,59],默认为0 155 | * @param second 秒,取值范围[0,60],默认为0 156 | */ 157 | Date(int year, int month, int day, int hour = 0, int minute = 0, int second = 0); 158 | 159 | ~Date(); 160 | 161 | /** @brief 克隆当前对象 */ 162 | Date clone() const; 163 | /** @brief 转换为UTC时间 */ 164 | Date toUTC() const; 165 | 166 | /** @brief 转换为Time对象 */ 167 | Time toTime() const; 168 | /** @brief 转换为字符串,格式为1970-01-01 00:00:00 */ 169 | std::string toString() const; 170 | 171 | /** 172 | * @brief 格式化为字符串 173 | * @param fmt 格式 174 | * @details 175 | * %Y 用CCYY表示的年(如:2004) 176 | * %m 月份 (01-12) 177 | * %d 月中的第几天(01-31) 178 | * %H 小时, 24小时格式 (00-23) 179 | * %M 分钟(00-59) 180 | * %S 秒钟(00-59) 181 | * %X标准时间字符串(如:23:01:59) 182 | * %% 百分号 183 | * 184 | * @return 如果发生错误返回空字符串 185 | */ 186 | std::string format(const char * fmt = "%Y-%m-%d %H:%M:%S") const; 187 | 188 | /** @brief 年,[1970, ) */ 189 | inline int year() const 190 | { 191 | return _tm.tm_year + 1900; 192 | } 193 | 194 | /** @brief 月,[1,12] */ 195 | inline int month() const 196 | { 197 | return _tm.tm_mon + 1; 198 | } 199 | 200 | /** @brief 日,[1,31] */ 201 | inline int day() const 202 | { 203 | return _tm.tm_mday; 204 | } 205 | 206 | /** @brief 时,[0,23] */ 207 | inline int hour() const 208 | { 209 | return _tm.tm_hour; 210 | } 211 | 212 | /** @brief 分,[0,59] */ 213 | inline int minute() const 214 | { 215 | return _tm.tm_min; 216 | } 217 | 218 | /** @brief 秒,[0,60] */ 219 | inline int second() const 220 | { 221 | return _tm.tm_sec; 222 | } 223 | 224 | /** @brief 星期,[1,7] */ 225 | inline int week() const 226 | { 227 | return (_tm.tm_wday > 0) ? _tm.tm_wday : 7; 228 | } 229 | 230 | /** @brief 是否是UTC基准时间 */ 231 | inline bool isUTC() const 232 | { 233 | return _isUTC; 234 | } 235 | 236 | /** @brief 转换为时间戳 @note 按本地时间(时区)转换,比如在东8区(UTC+8)时1970-01-01 00:00:00为-28800 */ 237 | time_t stamp() const; 238 | /** @brief 转换为UTC时间戳 @note 比如1970-01-01 00:00:00为0 */ 239 | time_t utcStamp() const; 240 | /** @brief 时区,比如UTC+8的时区为8 */ 241 | int timeZone() const; 242 | /** @brief 时区偏移,以秒为单位,比如UTC+8的时区为-28800 */ 243 | time_t timeZoneOffset() const; 244 | 245 | /** @brief 统一设置年月日时分秒 @note 比单独设置年/月/日/时/分/秒更高效 */ 246 | Date & set(int year, int month, int day, int hour, int minute, int second); 247 | /** @brief 统一设置年月日 @note 比单独设置年/月/日更高效 */ 248 | Date & setDate(int year, int month, int day); 249 | /** @brief 设置年,[1970, ) @note 建议使用setDate统一设置年月日 @see setDate */ 250 | Date & setYear(int year); 251 | /** @brief 设置月,[1,12] @note 建议使用setDate统一设置年月日 @see setDate */ 252 | Date & setMonth(int month); 253 | /** @brief 设置日,[1,31] @note 建议使用setDate统一设置年月日 @see setDate*/ 254 | Date & setDay(int day); 255 | /** @brief 设置时,[0,23] */ 256 | Date & setHour(int hour); 257 | /** @brief 设置分,[0,59] */ 258 | Date & setMinute(int minute); 259 | /** @brief 设置秒,[0,60] */ 260 | Date & setSecond(int second); 261 | 262 | /** 263 | * @brief 设置为某个时间的开始 264 | * @param period 时间类型, 265 | * @details 266 | * 为Year时置零为一年的开始, 267 | * 为Month时置零为一月的开始, 268 | * 为Day时置零为一天的开始, 269 | * 为Hour时置零为一小时的开始, 270 | * 为Minute时置零为一分钟的开始, 271 | * 为Second/MilliSecond/MicroSecond时无效果, 272 | */ 273 | Date & zeroSet(Duration::Period period); 274 | 275 | /** @brief 加/减 一段时间 */ 276 | Date & add(int64 value, Duration::Period period); 277 | /** @brief 加/减 一段时间 */ 278 | Date & add(const Duration & duration); 279 | /** @brief 加/减 年 */ 280 | Date & addYear(int value); 281 | /** @brief 加/减 月 */ 282 | Date & addMonth(int value); 283 | 284 | /** 285 | * @brief 比较两时间之间的差异 286 | * @param period 结果时间类型 287 | * @param other 要比较的对象 288 | * @details 289 | * 为Year表示两者相差年份,不是绝对差值,2015-01-01与2014-12-30相差1年 290 | * 为Month表示两者相差说数,不是绝对差值,2015-01-01与2014-12-30相差1月 291 | * 为Day表示两者相差天数,不是绝对差值,2015-01-01 23:59:59与2015-01-02 00:00:00相差1天 292 | * 为Hour表示两者相差小时数,不是绝对差值,2015-01-01 23:59:59与2015-01-02 00:00:00相差1小时 293 | * 为Minute表示两者相差分钟数,不是绝对差值,2015-01-01 23:59:59与2015-01-02 00:00:00相差1分钟 294 | * 为Second表示两者相差秒数 295 | * 为MilliSecond表示两者相差毫秒数,Date的精度为秒,所以只是将相差秒数*1000 296 | * 为MicroSecond表示两者相差微秒数,Date的精度为秒,所以只是将相差秒数*1000000 297 | * @return 返回this - other的相应差值 298 | */ 299 | int64 diff(const Date & other, Duration::Period period = Duration::Second); 300 | 301 | /** @brief 获取一年中的天,[1,366] */ 302 | int getYearDay() const; 303 | /** @brief 距离1970-01-01 00:00:00的月数 */ 304 | int getUTCFullMonths() const; 305 | /** @brief 距离1970-01-01 00:00:00的年数 */ 306 | int getUTCFullYears() const; 307 | 308 | /** @brief 是否是闰年 */ 309 | bool isLeapYear() const; 310 | /** @brief 是否是一月的最后一天 */ 311 | bool isLastDayOfMonth() const; 312 | 313 | Date operator + (const Duration & duration); 314 | Date operator - (const Duration & duration); 315 | Duration operator - (const Date & other); 316 | Date & operator += (const Duration & duration); 317 | Date & operator -= (const Duration & duration); 318 | bool operator < (const Date & other); 319 | bool operator == (const Date & other); 320 | 321 | protected: 322 | void _set(time_t stamp); 323 | void _update(); 324 | 325 | private: 326 | struct tm _tm; 327 | bool _isUTC; 328 | }; 329 | 330 | /** 331 | * @brief 时间类 332 | * @details 精确到微秒,可与Date相互转换,转换为Date将损失精度到秒 333 | * @see Date 334 | */ 335 | class Time 336 | { 337 | public: 338 | Time(); 339 | /** @brief 以时间戳构造 */ 340 | Time(time_t stamp); 341 | /** @brief 以Date对象构造 */ 342 | Time(const Date &date); 343 | /** @brief 以Time对象复制 */ 344 | Time(const Time &time); 345 | ~Time(); 346 | 347 | /** @brief 克隆当前对象 */ 348 | Time clone() const; 349 | 350 | /** @brief 转换成本地日历时间的Date对象 */ 351 | Date toDate() const; 352 | /** @brief 转换成UTC基准时间的Date对象 */ 353 | Date utcDate() const; 354 | 355 | /** @brief 获取秒数,等同于时间戳 */ 356 | inline time_t seconds() const 357 | { 358 | return _tv.tv_sec; 359 | } 360 | 361 | /** @brief 获取微秒数, [0,1000000) @details 微秒部分小于一秒 */ 362 | inline long microSeconds() const 363 | { 364 | return _tv.tv_sec; 365 | } 366 | 367 | /** @brief 获取毫秒时间戳 */ 368 | inline int64 milliStamp() const 369 | { 370 | return _tv.tv_sec * 1000 + _tv.tv_usec / 1000; 371 | } 372 | 373 | /** @brief 获取微秒时间戳 */ 374 | inline int64 microStamp() const 375 | { 376 | return _tv.tv_sec * 1000000 + _tv.tv_usec; 377 | } 378 | 379 | /** @brief 获取时间戳 */ 380 | inline time_t stamp() const 381 | { 382 | return _tv.tv_sec; 383 | } 384 | 385 | /** @brief 获取UTC时间戳 */ 386 | time_t utcStamp() const; 387 | 388 | /** @brief 设置秒数和微秒数 */ 389 | Time & set(time_t seconds, long microSeconds = 0); 390 | /** @brief 获取微秒数, [0,1000) */ 391 | Time & setSeconds(time_t seconds); 392 | /** @brief 获取微秒数, [0,1000000) */ 393 | Time & setMicroSeconds(long microSeconds); 394 | 395 | /** 396 | * @brief 设置为某个时间的开始 397 | * @param period 时间类型, 398 | * @details 399 | * 为Year时置零为一年的开始, 400 | * 为Month时置零为一月的开始, 401 | * 为Day时置零为一天的开始, 402 | * 为Hour时置零为一小时的开始, 403 | * 为Minute时置零为一分钟的开始, 404 | * 为Second时置零为一秒的开始, 405 | * 为MilliSecond时置零为一毫秒的开始, 406 | * 为MicroSecond时置零为一微秒的开始 407 | */ 408 | Time & zeroSet(Duration::Period period); 409 | 410 | /** @brief 加/减 一段时间 */ 411 | Time & add(int64 value, Duration::Period period = Duration::Period::MilliSecond); 412 | /** @brief 加/减 一段时间 */ 413 | Time & add(const Duration & duration); 414 | /** @brief 加/减 周 */ 415 | Time & addWeek(int value); 416 | /** @brief 加/减 天 */ 417 | Time & addDay(int value); 418 | /** @brief 加/减 时 */ 419 | Time & addHour(int value); 420 | /** @brief 加/减 分 */ 421 | Time & addMinute(int value); 422 | /** @brief 加/减 秒 */ 423 | Time & addSecond(long value); 424 | /** @brief 加/减 毫秒 */ 425 | Time & addMilliSecond(long value); 426 | /** @brief 加/减 微秒 */ 427 | Time & addMicroSecond(long value); 428 | 429 | /** 430 | * @brief 比较两时间之间的差异 431 | * @param period 结果时间类型 432 | * @param other 要比较的对象 433 | * @details 434 | * 为Year表示两者相差年份,不是绝对差值,2015-01-01与2014-12-30相差1年 435 | * 为Month表示两者相差说数,不是绝对差值,2015-01-01与2014-12-30相差1月 436 | * 为Day表示两者相差天数,不是绝对差值,2015-01-01 23:59:59与2015-01-02 00:00:00相差1天 437 | * 为Hour表示两者相差小时数,不是绝对差值,2015-01-01 23:59:59与2015-01-02 00:00:00相差1小时 438 | * 为Minute表示两者相差分钟数,不是绝对差值,2015-01-01 23:59:59与2015-01-02 00:00:00相差1分钟 439 | * 为Second表示两者相差秒数 440 | * 为MilliSecond表示两者相差毫秒数 441 | * 为MicroSecond表示两者相差微秒数 442 | * @return 返回this - other的相应差值 443 | */ 444 | int64 diff(const Time & other, Duration::Period period = Duration::Second); 445 | 446 | /** @brief 距离1970-01-01 00:00:00的微秒数 */ 447 | int64 getUTCFullMicroSeconds() const; 448 | /** @brief 距离1970-01-01 00:00:00的毫秒数 */ 449 | int64 getUTCFullMilliSeconds() const; 450 | /** @brief 距离1970-01-01 00:00:00的秒数 @note 与getUTCStamp()含义相同 @see getUTCStamp */ 451 | time_t getUTCFullSeconds() const; 452 | /** @brief 距离1970-01-01 00:00:00的分钟 */ 453 | int getUTCFullMinutes() const; 454 | /** @brief 距离1970-01-01 00:00:00的小时 */ 455 | int getUTCFullHours() const; 456 | /** @brief 距离1970-01-01 00:00:00的天数 */ 457 | int getUTCFullDays() const; 458 | /** @brief 距离1970-01-01 00:00:00的周数 @note 从0开始,1970-01-01 00:00:00为第0周星期4 */ 459 | int getUTCFullWeeks() const; 460 | 461 | Time operator + (const Duration & duration); 462 | Time operator - (const Duration & duration); 463 | Duration operator - (const Time & other); 464 | Time & operator += (const Duration & duration); 465 | Time & operator -= (const Duration & duration); 466 | bool operator < (const Time & other); 467 | bool operator = (const Time & other); 468 | 469 | private: 470 | struct timeval _tv; 471 | }; 472 | 473 | } /* namespace ec */ 474 | 475 | #endif /* INCLUDE_EC_DATE_H_ */ 476 | -------------------------------------------------------------------------------- /src/date.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * date.cpp 3 | * 4 | * Created on: 2016年6月7日 5 | * Author: havesnag 6 | */ 7 | 8 | #include "date.h" 9 | #include 10 | #include 11 | #include 12 | #include 13 | using namespace std; 14 | 15 | #ifdef PLATFORM_WINDOWS 16 | 17 | #define localtime_r(t, tm) localtime_s(tm, t) 18 | #define gmtime_r(t, tm) gmtime_s(tm, t) 19 | 20 | int gettimeofday(struct timeval *tp, void *tzp) 21 | { 22 | time_t clock; 23 | struct tm tm; 24 | SYSTEMTIME wtm; 25 | GetLocalTime(&wtm); 26 | tm.tm_year = wtm.wYear - 1900; 27 | tm.tm_mon = wtm.wMonth - 1; 28 | tm.tm_mday = wtm.wDay; 29 | tm.tm_hour = wtm.wHour; 30 | tm.tm_min = wtm.wMinute; 31 | tm.tm_sec = wtm.wSecond; 32 | tm.tm_isdst = -1; 33 | clock = mktime(&tm); 34 | tp->tv_sec = static_cast(clock); 35 | tp->tv_usec = wtm.wMilliseconds * 1000; 36 | return (0); 37 | } 38 | #endif // PLATFORM_WINDOWS 39 | 40 | namespace ec 41 | { 42 | 43 | Duration::Duration(int64 value, Period period) 44 | { 45 | _value = value; 46 | _period = period; 47 | } 48 | 49 | Duration::Duration(const Duration &duration) 50 | { 51 | _value = duration._value; 52 | _period = duration._period; 53 | } 54 | 55 | Duration::~Duration() 56 | { 57 | } 58 | 59 | Duration Duration::clone() const 60 | { 61 | return Duration(*this); 62 | } 63 | 64 | Duration & Duration::set(int64 value, Period period) 65 | { 66 | _value = value; 67 | _period = period; 68 | return *this; 69 | } 70 | 71 | Duration & Duration::setValue(int64 value) 72 | { 73 | _value = value; 74 | return *this; 75 | } 76 | 77 | Duration & Duration::setPeriod(Period period) 78 | { 79 | _period = period; 80 | return *this; 81 | } 82 | 83 | Duration & Duration::rase() 84 | { 85 | switch (_period) 86 | { 87 | case Duration::MicroSecond: 88 | _period = Duration::MilliSecond; 89 | _value /= 1000; 90 | break; 91 | case Duration::MilliSecond: 92 | _period = Duration::Second; 93 | _value /= 1000; 94 | break; 95 | case Duration::Second: 96 | _period = Duration::Minute; 97 | _value /= 60; 98 | break; 99 | case Duration::Minute: 100 | _period = Duration::Hour; 101 | _value /= 60; 102 | break; 103 | case Duration::Hour: 104 | _period = Duration::Day; 105 | _value /= 24; 106 | break; 107 | case Duration::Day: 108 | _period = Duration::Week; 109 | _value /= 7; 110 | break; 111 | case Duration::Week: 112 | _period = Duration::Month; 113 | _value /= 4; 114 | break; 115 | case Duration::Month: 116 | _period = Duration::Year; 117 | _value /= 12; 118 | break; 119 | default: 120 | break; 121 | } 122 | return *this; 123 | } 124 | 125 | Duration & Duration::down() 126 | { 127 | switch (_period) 128 | { 129 | case Duration::MilliSecond: 130 | _period = Duration::MicroSecond; 131 | _value *= 1000; 132 | break; 133 | case Duration::Second: 134 | _period = Duration::MilliSecond; 135 | _value *= 1000; 136 | break; 137 | case Duration::Minute: 138 | _period = Duration::Second; 139 | _value *= 60; 140 | break; 141 | case Duration::Hour: 142 | _period = Duration::Minute; 143 | _value *= 60; 144 | break; 145 | case Duration::Day: 146 | _period = Duration::Hour; 147 | _value *= 24; 148 | break; 149 | case Duration::Week: 150 | _period = Duration::Day; 151 | _value *= 7; 152 | break; 153 | case Duration::Month: 154 | _period = Duration::Week; 155 | _value *= 4; 156 | break; 157 | case Duration::Year: 158 | _period = Duration::Month; 159 | _value *= 12; 160 | break; 161 | default: 162 | break; 163 | } 164 | return *this; 165 | } 166 | 167 | Duration & Duration::as(Period period) 168 | { 169 | if (_period < period) 170 | { 171 | for (; _period < period; ) 172 | { 173 | rase(); 174 | } 175 | } 176 | else if (_period > period) 177 | { 178 | for (; _period > period; ) 179 | { 180 | down(); 181 | } 182 | } 183 | return *this; 184 | } 185 | 186 | int64 Duration::valueAs(Period period) const 187 | { 188 | return clone().as(period).value(); 189 | } 190 | 191 | Duration Duration::operator + (const Duration &other) 192 | { 193 | return Duration(_value + other.valueAs(_period), _period); 194 | } 195 | 196 | Duration Duration::operator + (int64 value) 197 | { 198 | return Duration(_value + value, _period); 199 | } 200 | 201 | Duration Duration::operator - (const Duration &other) 202 | { 203 | return Duration(_value - other.valueAs(_period), _period); 204 | } 205 | 206 | Duration Duration::operator - (int64 value) 207 | { 208 | return Duration(_value - value, _period); 209 | } 210 | 211 | Duration & Duration::operator += (const Duration &other) 212 | { 213 | _value += other.valueAs(_period); 214 | return *this; 215 | } 216 | 217 | Duration & Duration::operator += (int64 value) 218 | { 219 | _value += value; 220 | return *this; 221 | } 222 | 223 | Duration & Duration::operator -= (const Duration &other) 224 | { 225 | _value -= other.valueAs(_period); 226 | return *this; 227 | } 228 | 229 | Duration & Duration::operator -= (int64 value) 230 | { 231 | _value -= value; 232 | return *this; 233 | } 234 | 235 | bool Duration::operator > (const Duration & other) 236 | { 237 | return (_period == other._period) ? (_value > other._value) : (_period > other._period); 238 | } 239 | 240 | bool Duration::operator >= (const Duration & other) 241 | { 242 | return (_period == other._period) ? (_value >= other._value) : (_period > other._period); 243 | } 244 | 245 | bool Duration::operator == (const Duration & other) 246 | { 247 | return (_period == other._period) && (_value == other._value); 248 | } 249 | 250 | bool Duration::operator != (const Duration & other) 251 | { 252 | return (_period != other._period) && (_value != other._value); 253 | } 254 | 255 | bool Duration::operator < (const Duration & other) 256 | { 257 | return (_period == other._period) ? (_value < other._value) : (_period < other._period); 258 | } 259 | 260 | bool Duration::operator <= (const Duration & other) 261 | { 262 | return (_period == other._period) ? (_value <= other._value) : (_period < other._period); 263 | } 264 | 265 | 266 | 267 | time_t Date::localTimeZoneOffset() 268 | { 269 | return localTimeZone() * -3600; 270 | } 271 | 272 | int Date::localTimeZone() 273 | { 274 | static int tz = Date(0).hour(); 275 | return tz; 276 | } 277 | 278 | bool Date::isLeapYear(int year) 279 | { 280 | return (year % 4 == 0 && ((year % 400 == 0) || (year % 100 != 0))); 281 | } 282 | 283 | int Date::yearMonthDays(int year, int month) 284 | { 285 | switch (month) 286 | { 287 | case 1: 288 | case 3: 289 | case 5: 290 | case 7: 291 | case 8: 292 | case 10: 293 | case 12: 294 | return 31; 295 | case 4: 296 | case 6: 297 | case 9: 298 | case 11: 299 | return 30; 300 | case 2: 301 | //Need to consider a leap year in February 302 | return isLeapYear(year) ? 29 : 28; 303 | default: 304 | return 0; 305 | } 306 | } 307 | 308 | Date::Date() 309 | { 310 | _isUTC = false; 311 | _set(time(NULL)); 312 | } 313 | 314 | Date::Date(time_t stamp, bool utc) 315 | { 316 | _isUTC = utc; 317 | _set(stamp); 318 | } 319 | 320 | Date::Date(const Time &time) 321 | { 322 | _isUTC = false; 323 | _set(time.stamp()); 324 | } 325 | 326 | Date::Date(const Date &other) 327 | { 328 | _isUTC = other._isUTC; 329 | _tm = other._tm; 330 | } 331 | 332 | Date::Date(int year, int month, int day, int hour, int minute, int second) 333 | { 334 | _isUTC = false; 335 | _set(time(NULL)); 336 | 337 | _tm.tm_year = year - 1900; 338 | _tm.tm_mon = month - 1; 339 | _tm.tm_mday = day; 340 | _tm.tm_hour = hour; 341 | _tm.tm_min = minute; 342 | _tm.tm_sec = second; 343 | 344 | _update(); 345 | } 346 | 347 | Date::~Date() 348 | { 349 | } 350 | 351 | Date Date::clone() const 352 | { 353 | return Date(*this); 354 | } 355 | 356 | Date Date::toUTC() const 357 | { 358 | return Date(stamp(), true); 359 | } 360 | 361 | Time Date::toTime() const 362 | { 363 | return Time(*this); 364 | } 365 | 366 | std::string Date::toString() const 367 | { 368 | std::ostringstream oss; 369 | oss << setfill('0') << setw(4) << year() 370 | << "-" << setw(2) << month() 371 | << "-" << setw(2) << day() 372 | << " " << setw(2) << hour() 373 | << ":" << setw(2) << minute() 374 | << ":" << setw(2) << second(); 375 | return oss.str(); 376 | } 377 | 378 | std::string Date::format(const char * fmt) const 379 | { 380 | char buf[256] = {0}; 381 | if (0 == strftime(buf, 63, fmt, &_tm)) { 382 | buf[0] = '\0'; 383 | } 384 | return std::string(buf); 385 | } 386 | 387 | time_t Date::stamp() const 388 | { 389 | #ifdef PLATFORM_WINDOWS 390 | if (_tm.tm_year > 70) // > 1970 391 | { 392 | return mktime(const_cast(&_tm)); 393 | } 394 | else if (70 == _tm.tm_year) 395 | { 396 | return (0 != _tm.tm_mon) ? 397 | mktime(const_cast(&_tm)) : 398 | (_tm.tm_mday - 1) * 86400 + _tm.tm_hour * 3600 + _tm.tm_min * 60 + _tm.tm_sec + Date::localTimeZoneOffset(); 399 | } 400 | else 401 | { 402 | return Date::localTimeZoneOffset(); 403 | } 404 | #else 405 | return mktime(const_cast(&_tm)); 406 | #endif // PLATFORM_WINDOWS 407 | } 408 | 409 | time_t Date::utcStamp() const 410 | { 411 | return stamp() - Date::localTimeZoneOffset(); 412 | } 413 | 414 | int Date::timeZone() const 415 | { 416 | #ifdef PLATFORM_WINDOWS 417 | return _isUTC ? 0 : Date::localTimeZone(); 418 | #else 419 | # if defined(__USE_BSD) || defined(__USE_MISC) 420 | return static_cast(_tm.tm_gmtoff / 3600); 421 | # else 422 | return static_cast(_tm.__tm_gmtoff / 3600); 423 | # endif//__USE_BSD __USE_MISC 424 | #endif // PLATFORM_WINDOWS 425 | } 426 | 427 | time_t Date::timeZoneOffset() const 428 | { 429 | return static_cast(-3600 * timeZone()); 430 | } 431 | 432 | Date & Date::set(int year, int month, int day, int hour, int minute, int second) 433 | { 434 | _tm.tm_year = year - 1900; 435 | 436 | month = (month - 1) % 12; 437 | _tm.tm_mon = (month > 0) ? month : 0; 438 | 439 | day = day % 32; 440 | _tm.tm_mon = (day > 1) ? day : 1; 441 | 442 | _update(); 443 | 444 | hour = hour % 24; 445 | _tm.tm_hour = (hour > 0) ? hour : 0; 446 | 447 | minute = minute % 60; 448 | _tm.tm_min = (minute > 0) ? minute : 0; 449 | 450 | second = second % 60; 451 | _tm.tm_sec = (second > 0) ? second : 0; 452 | 453 | 454 | return *this; 455 | } 456 | 457 | Date & Date::setDate(int year, int month, int day) 458 | { 459 | _tm.tm_year = year - 1900; 460 | 461 | month = (month - 1) % 12; 462 | _tm.tm_mon = (month > 0) ? month : 0; 463 | 464 | day = day % 32; 465 | _tm.tm_mon = (day > 1) ? day : 1; 466 | 467 | _update(); 468 | return *this; 469 | } 470 | 471 | Date & Date::setYear(int year) 472 | { 473 | _tm.tm_year = year - 1900; 474 | _update(); 475 | return *this; 476 | } 477 | 478 | Date & Date::setMonth(int month) 479 | { 480 | month = (month - 1) % 12; 481 | _tm.tm_mon = (month > 0) ? month : 0; 482 | _update(); 483 | return *this; 484 | } 485 | 486 | Date & Date::setDay(int day) 487 | { 488 | day = day % 32; 489 | _tm.tm_mday = (day > 1) ? day : 1; 490 | _update(); 491 | return *this; 492 | } 493 | 494 | Date & Date::setHour(int hour) 495 | { 496 | hour = hour%24; 497 | _tm.tm_hour = (hour > 0) ? hour : 0; 498 | return *this; 499 | } 500 | 501 | Date & Date::setMinute(int minute) 502 | { 503 | minute = minute%60; 504 | _tm.tm_min = (minute > 0) ? minute : 0; 505 | return *this; 506 | } 507 | 508 | Date & Date::setSecond(int second) 509 | { 510 | second = second%60; 511 | _tm.tm_sec = (second > 0) ? second : 0; 512 | return *this; 513 | } 514 | 515 | Date & Date::zeroSet(Duration::Period period) 516 | { 517 | switch (period) 518 | { 519 | case Duration::Minute: 520 | _tm.tm_sec = 0; 521 | break; 522 | case Duration::Hour: 523 | _tm.tm_min = 0; 524 | _tm.tm_sec = 0; 525 | break; 526 | case Duration::Day: 527 | _tm.tm_hour = 0; 528 | _tm.tm_min = 0; 529 | _tm.tm_sec = 0; 530 | break; 531 | case Duration::Week: 532 | _set(toTime().zeroSet(period).stamp()); 533 | break; 534 | case Duration::Month: 535 | _tm.tm_mday = 1; 536 | _tm.tm_hour = 0; 537 | _tm.tm_min = 0; 538 | _tm.tm_sec = 0; 539 | break; 540 | case Duration::Year: 541 | _tm.tm_mon = 0; 542 | _tm.tm_mday = 1; 543 | _tm.tm_hour = 0; 544 | _tm.tm_min = 0; 545 | _tm.tm_sec = 0; 546 | break; 547 | default: 548 | break; 549 | } 550 | 551 | return *this; 552 | } 553 | 554 | Date & Date::add(int64 value, Duration::Period period) 555 | { 556 | switch (period) 557 | { 558 | case Duration::Second: 559 | case Duration::Minute: 560 | case Duration::Hour: 561 | case Duration::Day: 562 | case Duration::Week: 563 | _set(toTime().add(value, period).stamp()); 564 | break; 565 | case Duration::Month: 566 | addMonth(int(value)); 567 | break; 568 | case Duration::Year: 569 | addMonth((int)value); 570 | break; 571 | default: 572 | break; 573 | } 574 | 575 | return *this; 576 | } 577 | 578 | Date & Date::add(const Duration & duration) 579 | { 580 | return add(duration.value(), duration.period()); 581 | } 582 | 583 | Date & Date::addYear(int value) 584 | { 585 | _tm.tm_year += value; 586 | if (_tm.tm_year < 0) 587 | { 588 | _tm.tm_year = 0; 589 | } 590 | 591 | int monthDays = Date::yearMonthDays(year(), month()); 592 | if (_tm.tm_mday > monthDays) 593 | { 594 | _tm.tm_mday = monthDays; 595 | } 596 | 597 | return *this; 598 | } 599 | 600 | Date & Date::addMonth(int value) 601 | { 602 | _tm.tm_mon += value; 603 | _tm.tm_year += _tm.tm_mon / 12; 604 | _tm.tm_mon = _tm.tm_mon % 12; 605 | if (_tm.tm_mon < 0) 606 | { 607 | _tm.tm_year -= 1; 608 | _tm.tm_mon += 12; 609 | } 610 | 611 | int monthDays = Date::yearMonthDays(year(), month()); 612 | if (_tm.tm_mday > monthDays) 613 | { 614 | _tm.tm_mday = monthDays; 615 | } 616 | 617 | return *this; 618 | } 619 | 620 | int64 Date::diff(const Date & other, Duration::Period period) 621 | { 622 | switch (period) 623 | { 624 | case Duration::MicroSecond: 625 | return static_cast((stamp() - other.stamp()) * 1000000); 626 | case Duration::MilliSecond: 627 | return static_cast((stamp() - other.stamp()) * 1000); 628 | case Duration::Second: 629 | return static_cast(stamp() - other.stamp()); 630 | case Duration::Minute: 631 | return static_cast(stamp() / 60 - other.stamp() / 60); 632 | case Duration::Hour: 633 | return static_cast(stamp() / 3600 - other.stamp() / 3600); 634 | case Duration::Day: 635 | case Duration::Week: 636 | return toTime().diff(other.toTime(), period); 637 | case Duration::Month: 638 | return year() * 12 + month() - other.year() * 12 - other.month(); 639 | case Duration::Year: 640 | return year() - other.year(); 641 | default: 642 | return 0; 643 | } 644 | } 645 | 646 | int Date::getYearDay() const 647 | { 648 | return _tm.tm_yday + 1; 649 | } 650 | 651 | int Date::getUTCFullMonths() const 652 | { 653 | return (year() - 1970) * 12 + month() - 1; 654 | } 655 | 656 | int Date::getUTCFullYears() const 657 | { 658 | return year() - 1970; 659 | } 660 | 661 | bool Date::isLeapYear() const 662 | { 663 | return Date::isLeapYear(year()); 664 | } 665 | 666 | bool Date::isLastDayOfMonth() const 667 | { 668 | return day() >= Date::yearMonthDays(year(), month()); 669 | } 670 | 671 | Date Date::operator + (const Duration & duration) 672 | { 673 | return clone().add(duration.value(), duration.period()); 674 | } 675 | 676 | Date Date::operator - (const Duration & duration) 677 | { 678 | return clone().add(-duration.value(), duration.period()); 679 | } 680 | 681 | Duration Date::operator - (const Date & other) 682 | { 683 | return Duration(static_cast(stamp() - other.stamp())); 684 | } 685 | 686 | Date & Date::operator += (const Duration & duration) 687 | { 688 | return add(duration.value(), duration.period()); 689 | } 690 | 691 | Date & Date::operator -= (const Duration & duration) 692 | { 693 | return add(-duration.value(), duration.period()); 694 | } 695 | 696 | bool Date::operator < (const Date & other) 697 | { 698 | if (_tm.tm_year != other._tm.tm_year) 699 | { 700 | return _tm.tm_year < other._tm.tm_year; 701 | } 702 | 703 | if (_tm.tm_mon != other._tm.tm_mon) 704 | { 705 | return _tm.tm_mon < other._tm.tm_mon; 706 | } 707 | 708 | if (_tm.tm_mday != other._tm.tm_mday) 709 | { 710 | return _tm.tm_mday < other._tm.tm_mday; 711 | } 712 | 713 | if (_tm.tm_hour != other._tm.tm_hour) 714 | { 715 | return _tm.tm_hour < other._tm.tm_hour; 716 | } 717 | 718 | if (_tm.tm_min != other._tm.tm_min) 719 | { 720 | return _tm.tm_min < other._tm.tm_min; 721 | } 722 | 723 | return _tm.tm_sec < other._tm.tm_sec; 724 | } 725 | 726 | bool Date::operator == (const Date & other) 727 | { 728 | return (_tm.tm_year == other._tm.tm_year) && 729 | (_tm.tm_mon == other._tm.tm_mon) && 730 | (_tm.tm_mday == other._tm.tm_mday) && 731 | (_tm.tm_hour == other._tm.tm_hour) && 732 | (_tm.tm_min == other._tm.tm_min) && 733 | (_tm.tm_sec == other._tm.tm_sec); 734 | } 735 | 736 | void Date::_set(time_t stamp) 737 | { 738 | #ifdef PLATFORM_WINDOWS 739 | if (stamp >= 0) 740 | { 741 | _isUTC ? gmtime_r(&stamp, &_tm) : localtime_r(&stamp, &_tm); 742 | } 743 | else 744 | { 745 | if (_isUTC) 746 | { 747 | stamp = 0; 748 | gmtime_r(&stamp, &_tm); 749 | } 750 | else 751 | { 752 | time_t zoneOffset = Date::timeZoneOffset(); 753 | if (zoneOffset >= 0) 754 | { 755 | stamp = 0; 756 | localtime_r(&stamp, &_tm); 757 | } 758 | else 759 | { 760 | stamp = (stamp < zoneOffset) ? 0 : stamp - zoneOffset; 761 | localtime_r(&stamp, &_tm); 762 | int hour = static_cast(zoneOffset / 3600); 763 | _tm.tm_hour += hour; 764 | } 765 | } 766 | } 767 | #else 768 | _isUTC ? gmtime_r(&stamp, &_tm) : localtime_r(&stamp, &_tm); 769 | #endif // PLATFORM_WINDOWS 770 | } 771 | 772 | void Date::_update() 773 | { 774 | int monthDays = Date::yearMonthDays(year(), month()); 775 | if (_tm.tm_mday > monthDays) 776 | { 777 | _tm.tm_mday = monthDays; 778 | } 779 | 780 | _set(stamp()); 781 | } 782 | 783 | 784 | Time::Time() 785 | { 786 | gettimeofday(&_tv, NULL); 787 | } 788 | 789 | Time::Time(time_t stamp) 790 | { 791 | set(stamp); 792 | } 793 | 794 | Time::Time(const Date &date) 795 | { 796 | set(date.stamp()); 797 | } 798 | 799 | Time::Time(const Time &time) 800 | { 801 | _tv = time._tv; 802 | } 803 | 804 | Time::~Time() 805 | { 806 | } 807 | 808 | Time Time::clone() const 809 | { 810 | return Time(*this); 811 | } 812 | 813 | Date Time::toDate() const 814 | { 815 | return Date(*this); 816 | } 817 | 818 | Date Time::utcDate() const 819 | { 820 | return Date(stamp(), true); 821 | } 822 | 823 | 824 | time_t Time::utcStamp() const 825 | { 826 | return _tv.tv_sec - Date::localTimeZoneOffset(); 827 | } 828 | 829 | Time & Time::set(time_t seconds, long microSeconds) 830 | { 831 | _tv.tv_sec = static_cast(seconds); 832 | if (microSeconds < 0) 833 | { 834 | microSeconds = 0; 835 | } 836 | else if (microSeconds >= 1000000) 837 | { 838 | microSeconds = 1000000 - 1; 839 | } 840 | return *this; 841 | } 842 | 843 | Time & Time::setSeconds(time_t seconds) 844 | { 845 | _tv.tv_sec = static_cast(seconds); 846 | return *this; 847 | } 848 | 849 | Time & Time::setMicroSeconds(long microSeconds) 850 | { 851 | if (microSeconds < 0) 852 | { 853 | microSeconds = 0; 854 | } 855 | else if (microSeconds >= 1000000) 856 | { 857 | microSeconds = 1000000 - 1; 858 | } 859 | 860 | _tv.tv_usec = microSeconds; 861 | return *this; 862 | } 863 | 864 | Time & Time::zeroSet(Duration::Period period) 865 | { 866 | switch (period) 867 | { 868 | case Duration::MilliSecond: 869 | _tv.tv_usec = _tv.tv_usec * 1000 * 1000; 870 | break; 871 | case Duration::Second: 872 | _tv.tv_usec = 0; 873 | break; 874 | case Duration::Minute: 875 | _tv.tv_sec = _tv.tv_sec / 60 * 60; 876 | _tv.tv_usec = 0; 877 | break; 878 | case Duration::Hour: 879 | _tv.tv_sec = _tv.tv_sec / 3600 * 3600; 880 | _tv.tv_usec = 0; 881 | break; 882 | case Duration::Day: 883 | case Duration::Week: 884 | case Duration::Month: 885 | case Duration::Year: 886 | setSeconds(toDate().zeroSet(period).stamp()); 887 | break; 888 | default: 889 | break; 890 | } 891 | 892 | return *this; 893 | } 894 | 895 | Time & Time::add(int64 value, Duration::Period period) 896 | { 897 | switch (period) 898 | { 899 | case Duration::MicroSecond: 900 | addMicroSecond(long(value)); 901 | break; 902 | case Duration::MilliSecond: 903 | addMilliSecond(long(value)); 904 | break; 905 | case Duration::Second: 906 | addSecond(int(value)); 907 | break; 908 | case Duration::Minute: 909 | addMinute(int(value)); 910 | break; 911 | case Duration::Hour: 912 | addHour(int(value)); 913 | break; 914 | case Duration::Day: 915 | addDay(int(value)); 916 | break; 917 | case Duration::Week: 918 | addWeek(int(value)); 919 | break; 920 | case Duration::Month: 921 | case Duration::Year: 922 | setSeconds(toDate().add(value, period).stamp()); 923 | break; 924 | default: 925 | break; 926 | } 927 | 928 | return *this; 929 | } 930 | 931 | Time & Time::add(const Duration & duration) 932 | { 933 | return add(duration.value(), duration.period()); 934 | } 935 | 936 | Time & Time::addWeek(int value) 937 | { 938 | _tv.tv_sec += value * 3600 * 24 * 7; 939 | return *this; 940 | } 941 | 942 | Time & Time::addDay(int value) 943 | { 944 | _tv.tv_sec += value * 3600 * 24; 945 | return *this; 946 | } 947 | 948 | Time & Time::addHour(int value) 949 | { 950 | _tv.tv_sec += value * 3600; 951 | return *this; 952 | } 953 | 954 | Time & Time::addMinute(int value) 955 | { 956 | _tv.tv_sec += value * 60; 957 | return *this; 958 | } 959 | 960 | Time & Time::addSecond(long value) 961 | { 962 | _tv.tv_sec += value; 963 | return *this; 964 | } 965 | 966 | Time & Time::addMilliSecond(long value) 967 | { 968 | _tv.tv_usec += value * 1000; 969 | _tv.tv_sec += _tv.tv_usec / 1000000; 970 | _tv.tv_usec %= 1000000; 971 | if (_tv.tv_usec < 0) 972 | { 973 | _tv.tv_sec -= 1; 974 | _tv.tv_usec += 1000000; 975 | } 976 | return *this; 977 | } 978 | 979 | Time & Time::addMicroSecond(long value) 980 | { 981 | _tv.tv_usec += value; 982 | _tv.tv_sec += _tv.tv_usec / 1000000; 983 | _tv.tv_usec %= 1000000; 984 | if (_tv.tv_usec < 0) 985 | { 986 | _tv.tv_sec -= 1; 987 | _tv.tv_usec += 1000000; 988 | } 989 | return *this; 990 | } 991 | 992 | int64 Time::diff(const Time & other, Duration::Period period) 993 | { 994 | switch (period) 995 | { 996 | case Duration::MicroSecond: 997 | return static_cast(microStamp() - other.microStamp()); 998 | case Duration::MilliSecond: 999 | return static_cast(milliStamp() - other.milliStamp()); 1000 | case Duration::Second: 1001 | return static_cast(stamp() - other.stamp()); 1002 | case Duration::Minute: 1003 | return static_cast(stamp() / 60 - other.stamp() / 60); 1004 | case Duration::Hour: 1005 | return static_cast(stamp() / 3600 - other.stamp() / 3600); 1006 | case Duration::Day: 1007 | return static_cast(getUTCFullDays() - other.getUTCFullDays()); 1008 | case Duration::Week: 1009 | return static_cast(getUTCFullWeeks() - other.getUTCFullWeeks()); 1010 | case Duration::Month: 1011 | case Duration::Year: 1012 | return toDate().diff(other.toDate(), period); 1013 | default: 1014 | return 0; 1015 | } 1016 | } 1017 | 1018 | int64 Time::getUTCFullMicroSeconds() const 1019 | { 1020 | return microStamp() + Date::localTimeZoneOffset() * 1000000; 1021 | } 1022 | 1023 | int64 Time::getUTCFullMilliSeconds() const 1024 | { 1025 | return milliStamp() + Date::localTimeZoneOffset() * 1000; 1026 | } 1027 | 1028 | time_t Time::getUTCFullSeconds() const 1029 | { 1030 | return seconds(); 1031 | } 1032 | 1033 | int Time::getUTCFullMinutes() const 1034 | { 1035 | return static_cast((utcStamp() / 60)); 1036 | } 1037 | 1038 | int Time::getUTCFullHours() const 1039 | { 1040 | return static_cast((utcStamp() / 3600)); 1041 | } 1042 | 1043 | int Time::getUTCFullDays() const 1044 | { 1045 | return static_cast((utcStamp() / 86400)); 1046 | } 1047 | 1048 | int Time::getUTCFullWeeks() const 1049 | { 1050 | int days = getUTCFullDays() + 4; 1051 | int weeks = (days - 1) / 7; 1052 | int weekDay = days % 7; 1053 | if (weekDay < 0) { 1054 | weeks -= 1; 1055 | } 1056 | return weeks; 1057 | } 1058 | 1059 | Time Time::operator + (const Duration & duration) 1060 | { 1061 | return clone().add(duration.value(), duration.period()); 1062 | } 1063 | 1064 | Time Time::operator - (const Duration & duration) 1065 | { 1066 | return clone().add(-duration.value(), duration.period()); 1067 | } 1068 | 1069 | Duration Time::operator - (const Time & other) 1070 | { 1071 | return Duration(static_cast(stamp() - other.stamp())); 1072 | } 1073 | 1074 | Time & Time::operator += (const Duration & duration) 1075 | { 1076 | return add(duration.value(), duration.period()); 1077 | } 1078 | 1079 | Time & Time::operator -= (const Duration & duration) 1080 | { 1081 | return add(-duration.value(), duration.period()); 1082 | } 1083 | 1084 | bool Time::operator < (const Time & other) 1085 | { 1086 | if (_tv.tv_sec != other._tv.tv_sec) 1087 | { 1088 | return _tv.tv_sec < other._tv.tv_sec; 1089 | } 1090 | 1091 | return _tv.tv_usec < other._tv.tv_usec; 1092 | 1093 | } 1094 | 1095 | bool Time::operator = (const Time & other) 1096 | { 1097 | return (_tv.tv_sec == other._tv.tv_sec) && (_tv.tv_usec == other._tv.tv_usec); 1098 | } 1099 | 1100 | } /* namespace ec */ 1101 | -------------------------------------------------------------------------------- /Doxyfile: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.6 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a double hash (##) is considered a comment and is placed in 7 | # front of the TAG it is preceding. 8 | # 9 | # All text after a single hash (#) is considered a comment and will be ignored. 10 | # The format is: 11 | # TAG = value [value, ...] 12 | # For lists, items can also be appended using: 13 | # TAG += value [value, ...] 14 | # Values that contain spaces should be placed between quotes (\" \"). 15 | 16 | #--------------------------------------------------------------------------- 17 | # Project related configuration options 18 | #--------------------------------------------------------------------------- 19 | 20 | # This tag specifies the encoding used for all characters in the config file 21 | # that follow. The default is UTF-8 which is also the encoding used for all text 22 | # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv 23 | # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv 24 | # for the list of possible encodings. 25 | # The default value is: UTF-8. 26 | 27 | DOXYFILE_ENCODING = UTF-8 28 | 29 | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by 30 | # double-quotes, unless you are using Doxywizard) that should identify the 31 | # project for which the documentation is generated. This name is used in the 32 | # title of most generated pages and in a few other places. 33 | # The default value is: My Project. 34 | 35 | PROJECT_NAME = "ec::Date" 36 | 37 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. This 38 | # could be handy for archiving the generated documentation or if some version 39 | # control system is used. 40 | 41 | PROJECT_NUMBER = 42 | 43 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 44 | # for a project that appears at the top of each page and should give viewer a 45 | # quick idea about the purpose of the project. Keep the description short. 46 | 47 | PROJECT_BRIEF = 48 | 49 | # With the PROJECT_LOGO tag one can specify an logo or icon that is included in 50 | # the documentation. The maximum height of the logo should not exceed 55 pixels 51 | # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo 52 | # to the output directory. 53 | 54 | PROJECT_LOGO = 55 | 56 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path 57 | # into which the generated documentation will be written. If a relative path is 58 | # entered, it will be relative to the location where doxygen was started. If 59 | # left blank the current directory will be used. 60 | 61 | OUTPUT_DIRECTORY = doc 62 | 63 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- 64 | # directories (in 2 levels) under the output directory of each output format and 65 | # will distribute the generated files over these directories. Enabling this 66 | # option can be useful when feeding doxygen a huge amount of source files, where 67 | # putting all generated files in the same directory would otherwise causes 68 | # performance problems for the file system. 69 | # The default value is: NO. 70 | 71 | CREATE_SUBDIRS = NO 72 | 73 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 74 | # documentation generated by doxygen is written. Doxygen will use this 75 | # information to generate all constant output in the proper language. 76 | # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, 77 | # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), 78 | # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, 79 | # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), 80 | # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, 81 | # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, 82 | # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, 83 | # Ukrainian and Vietnamese. 84 | # The default value is: English. 85 | 86 | OUTPUT_LANGUAGE = Chinese 87 | 88 | # If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member 89 | # descriptions after the members that are listed in the file and class 90 | # documentation (similar to Javadoc). Set to NO to disable this. 91 | # The default value is: YES. 92 | 93 | BRIEF_MEMBER_DESC = YES 94 | 95 | # If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief 96 | # description of a member or function before the detailed description 97 | # 98 | # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 99 | # brief descriptions will be completely suppressed. 100 | # The default value is: YES. 101 | 102 | REPEAT_BRIEF = YES 103 | 104 | # This tag implements a quasi-intelligent brief description abbreviator that is 105 | # used to form the text in various listings. Each string in this list, if found 106 | # as the leading text of the brief description, will be stripped from the text 107 | # and the result, after processing the whole list, is used as the annotated 108 | # text. Otherwise, the brief description is used as-is. If left blank, the 109 | # following values are used ($name is automatically replaced with the name of 110 | # the entity):The $name class, The $name widget, The $name file, is, provides, 111 | # specifies, contains, represents, a, an and the. 112 | 113 | ABBREVIATE_BRIEF = 114 | 115 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 116 | # doxygen will generate a detailed section even if there is only a brief 117 | # description. 118 | # The default value is: NO. 119 | 120 | ALWAYS_DETAILED_SEC = NO 121 | 122 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 123 | # inherited members of a class in the documentation of that class as if those 124 | # members were ordinary class members. Constructors, destructors and assignment 125 | # operators of the base classes will not be shown. 126 | # The default value is: NO. 127 | 128 | INLINE_INHERITED_MEMB = NO 129 | 130 | # If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path 131 | # before files name in the file list and in the header files. If set to NO the 132 | # shortest path that makes the file name unique will be used 133 | # The default value is: YES. 134 | 135 | FULL_PATH_NAMES = YES 136 | 137 | # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. 138 | # Stripping is only done if one of the specified strings matches the left-hand 139 | # part of the path. The tag can be used to show relative paths in the file list. 140 | # If left blank the directory from which doxygen is run is used as the path to 141 | # strip. 142 | # 143 | # Note that you can specify absolute paths here, but also relative paths, which 144 | # will be relative from the directory where doxygen is started. 145 | # This tag requires that the tag FULL_PATH_NAMES is set to YES. 146 | 147 | STRIP_FROM_PATH = 148 | 149 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the 150 | # path mentioned in the documentation of a class, which tells the reader which 151 | # header file to include in order to use a class. If left blank only the name of 152 | # the header file containing the class definition is used. Otherwise one should 153 | # specify the list of include paths that are normally passed to the compiler 154 | # using the -I flag. 155 | 156 | STRIP_FROM_INC_PATH = 157 | 158 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but 159 | # less readable) file names. This can be useful is your file systems doesn't 160 | # support long names like on DOS, Mac, or CD-ROM. 161 | # The default value is: NO. 162 | 163 | SHORT_NAMES = NO 164 | 165 | # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the 166 | # first line (until the first dot) of a Javadoc-style comment as the brief 167 | # description. If set to NO, the Javadoc-style will behave just like regular Qt- 168 | # style comments (thus requiring an explicit @brief command for a brief 169 | # description.) 170 | # The default value is: NO. 171 | 172 | JAVADOC_AUTOBRIEF = NO 173 | 174 | # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first 175 | # line (until the first dot) of a Qt-style comment as the brief description. If 176 | # set to NO, the Qt-style will behave just like regular Qt-style comments (thus 177 | # requiring an explicit \brief command for a brief description.) 178 | # The default value is: NO. 179 | 180 | QT_AUTOBRIEF = NO 181 | 182 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a 183 | # multi-line C++ special comment block (i.e. a block of //! or /// comments) as 184 | # a brief description. This used to be the default behavior. The new default is 185 | # to treat a multi-line C++ comment block as a detailed description. Set this 186 | # tag to YES if you prefer the old behavior instead. 187 | # 188 | # Note that setting this tag to YES also means that rational rose comments are 189 | # not recognized any more. 190 | # The default value is: NO. 191 | 192 | MULTILINE_CPP_IS_BRIEF = NO 193 | 194 | # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the 195 | # documentation from any documented member that it re-implements. 196 | # The default value is: YES. 197 | 198 | INHERIT_DOCS = YES 199 | 200 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a 201 | # new page for each member. If set to NO, the documentation of a member will be 202 | # part of the file/class/namespace that contains it. 203 | # The default value is: NO. 204 | 205 | SEPARATE_MEMBER_PAGES = NO 206 | 207 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen 208 | # uses this value to replace tabs by spaces in code fragments. 209 | # Minimum value: 1, maximum value: 16, default value: 4. 210 | 211 | TAB_SIZE = 4 212 | 213 | # This tag can be used to specify a number of aliases that act as commands in 214 | # the documentation. An alias has the form: 215 | # name=value 216 | # For example adding 217 | # "sideeffect=@par Side Effects:\n" 218 | # will allow you to put the command \sideeffect (or @sideeffect) in the 219 | # documentation, which will result in a user-defined paragraph with heading 220 | # "Side Effects:". You can put \n's in the value part of an alias to insert 221 | # newlines. 222 | 223 | ALIASES = 224 | 225 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 226 | # A mapping has the form "name=value". For example adding "class=itcl::class" 227 | # will allow you to use the command class in the itcl::class meaning. 228 | 229 | TCL_SUBST = 230 | 231 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 232 | # only. Doxygen will then generate output that is more tailored for C. For 233 | # instance, some of the names that are used will be different. The list of all 234 | # members will be omitted, etc. 235 | # The default value is: NO. 236 | 237 | OPTIMIZE_OUTPUT_FOR_C = NO 238 | 239 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or 240 | # Python sources only. Doxygen will then generate output that is more tailored 241 | # for that language. For instance, namespaces will be presented as packages, 242 | # qualified scopes will look different, etc. 243 | # The default value is: NO. 244 | 245 | OPTIMIZE_OUTPUT_JAVA = NO 246 | 247 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 248 | # sources. Doxygen will then generate output that is tailored for Fortran. 249 | # The default value is: NO. 250 | 251 | OPTIMIZE_FOR_FORTRAN = NO 252 | 253 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 254 | # sources. Doxygen will then generate output that is tailored for VHDL. 255 | # The default value is: NO. 256 | 257 | OPTIMIZE_OUTPUT_VHDL = NO 258 | 259 | # Doxygen selects the parser to use depending on the extension of the files it 260 | # parses. With this tag you can assign which parser to use for a given 261 | # extension. Doxygen has a built-in mapping, but you can override or extend it 262 | # using this tag. The format is ext=language, where ext is a file extension, and 263 | # language is one of the parsers supported by doxygen: IDL, Java, Javascript, 264 | # C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make 265 | # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 266 | # (default is Fortran), use: inc=Fortran f=C. 267 | # 268 | # Note For files without extension you can use no_extension as a placeholder. 269 | # 270 | # Note that for custom extensions you also need to set FILE_PATTERNS otherwise 271 | # the files are not read by doxygen. 272 | 273 | EXTENSION_MAPPING = 274 | 275 | # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments 276 | # according to the Markdown format, which allows for more readable 277 | # documentation. See http://daringfireball.net/projects/markdown/ for details. 278 | # The output of markdown processing is further processed by doxygen, so you can 279 | # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in 280 | # case of backward compatibilities issues. 281 | # The default value is: YES. 282 | 283 | MARKDOWN_SUPPORT = YES 284 | 285 | # When enabled doxygen tries to link words that correspond to documented 286 | # classes, or namespaces to their corresponding documentation. Such a link can 287 | # be prevented in individual cases by by putting a % sign in front of the word 288 | # or globally by setting AUTOLINK_SUPPORT to NO. 289 | # The default value is: YES. 290 | 291 | AUTOLINK_SUPPORT = YES 292 | 293 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 294 | # to include (a tag file for) the STL sources as input, then you should set this 295 | # tag to YES in order to let doxygen match functions declarations and 296 | # definitions whose arguments contain STL classes (e.g. func(std::string); 297 | # versus func(std::string) {}). This also make the inheritance and collaboration 298 | # diagrams that involve STL classes more complete and accurate. 299 | # The default value is: NO. 300 | 301 | BUILTIN_STL_SUPPORT = NO 302 | 303 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 304 | # enable parsing support. 305 | # The default value is: NO. 306 | 307 | CPP_CLI_SUPPORT = NO 308 | 309 | # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: 310 | # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen 311 | # will parse them like normal C++ but will assume all classes use public instead 312 | # of private inheritance when no explicit protection keyword is present. 313 | # The default value is: NO. 314 | 315 | SIP_SUPPORT = NO 316 | 317 | # For Microsoft's IDL there are propget and propput attributes to indicate 318 | # getter and setter methods for a property. Setting this option to YES will make 319 | # doxygen to replace the get and set methods by a property in the documentation. 320 | # This will only work if the methods are indeed getting or setting a simple 321 | # type. If this is not the case, or you want to show the methods anyway, you 322 | # should set this option to NO. 323 | # The default value is: YES. 324 | 325 | IDL_PROPERTY_SUPPORT = YES 326 | 327 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 328 | # tag is set to YES, then doxygen will reuse the documentation of the first 329 | # member in the group (if any) for the other members of the group. By default 330 | # all members of a group must be documented explicitly. 331 | # The default value is: NO. 332 | 333 | DISTRIBUTE_GROUP_DOC = NO 334 | 335 | # Set the SUBGROUPING tag to YES to allow class member groups of the same type 336 | # (for instance a group of public functions) to be put as a subgroup of that 337 | # type (e.g. under the Public Functions section). Set it to NO to prevent 338 | # subgrouping. Alternatively, this can be done per class using the 339 | # \nosubgrouping command. 340 | # The default value is: YES. 341 | 342 | SUBGROUPING = YES 343 | 344 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions 345 | # are shown inside the group in which they are included (e.g. using \ingroup) 346 | # instead of on a separate page (for HTML and Man pages) or section (for LaTeX 347 | # and RTF). 348 | # 349 | # Note that this feature does not work in combination with 350 | # SEPARATE_MEMBER_PAGES. 351 | # The default value is: NO. 352 | 353 | INLINE_GROUPED_CLASSES = NO 354 | 355 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions 356 | # with only public data fields or simple typedef fields will be shown inline in 357 | # the documentation of the scope in which they are defined (i.e. file, 358 | # namespace, or group documentation), provided this scope is documented. If set 359 | # to NO, structs, classes, and unions are shown on a separate page (for HTML and 360 | # Man pages) or section (for LaTeX and RTF). 361 | # The default value is: NO. 362 | 363 | INLINE_SIMPLE_STRUCTS = NO 364 | 365 | # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or 366 | # enum is documented as struct, union, or enum with the name of the typedef. So 367 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 368 | # with name TypeT. When disabled the typedef will appear as a member of a file, 369 | # namespace, or class. And the struct will be named TypeS. This can typically be 370 | # useful for C code in case the coding convention dictates that all compound 371 | # types are typedef'ed and only the typedef is referenced, never the tag name. 372 | # The default value is: NO. 373 | 374 | TYPEDEF_HIDES_STRUCT = NO 375 | 376 | # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This 377 | # cache is used to resolve symbols given their name and scope. Since this can be 378 | # an expensive process and often the same symbol appears multiple times in the 379 | # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small 380 | # doxygen will become slower. If the cache is too large, memory is wasted. The 381 | # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range 382 | # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 383 | # symbols. At the end of a run doxygen will report the cache usage and suggest 384 | # the optimal cache size from a speed point of view. 385 | # Minimum value: 0, maximum value: 9, default value: 0. 386 | 387 | LOOKUP_CACHE_SIZE = 0 388 | 389 | #--------------------------------------------------------------------------- 390 | # Build related configuration options 391 | #--------------------------------------------------------------------------- 392 | 393 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 394 | # documentation are documented, even if no documentation was available. Private 395 | # class members and static file members will be hidden unless the 396 | # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. 397 | # Note: This will also disable the warnings about undocumented members that are 398 | # normally produced when WARNINGS is set to YES. 399 | # The default value is: NO. 400 | 401 | EXTRACT_ALL = NO 402 | 403 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will 404 | # be included in the documentation. 405 | # The default value is: NO. 406 | 407 | EXTRACT_PRIVATE = NO 408 | 409 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal 410 | # scope will be included in the documentation. 411 | # The default value is: NO. 412 | 413 | EXTRACT_PACKAGE = NO 414 | 415 | # If the EXTRACT_STATIC tag is set to YES all static members of a file will be 416 | # included in the documentation. 417 | # The default value is: NO. 418 | 419 | EXTRACT_STATIC = NO 420 | 421 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined 422 | # locally in source files will be included in the documentation. If set to NO 423 | # only classes defined in header files are included. Does not have any effect 424 | # for Java sources. 425 | # The default value is: YES. 426 | 427 | EXTRACT_LOCAL_CLASSES = YES 428 | 429 | # This flag is only useful for Objective-C code. When set to YES local methods, 430 | # which are defined in the implementation section but not in the interface are 431 | # included in the documentation. If set to NO only methods in the interface are 432 | # included. 433 | # The default value is: NO. 434 | 435 | EXTRACT_LOCAL_METHODS = NO 436 | 437 | # If this flag is set to YES, the members of anonymous namespaces will be 438 | # extracted and appear in the documentation as a namespace called 439 | # 'anonymous_namespace{file}', where file will be replaced with the base name of 440 | # the file that contains the anonymous namespace. By default anonymous namespace 441 | # are hidden. 442 | # The default value is: NO. 443 | 444 | EXTRACT_ANON_NSPACES = NO 445 | 446 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all 447 | # undocumented members inside documented classes or files. If set to NO these 448 | # members will be included in the various overviews, but no documentation 449 | # section is generated. This option has no effect if EXTRACT_ALL is enabled. 450 | # The default value is: NO. 451 | 452 | HIDE_UNDOC_MEMBERS = NO 453 | 454 | # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all 455 | # undocumented classes that are normally visible in the class hierarchy. If set 456 | # to NO these classes will be included in the various overviews. This option has 457 | # no effect if EXTRACT_ALL is enabled. 458 | # The default value is: NO. 459 | 460 | HIDE_UNDOC_CLASSES = NO 461 | 462 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend 463 | # (class|struct|union) declarations. If set to NO these declarations will be 464 | # included in the documentation. 465 | # The default value is: NO. 466 | 467 | HIDE_FRIEND_COMPOUNDS = NO 468 | 469 | # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any 470 | # documentation blocks found inside the body of a function. If set to NO these 471 | # blocks will be appended to the function's detailed documentation block. 472 | # The default value is: NO. 473 | 474 | HIDE_IN_BODY_DOCS = NO 475 | 476 | # The INTERNAL_DOCS tag determines if documentation that is typed after a 477 | # \internal command is included. If the tag is set to NO then the documentation 478 | # will be excluded. Set it to YES to include the internal documentation. 479 | # The default value is: NO. 480 | 481 | INTERNAL_DOCS = NO 482 | 483 | # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file 484 | # names in lower-case letters. If set to YES upper-case letters are also 485 | # allowed. This is useful if you have classes or files whose names only differ 486 | # in case and if your file system supports case sensitive file names. Windows 487 | # and Mac users are advised to set this option to NO. 488 | # The default value is: system dependent. 489 | 490 | CASE_SENSE_NAMES = YES 491 | 492 | # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with 493 | # their full class and namespace scopes in the documentation. If set to YES the 494 | # scope will be hidden. 495 | # The default value is: NO. 496 | 497 | HIDE_SCOPE_NAMES = NO 498 | 499 | # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of 500 | # the files that are included by a file in the documentation of that file. 501 | # The default value is: YES. 502 | 503 | SHOW_INCLUDE_FILES = YES 504 | 505 | # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each 506 | # grouped member an include statement to the documentation, telling the reader 507 | # which file to include in order to use the member. 508 | # The default value is: NO. 509 | 510 | SHOW_GROUPED_MEMB_INC = NO 511 | 512 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include 513 | # files with double quotes in the documentation rather than with sharp brackets. 514 | # The default value is: NO. 515 | 516 | FORCE_LOCAL_INCLUDES = NO 517 | 518 | # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the 519 | # documentation for inline members. 520 | # The default value is: YES. 521 | 522 | INLINE_INFO = YES 523 | 524 | # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the 525 | # (detailed) documentation of file and class members alphabetically by member 526 | # name. If set to NO the members will appear in declaration order. 527 | # The default value is: YES. 528 | 529 | SORT_MEMBER_DOCS = YES 530 | 531 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief 532 | # descriptions of file, namespace and class members alphabetically by member 533 | # name. If set to NO the members will appear in declaration order. Note that 534 | # this will also influence the order of the classes in the class list. 535 | # The default value is: NO. 536 | 537 | SORT_BRIEF_DOCS = NO 538 | 539 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the 540 | # (brief and detailed) documentation of class members so that constructors and 541 | # destructors are listed first. If set to NO the constructors will appear in the 542 | # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. 543 | # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief 544 | # member documentation. 545 | # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting 546 | # detailed member documentation. 547 | # The default value is: NO. 548 | 549 | SORT_MEMBERS_CTORS_1ST = NO 550 | 551 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy 552 | # of group names into alphabetical order. If set to NO the group names will 553 | # appear in their defined order. 554 | # The default value is: NO. 555 | 556 | SORT_GROUP_NAMES = NO 557 | 558 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by 559 | # fully-qualified names, including namespaces. If set to NO, the class list will 560 | # be sorted only by class name, not including the namespace part. 561 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 562 | # Note: This option applies only to the class list, not to the alphabetical 563 | # list. 564 | # The default value is: NO. 565 | 566 | SORT_BY_SCOPE_NAME = NO 567 | 568 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper 569 | # type resolution of all parameters of a function it will reject a match between 570 | # the prototype and the implementation of a member function even if there is 571 | # only one candidate or it is obvious which candidate to choose by doing a 572 | # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still 573 | # accept a match between prototype and implementation in such cases. 574 | # The default value is: NO. 575 | 576 | STRICT_PROTO_MATCHING = NO 577 | 578 | # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the 579 | # todo list. This list is created by putting \todo commands in the 580 | # documentation. 581 | # The default value is: YES. 582 | 583 | GENERATE_TODOLIST = YES 584 | 585 | # The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the 586 | # test list. This list is created by putting \test commands in the 587 | # documentation. 588 | # The default value is: YES. 589 | 590 | GENERATE_TESTLIST = YES 591 | 592 | # The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug 593 | # list. This list is created by putting \bug commands in the documentation. 594 | # The default value is: YES. 595 | 596 | GENERATE_BUGLIST = YES 597 | 598 | # The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) 599 | # the deprecated list. This list is created by putting \deprecated commands in 600 | # the documentation. 601 | # The default value is: YES. 602 | 603 | GENERATE_DEPRECATEDLIST= YES 604 | 605 | # The ENABLED_SECTIONS tag can be used to enable conditional documentation 606 | # sections, marked by \if ... \endif and \cond 607 | # ... \endcond blocks. 608 | 609 | ENABLED_SECTIONS = 610 | 611 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the 612 | # initial value of a variable or macro / define can have for it to appear in the 613 | # documentation. If the initializer consists of more lines than specified here 614 | # it will be hidden. Use a value of 0 to hide initializers completely. The 615 | # appearance of the value of individual variables and macros / defines can be 616 | # controlled using \showinitializer or \hideinitializer command in the 617 | # documentation regardless of this setting. 618 | # Minimum value: 0, maximum value: 10000, default value: 30. 619 | 620 | MAX_INITIALIZER_LINES = 30 621 | 622 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at 623 | # the bottom of the documentation of classes and structs. If set to YES the list 624 | # will mention the files that were used to generate the documentation. 625 | # The default value is: YES. 626 | 627 | SHOW_USED_FILES = YES 628 | 629 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This 630 | # will remove the Files entry from the Quick Index and from the Folder Tree View 631 | # (if specified). 632 | # The default value is: YES. 633 | 634 | SHOW_FILES = YES 635 | 636 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces 637 | # page. This will remove the Namespaces entry from the Quick Index and from the 638 | # Folder Tree View (if specified). 639 | # The default value is: YES. 640 | 641 | SHOW_NAMESPACES = YES 642 | 643 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 644 | # doxygen should invoke to get the current version for each file (typically from 645 | # the version control system). Doxygen will invoke the program by executing (via 646 | # popen()) the command command input-file, where command is the value of the 647 | # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided 648 | # by doxygen. Whatever the program writes to standard output is used as the file 649 | # version. For an example see the documentation. 650 | 651 | FILE_VERSION_FILTER = 652 | 653 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 654 | # by doxygen. The layout file controls the global structure of the generated 655 | # output files in an output format independent way. To create the layout file 656 | # that represents doxygen's defaults, run doxygen with the -l option. You can 657 | # optionally specify a file name after the option, if omitted DoxygenLayout.xml 658 | # will be used as the name of the layout file. 659 | # 660 | # Note that if you run doxygen from a directory containing a file called 661 | # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE 662 | # tag is left empty. 663 | 664 | LAYOUT_FILE = 665 | 666 | # The CITE_BIB_FILES tag can be used to specify one or more bib files containing 667 | # the reference definitions. This must be a list of .bib files. The .bib 668 | # extension is automatically appended if omitted. This requires the bibtex tool 669 | # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. 670 | # For LaTeX the style of the bibliography can be controlled using 671 | # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the 672 | # search path. Do not use file names with spaces, bibtex cannot handle them. See 673 | # also \cite for info how to create references. 674 | 675 | CITE_BIB_FILES = 676 | 677 | #--------------------------------------------------------------------------- 678 | # Configuration options related to warning and progress messages 679 | #--------------------------------------------------------------------------- 680 | 681 | # The QUIET tag can be used to turn on/off the messages that are generated to 682 | # standard output by doxygen. If QUIET is set to YES this implies that the 683 | # messages are off. 684 | # The default value is: NO. 685 | 686 | QUIET = NO 687 | 688 | # The WARNINGS tag can be used to turn on/off the warning messages that are 689 | # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES 690 | # this implies that the warnings are on. 691 | # 692 | # Tip: Turn warnings on while writing the documentation. 693 | # The default value is: YES. 694 | 695 | WARNINGS = YES 696 | 697 | # If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate 698 | # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag 699 | # will automatically be disabled. 700 | # The default value is: YES. 701 | 702 | WARN_IF_UNDOCUMENTED = YES 703 | 704 | # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for 705 | # potential errors in the documentation, such as not documenting some parameters 706 | # in a documented function, or documenting parameters that don't exist or using 707 | # markup commands wrongly. 708 | # The default value is: YES. 709 | 710 | WARN_IF_DOC_ERROR = YES 711 | 712 | # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that 713 | # are documented, but have no documentation for their parameters or return 714 | # value. If set to NO doxygen will only warn about wrong or incomplete parameter 715 | # documentation, but not about the absence of documentation. 716 | # The default value is: NO. 717 | 718 | WARN_NO_PARAMDOC = NO 719 | 720 | # The WARN_FORMAT tag determines the format of the warning messages that doxygen 721 | # can produce. The string should contain the $file, $line, and $text tags, which 722 | # will be replaced by the file and line number from which the warning originated 723 | # and the warning text. Optionally the format may contain $version, which will 724 | # be replaced by the version of the file (if it could be obtained via 725 | # FILE_VERSION_FILTER) 726 | # The default value is: $file:$line: $text. 727 | 728 | WARN_FORMAT = "$file:$line: $text" 729 | 730 | # The WARN_LOGFILE tag can be used to specify a file to which warning and error 731 | # messages should be written. If left blank the output is written to standard 732 | # error (stderr). 733 | 734 | WARN_LOGFILE = 735 | 736 | #--------------------------------------------------------------------------- 737 | # Configuration options related to the input files 738 | #--------------------------------------------------------------------------- 739 | 740 | # The INPUT tag is used to specify the files and/or directories that contain 741 | # documented source files. You may enter file names like myfile.cpp or 742 | # directories like /usr/src/myproject. Separate the files or directories with 743 | # spaces. 744 | # Note: If this tag is empty the current directory is searched. 745 | 746 | INPUT = ./ 747 | 748 | # This tag can be used to specify the character encoding of the source files 749 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses 750 | # libiconv (or the iconv built into libc) for the transcoding. See the libiconv 751 | # documentation (see: http://www.gnu.org/software/libiconv) for the list of 752 | # possible encodings. 753 | # The default value is: UTF-8. 754 | 755 | INPUT_ENCODING = UTF-8 756 | 757 | # If the value of the INPUT tag contains directories, you can use the 758 | # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and 759 | # *.h) to filter out the source-files in the directories. If left blank the 760 | # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, 761 | # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, 762 | # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, 763 | # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, 764 | # *.qsf, *.as and *.js. 765 | 766 | FILE_PATTERNS = 767 | 768 | # The RECURSIVE tag can be used to specify whether or not subdirectories should 769 | # be searched for input files as well. 770 | # The default value is: NO. 771 | 772 | RECURSIVE = YES 773 | 774 | # The EXCLUDE tag can be used to specify files and/or directories that should be 775 | # excluded from the INPUT source files. This way you can easily exclude a 776 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 777 | # 778 | # Note that relative paths are relative to the directory from which doxygen is 779 | # run. 780 | 781 | EXCLUDE = example test 782 | 783 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 784 | # directories that are symbolic links (a Unix file system feature) are excluded 785 | # from the input. 786 | # The default value is: NO. 787 | 788 | EXCLUDE_SYMLINKS = NO 789 | 790 | # If the value of the INPUT tag contains directories, you can use the 791 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 792 | # certain files from those directories. 793 | # 794 | # Note that the wildcards are matched against the file with absolute path, so to 795 | # exclude all test directories for example use the pattern */test/* 796 | 797 | EXCLUDE_PATTERNS = 798 | 799 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 800 | # (namespaces, classes, functions, etc.) that should be excluded from the 801 | # output. The symbol name can be a fully qualified name, a word, or if the 802 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 803 | # AClass::ANamespace, ANamespace::*Test 804 | # 805 | # Note that the wildcards are matched against the file with absolute path, so to 806 | # exclude all test directories use the pattern */test/* 807 | 808 | EXCLUDE_SYMBOLS = 809 | 810 | # The EXAMPLE_PATH tag can be used to specify one or more files or directories 811 | # that contain example code fragments that are included (see the \include 812 | # command). 813 | 814 | EXAMPLE_PATH = 815 | 816 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 817 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and 818 | # *.h) to filter out the source-files in the directories. If left blank all 819 | # files are included. 820 | 821 | EXAMPLE_PATTERNS = 822 | 823 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 824 | # searched for input files to be used with the \include or \dontinclude commands 825 | # irrespective of the value of the RECURSIVE tag. 826 | # The default value is: NO. 827 | 828 | EXAMPLE_RECURSIVE = NO 829 | 830 | # The IMAGE_PATH tag can be used to specify one or more files or directories 831 | # that contain images that are to be included in the documentation (see the 832 | # \image command). 833 | 834 | IMAGE_PATH = 835 | 836 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 837 | # invoke to filter for each input file. Doxygen will invoke the filter program 838 | # by executing (via popen()) the command: 839 | # 840 | # 841 | # 842 | # where is the value of the INPUT_FILTER tag, and is the 843 | # name of an input file. Doxygen will then use the output that the filter 844 | # program writes to standard output. If FILTER_PATTERNS is specified, this tag 845 | # will be ignored. 846 | # 847 | # Note that the filter must not add or remove lines; it is applied before the 848 | # code is scanned, but not when the output code is generated. If lines are added 849 | # or removed, the anchors will not be placed correctly. 850 | 851 | INPUT_FILTER = 852 | 853 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 854 | # basis. Doxygen will compare the file name with each pattern and apply the 855 | # filter if there is a match. The filters are a list of the form: pattern=filter 856 | # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how 857 | # filters are used. If the FILTER_PATTERNS tag is empty or if none of the 858 | # patterns match the file name, INPUT_FILTER is applied. 859 | 860 | FILTER_PATTERNS = 861 | 862 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 863 | # INPUT_FILTER ) will also be used to filter the input files that are used for 864 | # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). 865 | # The default value is: NO. 866 | 867 | FILTER_SOURCE_FILES = NO 868 | 869 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 870 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and 871 | # it is also possible to disable source filtering for a specific pattern using 872 | # *.ext= (so without naming a filter). 873 | # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. 874 | 875 | FILTER_SOURCE_PATTERNS = 876 | 877 | # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that 878 | # is part of the input, its contents will be placed on the main page 879 | # (index.html). This can be useful if you have a project on for instance GitHub 880 | # and want to reuse the introduction page also for the doxygen output. 881 | 882 | USE_MDFILE_AS_MAINPAGE = 883 | 884 | #--------------------------------------------------------------------------- 885 | # Configuration options related to source browsing 886 | #--------------------------------------------------------------------------- 887 | 888 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will be 889 | # generated. Documented entities will be cross-referenced with these sources. 890 | # 891 | # Note: To get rid of all source code in the generated output, make sure that 892 | # also VERBATIM_HEADERS is set to NO. 893 | # The default value is: NO. 894 | 895 | SOURCE_BROWSER = NO 896 | 897 | # Setting the INLINE_SOURCES tag to YES will include the body of functions, 898 | # classes and enums directly into the documentation. 899 | # The default value is: NO. 900 | 901 | INLINE_SOURCES = NO 902 | 903 | # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any 904 | # special comment blocks from generated source code fragments. Normal C, C++ and 905 | # Fortran comments will always remain visible. 906 | # The default value is: YES. 907 | 908 | STRIP_CODE_COMMENTS = YES 909 | 910 | # If the REFERENCED_BY_RELATION tag is set to YES then for each documented 911 | # function all documented functions referencing it will be listed. 912 | # The default value is: NO. 913 | 914 | REFERENCED_BY_RELATION = NO 915 | 916 | # If the REFERENCES_RELATION tag is set to YES then for each documented function 917 | # all documented entities called/used by that function will be listed. 918 | # The default value is: NO. 919 | 920 | REFERENCES_RELATION = NO 921 | 922 | # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set 923 | # to YES, then the hyperlinks from functions in REFERENCES_RELATION and 924 | # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will 925 | # link to the documentation. 926 | # The default value is: YES. 927 | 928 | REFERENCES_LINK_SOURCE = YES 929 | 930 | # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the 931 | # source code will show a tooltip with additional information such as prototype, 932 | # brief description and links to the definition and documentation. Since this 933 | # will make the HTML file larger and loading of large files a bit slower, you 934 | # can opt to disable this feature. 935 | # The default value is: YES. 936 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 937 | 938 | SOURCE_TOOLTIPS = YES 939 | 940 | # If the USE_HTAGS tag is set to YES then the references to source code will 941 | # point to the HTML generated by the htags(1) tool instead of doxygen built-in 942 | # source browser. The htags tool is part of GNU's global source tagging system 943 | # (see http://www.gnu.org/software/global/global.html). You will need version 944 | # 4.8.6 or higher. 945 | # 946 | # To use it do the following: 947 | # - Install the latest version of global 948 | # - Enable SOURCE_BROWSER and USE_HTAGS in the config file 949 | # - Make sure the INPUT points to the root of the source tree 950 | # - Run doxygen as normal 951 | # 952 | # Doxygen will invoke htags (and that will in turn invoke gtags), so these 953 | # tools must be available from the command line (i.e. in the search path). 954 | # 955 | # The result: instead of the source browser generated by doxygen, the links to 956 | # source code will now point to the output of htags. 957 | # The default value is: NO. 958 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 959 | 960 | USE_HTAGS = NO 961 | 962 | # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a 963 | # verbatim copy of the header file for each class for which an include is 964 | # specified. Set to NO to disable this. 965 | # See also: Section \class. 966 | # The default value is: YES. 967 | 968 | VERBATIM_HEADERS = YES 969 | 970 | #--------------------------------------------------------------------------- 971 | # Configuration options related to the alphabetical class index 972 | #--------------------------------------------------------------------------- 973 | 974 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all 975 | # compounds will be generated. Enable this if the project contains a lot of 976 | # classes, structs, unions or interfaces. 977 | # The default value is: YES. 978 | 979 | ALPHABETICAL_INDEX = YES 980 | 981 | # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in 982 | # which the alphabetical index list will be split. 983 | # Minimum value: 1, maximum value: 20, default value: 5. 984 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 985 | 986 | COLS_IN_ALPHA_INDEX = 5 987 | 988 | # In case all classes in a project start with a common prefix, all classes will 989 | # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag 990 | # can be used to specify a prefix (or a list of prefixes) that should be ignored 991 | # while generating the index headers. 992 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 993 | 994 | IGNORE_PREFIX = 995 | 996 | #--------------------------------------------------------------------------- 997 | # Configuration options related to the HTML output 998 | #--------------------------------------------------------------------------- 999 | 1000 | # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output 1001 | # The default value is: YES. 1002 | 1003 | GENERATE_HTML = YES 1004 | 1005 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a 1006 | # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of 1007 | # it. 1008 | # The default directory is: html. 1009 | # This tag requires that the tag GENERATE_HTML is set to YES. 1010 | 1011 | HTML_OUTPUT = html 1012 | 1013 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each 1014 | # generated HTML page (for example: .htm, .php, .asp). 1015 | # The default value is: .html. 1016 | # This tag requires that the tag GENERATE_HTML is set to YES. 1017 | 1018 | HTML_FILE_EXTENSION = .html 1019 | 1020 | # The HTML_HEADER tag can be used to specify a user-defined HTML header file for 1021 | # each generated HTML page. If the tag is left blank doxygen will generate a 1022 | # standard header. 1023 | # 1024 | # To get valid HTML the header file that includes any scripts and style sheets 1025 | # that doxygen needs, which is dependent on the configuration options used (e.g. 1026 | # the setting GENERATE_TREEVIEW). It is highly recommended to start with a 1027 | # default header using 1028 | # doxygen -w html new_header.html new_footer.html new_stylesheet.css 1029 | # YourConfigFile 1030 | # and then modify the file new_header.html. See also section "Doxygen usage" 1031 | # for information on how to generate the default header that doxygen normally 1032 | # uses. 1033 | # Note: The header is subject to change so you typically have to regenerate the 1034 | # default header when upgrading to a newer version of doxygen. For a description 1035 | # of the possible markers and block names see the documentation. 1036 | # This tag requires that the tag GENERATE_HTML is set to YES. 1037 | 1038 | HTML_HEADER = 1039 | 1040 | # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each 1041 | # generated HTML page. If the tag is left blank doxygen will generate a standard 1042 | # footer. See HTML_HEADER for more information on how to generate a default 1043 | # footer and what special commands can be used inside the footer. See also 1044 | # section "Doxygen usage" for information on how to generate the default footer 1045 | # that doxygen normally uses. 1046 | # This tag requires that the tag GENERATE_HTML is set to YES. 1047 | 1048 | HTML_FOOTER = 1049 | 1050 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style 1051 | # sheet that is used by each HTML page. It can be used to fine-tune the look of 1052 | # the HTML output. If left blank doxygen will generate a default style sheet. 1053 | # See also section "Doxygen usage" for information on how to generate the style 1054 | # sheet that doxygen normally uses. 1055 | # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as 1056 | # it is more robust and this tag (HTML_STYLESHEET) will in the future become 1057 | # obsolete. 1058 | # This tag requires that the tag GENERATE_HTML is set to YES. 1059 | 1060 | HTML_STYLESHEET = 1061 | 1062 | # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- 1063 | # defined cascading style sheet that is included after the standard style sheets 1064 | # created by doxygen. Using this option one can overrule certain style aspects. 1065 | # This is preferred over using HTML_STYLESHEET since it does not replace the 1066 | # standard style sheet and is therefor more robust against future updates. 1067 | # Doxygen will copy the style sheet file to the output directory. For an example 1068 | # see the documentation. 1069 | # This tag requires that the tag GENERATE_HTML is set to YES. 1070 | 1071 | HTML_EXTRA_STYLESHEET = 1072 | 1073 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 1074 | # other source files which should be copied to the HTML output directory. Note 1075 | # that these files will be copied to the base HTML output directory. Use the 1076 | # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 1077 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that the 1078 | # files will be copied as-is; there are no commands or markers available. 1079 | # This tag requires that the tag GENERATE_HTML is set to YES. 1080 | 1081 | HTML_EXTRA_FILES = 1082 | 1083 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen 1084 | # will adjust the colors in the stylesheet and background images according to 1085 | # this color. Hue is specified as an angle on a colorwheel, see 1086 | # http://en.wikipedia.org/wiki/Hue for more information. For instance the value 1087 | # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 1088 | # purple, and 360 is red again. 1089 | # Minimum value: 0, maximum value: 359, default value: 220. 1090 | # This tag requires that the tag GENERATE_HTML is set to YES. 1091 | 1092 | HTML_COLORSTYLE_HUE = 220 1093 | 1094 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors 1095 | # in the HTML output. For a value of 0 the output will use grayscales only. A 1096 | # value of 255 will produce the most vivid colors. 1097 | # Minimum value: 0, maximum value: 255, default value: 100. 1098 | # This tag requires that the tag GENERATE_HTML is set to YES. 1099 | 1100 | HTML_COLORSTYLE_SAT = 100 1101 | 1102 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the 1103 | # luminance component of the colors in the HTML output. Values below 100 1104 | # gradually make the output lighter, whereas values above 100 make the output 1105 | # darker. The value divided by 100 is the actual gamma applied, so 80 represents 1106 | # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not 1107 | # change the gamma. 1108 | # Minimum value: 40, maximum value: 240, default value: 80. 1109 | # This tag requires that the tag GENERATE_HTML is set to YES. 1110 | 1111 | HTML_COLORSTYLE_GAMMA = 80 1112 | 1113 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 1114 | # page will contain the date and time when the page was generated. Setting this 1115 | # to NO can help when comparing the output of multiple runs. 1116 | # The default value is: YES. 1117 | # This tag requires that the tag GENERATE_HTML is set to YES. 1118 | 1119 | HTML_TIMESTAMP = YES 1120 | 1121 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 1122 | # documentation will contain sections that can be hidden and shown after the 1123 | # page has loaded. 1124 | # The default value is: NO. 1125 | # This tag requires that the tag GENERATE_HTML is set to YES. 1126 | 1127 | HTML_DYNAMIC_SECTIONS = NO 1128 | 1129 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries 1130 | # shown in the various tree structured indices initially; the user can expand 1131 | # and collapse entries dynamically later on. Doxygen will expand the tree to 1132 | # such a level that at most the specified number of entries are visible (unless 1133 | # a fully collapsed tree already exceeds this amount). So setting the number of 1134 | # entries 1 will produce a full collapsed tree by default. 0 is a special value 1135 | # representing an infinite number of entries and will result in a full expanded 1136 | # tree by default. 1137 | # Minimum value: 0, maximum value: 9999, default value: 100. 1138 | # This tag requires that the tag GENERATE_HTML is set to YES. 1139 | 1140 | HTML_INDEX_NUM_ENTRIES = 100 1141 | 1142 | # If the GENERATE_DOCSET tag is set to YES, additional index files will be 1143 | # generated that can be used as input for Apple's Xcode 3 integrated development 1144 | # environment (see: http://developer.apple.com/tools/xcode/), introduced with 1145 | # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a 1146 | # Makefile in the HTML output directory. Running make will produce the docset in 1147 | # that directory and running make install will install the docset in 1148 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at 1149 | # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 1150 | # for more information. 1151 | # The default value is: NO. 1152 | # This tag requires that the tag GENERATE_HTML is set to YES. 1153 | 1154 | GENERATE_DOCSET = NO 1155 | 1156 | # This tag determines the name of the docset feed. A documentation feed provides 1157 | # an umbrella under which multiple documentation sets from a single provider 1158 | # (such as a company or product suite) can be grouped. 1159 | # The default value is: Doxygen generated docs. 1160 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1161 | 1162 | DOCSET_FEEDNAME = "Doxygen generated docs Debug Release" 1163 | 1164 | # This tag specifies a string that should uniquely identify the documentation 1165 | # set bundle. This should be a reverse domain-name style string, e.g. 1166 | # com.mycompany.MyDocSet. Doxygen will append .docset to the name. 1167 | # The default value is: org.doxygen.Project. 1168 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1169 | 1170 | DOCSET_BUNDLE_ID = org.doxygen.Project 1171 | 1172 | # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify 1173 | # the documentation publisher. This should be a reverse domain-name style 1174 | # string, e.g. com.mycompany.MyDocSet.documentation. 1175 | # The default value is: org.doxygen.Publisher. 1176 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1177 | 1178 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 1179 | 1180 | # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. 1181 | # The default value is: Publisher. 1182 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1183 | 1184 | DOCSET_PUBLISHER_NAME = Publisher 1185 | 1186 | # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three 1187 | # additional HTML index files: index.hhp, index.hhc, and index.hhk. The 1188 | # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop 1189 | # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on 1190 | # Windows. 1191 | # 1192 | # The HTML Help Workshop contains a compiler that can convert all HTML output 1193 | # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML 1194 | # files are now used as the Windows 98 help format, and will replace the old 1195 | # Windows help format (.hlp) on all Windows platforms in the future. Compressed 1196 | # HTML files also contain an index, a table of contents, and you can search for 1197 | # words in the documentation. The HTML workshop also contains a viewer for 1198 | # compressed HTML files. 1199 | # The default value is: NO. 1200 | # This tag requires that the tag GENERATE_HTML is set to YES. 1201 | 1202 | GENERATE_HTMLHELP = NO 1203 | 1204 | # The CHM_FILE tag can be used to specify the file name of the resulting .chm 1205 | # file. You can add a path in front of the file if the result should not be 1206 | # written to the html output directory. 1207 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1208 | 1209 | CHM_FILE = 1210 | 1211 | # The HHC_LOCATION tag can be used to specify the location (absolute path 1212 | # including file name) of the HTML help compiler ( hhc.exe). If non-empty 1213 | # doxygen will try to run the HTML help compiler on the generated index.hhp. 1214 | # The file has to be specified with full path. 1215 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1216 | 1217 | HHC_LOCATION = 1218 | 1219 | # The GENERATE_CHI flag controls if a separate .chi index file is generated ( 1220 | # YES) or that it should be included in the master .chm file ( NO). 1221 | # The default value is: NO. 1222 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1223 | 1224 | GENERATE_CHI = NO 1225 | 1226 | # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) 1227 | # and project file content. 1228 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1229 | 1230 | CHM_INDEX_ENCODING = 1231 | 1232 | # The BINARY_TOC flag controls whether a binary table of contents is generated ( 1233 | # YES) or a normal table of contents ( NO) in the .chm file. 1234 | # The default value is: NO. 1235 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1236 | 1237 | BINARY_TOC = NO 1238 | 1239 | # The TOC_EXPAND flag can be set to YES to add extra items for group members to 1240 | # the table of contents of the HTML help documentation and to the tree view. 1241 | # The default value is: NO. 1242 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1243 | 1244 | TOC_EXPAND = NO 1245 | 1246 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1247 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that 1248 | # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help 1249 | # (.qch) of the generated HTML documentation. 1250 | # The default value is: NO. 1251 | # This tag requires that the tag GENERATE_HTML is set to YES. 1252 | 1253 | GENERATE_QHP = NO 1254 | 1255 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify 1256 | # the file name of the resulting .qch file. The path specified is relative to 1257 | # the HTML output folder. 1258 | # This tag requires that the tag GENERATE_QHP is set to YES. 1259 | 1260 | QCH_FILE = 1261 | 1262 | # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help 1263 | # Project output. For more information please see Qt Help Project / Namespace 1264 | # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). 1265 | # The default value is: org.doxygen.Project. 1266 | # This tag requires that the tag GENERATE_QHP is set to YES. 1267 | 1268 | QHP_NAMESPACE = org.doxygen.Project 1269 | 1270 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt 1271 | # Help Project output. For more information please see Qt Help Project / Virtual 1272 | # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- 1273 | # folders). 1274 | # The default value is: doc. 1275 | # This tag requires that the tag GENERATE_QHP is set to YES. 1276 | 1277 | QHP_VIRTUAL_FOLDER = doc 1278 | 1279 | # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom 1280 | # filter to add. For more information please see Qt Help Project / Custom 1281 | # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- 1282 | # filters). 1283 | # This tag requires that the tag GENERATE_QHP is set to YES. 1284 | 1285 | QHP_CUST_FILTER_NAME = 1286 | 1287 | # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the 1288 | # custom filter to add. For more information please see Qt Help Project / Custom 1289 | # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- 1290 | # filters). 1291 | # This tag requires that the tag GENERATE_QHP is set to YES. 1292 | 1293 | QHP_CUST_FILTER_ATTRS = 1294 | 1295 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1296 | # project's filter section matches. Qt Help Project / Filter Attributes (see: 1297 | # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). 1298 | # This tag requires that the tag GENERATE_QHP is set to YES. 1299 | 1300 | QHP_SECT_FILTER_ATTRS = 1301 | 1302 | # The QHG_LOCATION tag can be used to specify the location of Qt's 1303 | # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the 1304 | # generated .qhp file. 1305 | # This tag requires that the tag GENERATE_QHP is set to YES. 1306 | 1307 | QHG_LOCATION = 1308 | 1309 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be 1310 | # generated, together with the HTML files, they form an Eclipse help plugin. To 1311 | # install this plugin and make it available under the help contents menu in 1312 | # Eclipse, the contents of the directory containing the HTML and XML files needs 1313 | # to be copied into the plugins directory of eclipse. The name of the directory 1314 | # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. 1315 | # After copying Eclipse needs to be restarted before the help appears. 1316 | # The default value is: NO. 1317 | # This tag requires that the tag GENERATE_HTML is set to YES. 1318 | 1319 | GENERATE_ECLIPSEHELP = NO 1320 | 1321 | # A unique identifier for the Eclipse help plugin. When installing the plugin 1322 | # the directory name containing the HTML and XML files should also have this 1323 | # name. Each documentation set should have its own identifier. 1324 | # The default value is: org.doxygen.Project. 1325 | # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. 1326 | 1327 | ECLIPSE_DOC_ID = org.doxygen.Project 1328 | 1329 | # If you want full control over the layout of the generated HTML pages it might 1330 | # be necessary to disable the index and replace it with your own. The 1331 | # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top 1332 | # of each HTML page. A value of NO enables the index and the value YES disables 1333 | # it. Since the tabs in the index contain the same information as the navigation 1334 | # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. 1335 | # The default value is: NO. 1336 | # This tag requires that the tag GENERATE_HTML is set to YES. 1337 | 1338 | DISABLE_INDEX = NO 1339 | 1340 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1341 | # structure should be generated to display hierarchical information. If the tag 1342 | # value is set to YES, a side panel will be generated containing a tree-like 1343 | # index structure (just like the one that is generated for HTML Help). For this 1344 | # to work a browser that supports JavaScript, DHTML, CSS and frames is required 1345 | # (i.e. any modern browser). Windows users are probably better off using the 1346 | # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can 1347 | # further fine-tune the look of the index. As an example, the default style 1348 | # sheet generated by doxygen has an example that shows how to put an image at 1349 | # the root of the tree instead of the PROJECT_NAME. Since the tree basically has 1350 | # the same information as the tab index, you could consider setting 1351 | # DISABLE_INDEX to YES when enabling this option. 1352 | # The default value is: NO. 1353 | # This tag requires that the tag GENERATE_HTML is set to YES. 1354 | 1355 | GENERATE_TREEVIEW = NO 1356 | 1357 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that 1358 | # doxygen will group on one line in the generated HTML documentation. 1359 | # 1360 | # Note that a value of 0 will completely suppress the enum values from appearing 1361 | # in the overview section. 1362 | # Minimum value: 0, maximum value: 20, default value: 4. 1363 | # This tag requires that the tag GENERATE_HTML is set to YES. 1364 | 1365 | ENUM_VALUES_PER_LINE = 4 1366 | 1367 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used 1368 | # to set the initial width (in pixels) of the frame in which the tree is shown. 1369 | # Minimum value: 0, maximum value: 1500, default value: 250. 1370 | # This tag requires that the tag GENERATE_HTML is set to YES. 1371 | 1372 | TREEVIEW_WIDTH = 250 1373 | 1374 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to 1375 | # external symbols imported via tag files in a separate window. 1376 | # The default value is: NO. 1377 | # This tag requires that the tag GENERATE_HTML is set to YES. 1378 | 1379 | EXT_LINKS_IN_WINDOW = NO 1380 | 1381 | # Use this tag to change the font size of LaTeX formulas included as images in 1382 | # the HTML documentation. When you change the font size after a successful 1383 | # doxygen run you need to manually remove any form_*.png images from the HTML 1384 | # output directory to force them to be regenerated. 1385 | # Minimum value: 8, maximum value: 50, default value: 10. 1386 | # This tag requires that the tag GENERATE_HTML is set to YES. 1387 | 1388 | FORMULA_FONTSIZE = 10 1389 | 1390 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images 1391 | # generated for formulas are transparent PNGs. Transparent PNGs are not 1392 | # supported properly for IE 6.0, but are supported on all modern browsers. 1393 | # 1394 | # Note that when changing this option you need to delete any form_*.png files in 1395 | # the HTML output directory before the changes have effect. 1396 | # The default value is: YES. 1397 | # This tag requires that the tag GENERATE_HTML is set to YES. 1398 | 1399 | FORMULA_TRANSPARENT = YES 1400 | 1401 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see 1402 | # http://www.mathjax.org) which uses client side Javascript for the rendering 1403 | # instead of using prerendered bitmaps. Use this if you do not have LaTeX 1404 | # installed or if you want to formulas look prettier in the HTML output. When 1405 | # enabled you may also need to install MathJax separately and configure the path 1406 | # to it using the MATHJAX_RELPATH option. 1407 | # The default value is: NO. 1408 | # This tag requires that the tag GENERATE_HTML is set to YES. 1409 | 1410 | USE_MATHJAX = NO 1411 | 1412 | # When MathJax is enabled you can set the default output format to be used for 1413 | # the MathJax output. See the MathJax site (see: 1414 | # http://docs.mathjax.org/en/latest/output.html) for more details. 1415 | # Possible values are: HTML-CSS (which is slower, but has the best 1416 | # compatibility), NativeMML (i.e. MathML) and SVG. 1417 | # The default value is: HTML-CSS. 1418 | # This tag requires that the tag USE_MATHJAX is set to YES. 1419 | 1420 | MATHJAX_FORMAT = HTML-CSS 1421 | 1422 | # When MathJax is enabled you need to specify the location relative to the HTML 1423 | # output directory using the MATHJAX_RELPATH option. The destination directory 1424 | # should contain the MathJax.js script. For instance, if the mathjax directory 1425 | # is located at the same level as the HTML output directory, then 1426 | # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax 1427 | # Content Delivery Network so you can quickly see the result without installing 1428 | # MathJax. However, it is strongly recommended to install a local copy of 1429 | # MathJax from http://www.mathjax.org before deployment. 1430 | # The default value is: http://cdn.mathjax.org/mathjax/latest. 1431 | # This tag requires that the tag USE_MATHJAX is set to YES. 1432 | 1433 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest 1434 | 1435 | # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax 1436 | # extension names that should be enabled during MathJax rendering. For example 1437 | # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols 1438 | # This tag requires that the tag USE_MATHJAX is set to YES. 1439 | 1440 | MATHJAX_EXTENSIONS = 1441 | 1442 | # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces 1443 | # of code that will be used on startup of the MathJax code. See the MathJax site 1444 | # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an 1445 | # example see the documentation. 1446 | # This tag requires that the tag USE_MATHJAX is set to YES. 1447 | 1448 | MATHJAX_CODEFILE = 1449 | 1450 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box for 1451 | # the HTML output. The underlying search engine uses javascript and DHTML and 1452 | # should work on any modern browser. Note that when using HTML help 1453 | # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) 1454 | # there is already a search function so this one should typically be disabled. 1455 | # For large projects the javascript based search engine can be slow, then 1456 | # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to 1457 | # search using the keyboard; to jump to the search box use + S 1458 | # (what the is depends on the OS and browser, but it is typically 1459 | # , /