├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── .gitignore ├── CONTRIBUTING.md ├── .clang-format ├── CODE_OF_CONDUCT.md ├── README.md ├── src └── String.cpp ├── include └── String.h ├── test └── main.cpp └── Doxyfile /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test/Catch2"] 2 | path = test/Catch2 3 | url = https://github.com/catchorg/Catch2 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | 3 | set(CMAKE_CXX_COMPILER g++) 4 | set(CMAKE_C_COMPILER gcc) 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_BUILD_TYPE Debug) 7 | 8 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -pedantic") 9 | 10 | project(StringTest) 11 | 12 | add_executable(StringTest 13 | test/main.cpp 14 | src/String.cpp 15 | include/String.h 16 | ) 17 | 18 | include_directories(StringTest "./src" "./include") 19 | 20 | project(String) 21 | 22 | add_library(String STATIC 23 | src/String.cpp 24 | include/String.h 25 | ) 26 | 27 | include_directories(StringTest "./src" "./include") 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Lion Kortlepel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This file is used to ignore files which are generated 2 | # ---------------------------------------------------------------------------- 3 | 4 | # manually added 5 | 6 | *.pro 7 | *.data* 8 | vgcore* 9 | 10 | # automatically added 11 | 12 | *~ 13 | *.autosave 14 | *.a 15 | *.core 16 | *.moc 17 | *.o 18 | *.obj 19 | *.orig 20 | *.rej 21 | *.so 22 | *.so.* 23 | *_pch.h.cpp 24 | *_resource.rc 25 | *.qm 26 | .#* 27 | *.*# 28 | core 29 | !core/ 30 | tags 31 | .DS_Store 32 | .directory 33 | *.debug 34 | Makefile* 35 | *.prl 36 | *.app 37 | moc_*.cpp 38 | ui_*.h 39 | qrc_*.cpp 40 | Thumbs.db 41 | *.res 42 | *.rc 43 | /.qmake.cache 44 | /.qmake.stash 45 | 46 | # qtcreator generated files 47 | *.pro.user* 48 | 49 | # xemacs temporary files 50 | *.flc 51 | 52 | # Vim temporary files 53 | .*.swp 54 | 55 | # Visual Studio generated files 56 | *.ib_pdb_index 57 | *.idb 58 | *.ilk 59 | *.pdb 60 | *.sln 61 | *.suo 62 | *.vcproj 63 | *vcproj.*.*.user 64 | *.ncb 65 | *.sdf 66 | *.opensdf 67 | *.vcxproj 68 | *vcxproj.* 69 | 70 | # MinGW generated files 71 | *.Debug 72 | *.Release 73 | 74 | # Python byte code 75 | *.pyc 76 | 77 | # Binaries 78 | # -------- 79 | *.dll 80 | *.exe 81 | 82 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | 4 | 5 | ## What should I know before contributing? 6 | 7 | * The main focus of this project is an intuitive and easy-to-use design. 8 | 9 | * Naming conventions are pretty straightforward: Classes, enums, etc. shall be `CamelCase`, anything else shall be `snake_case`. Private and protected member variables shall have the `m_` prefix. A getter for a private or protected variable shall be the variable name without the `m_` (no `get_` prefix). Setters shall have the `set_` prefix. (just look at the code, its really straightforward) 10 | 11 | * Choose clear and descritive names with as little abbreviation as possible. 12 | 13 | ## What can I contribute / where can I help? 14 | 15 | In general, contribute anything that would be useful to you. Keep in mind that feature-rich != bloated. 16 | 17 | In more detail: 18 | 19 | * Any optimization is welcome (as long as it doesn't break something important). 20 | 21 | * Useful overloads for existing features are welcome. 22 | 23 | * Documentation. Basically every public method needs to be documented at some point. Documentation can be very detailed, as long as it does not go into too much detail about the implementation. 24 | 25 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: WebKit 2 | SpaceBeforeCpp11BracedList: 'true' 3 | AlignEscapedNewlinesLeft: 'true' 4 | AllowShortBlocksOnASingleLine: 'false' 5 | AlwaysBreakBeforeMultilineStrings: 'true' 6 | AlwaysBreakTemplateDeclarations: 'true' 7 | BinPackParameters: 'true' 8 | BreakConstructorInitializersBeforeComma: 'false' 9 | ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' 10 | ConstructorInitializerIndentWidth: '4' 11 | ContinuationIndentWidth: '4' 12 | Cpp11BracedListStyle: 'false' 13 | IndentWidth: '4' 14 | Language: Cpp 15 | MaxEmptyLinesToKeep: '2' 16 | NamespaceIndentation: None 17 | PointerAlignment: Left 18 | Standard: Auto 19 | TabWidth: '4' 20 | UseTab: Never 21 | SpaceBeforeCtorInitializerColon: 'true' 22 | SpaceBeforeInheritanceColon: 'true' 23 | AlignConsecutiveAssignments: 'true' 24 | AlignConsecutiveDeclarations: 'true' 25 | AlignEscapedNewlines: Right 26 | AlignOperands: 'true' 27 | AlignTrailingComments: 'true' 28 | AllowAllConstructorInitializersOnNextLine: 'true' 29 | AllowShortCaseLabelsOnASingleLine: 'false' 30 | AllowShortFunctionsOnASingleLine: Inline 31 | AllowShortIfStatementsOnASingleLine: 'false' 32 | AllowShortLoopsOnASingleLine: 'false' 33 | SortIncludes: 'false' 34 | AccessModifierOffset: -4 35 | SpaceAfterTemplateKeyword: 'false' 36 | BreakBeforeBraces: Custom 37 | BraceWrapping: 38 | AfterFunction: false 39 | AfterClass: true 40 | AfterEnum: true 41 | 42 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at development@kortlepel.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # String v2.0 2 | 3 | Full rewrite of this simple modern String class / library. Incompatible with v1.0 which can be found [here](https://github.com/lionkor/String/tree/legacy-1.0). 4 | 5 | **The v2.0 is not fully done yet** 6 | 7 | Unit tests are in `test/`. 8 | 9 | ## Documentation 10 | 11 | Full documentation can be found here: [**Full documentation**](https://lionkor.github.io/String-docs). 12 | 13 | ## How to use 14 | 15 | There are **2** ways to use this library: 16 | 17 | ### 1 Compile with your project 18 | 19 | 1. clone this repository (recursively). 20 | 2. add `String/include` to your include directories. 21 | 3. include `String.h` and add `String/src/String.cpp` to your source files (for an example look at `CMakeLists.txt`). 22 | 4. compile with at least `-std=c++17`. 23 | 24 | ### 2 Compile as library, link (linux/unix) 25 | 26 | 1. clone this repository (recursively). 27 | 2. go into the cloned repository directory. 28 | 3. run `cmake && make String`. This will create `libString.a`. 29 | 4. add `String/include` to your include directories 30 | 5. link against `libString.a`. 31 | 32 | Example with gcc, assuming `String` was cloned into the same directory that main.cpp is in and libString.a has been built: 33 | ```bash 34 | g++ main.cpp -o myprogram -lString -L./String -I./String/include 35 | ``` 36 | 37 | ## Major features 38 | 39 | * `String::format` - Described below. 40 | * `String::split` - Splits the String into parts, using a char or String as delimiter. 41 | * `String::replace` - Replaces all instances of a char or String with another char or String. 42 | * `String::startswith` - Tests whether the String starts with another substring. 43 | * `String::endswith` - Tests whether the String ends with another substring. 44 | * `String::insert` and `String::erase` - Inserts or erases chars or Strings into or from the String. 45 | 46 | For the full list of functions and features, check out the [documentation](https://lionkor.github.io/String-docs). 47 | 48 | ### String::format 49 | A static method allowing for simple and fast formatting. Allows any type `T` with an overload to `ostream& operator(ostream&, T)` to be formatted into the String correctly. 50 | Because of this, it also supports all primitive types. 51 | 52 | Examples: 53 | 54 | ```cpp 55 | const char* name = "Dave"; 56 | const int age = 35; 57 | String test = String::format("Name: ", name, ", Age: ", age); 58 | // -> "Name: Dave, City: New York, Age: 35" 59 | ``` 60 | 61 | If your type correctly overloads `ostream& operator(ostream&, T)`, you can pass your type to `String::format`. 62 | 63 | You can pass a `String::Format` instance to set formatting options similar to `std::ios::fmtflags`. This allows setting precision, base, width, fill, etc. 64 | 65 | Example: 66 | ```cpp 67 | String::Format fmt; 68 | fmt.precision = 3; 69 | fmt.width = 10; 70 | fmt.alignment = String::Format::Align::Right; 71 | String my_string = String::format(".", fmt, 3.53214, " |", fmt, 5.2436, " |"); 72 | std::cout << my_string << std::endl; 73 | ``` 74 | will output: 75 | ``` 76 | . 3.53 | 5.24 | 77 | ``` 78 | 79 | ## FAQ 80 | 81 | ### How do you run the tests? 82 | 83 | After cloning the repo, head into the cloned String directory and run `cmake` and then `make StringTest`. You can then execute `./StringTest`. 84 | 85 | ### Is std::string not good? 86 | 87 | `std::string` is very good. Still, I always thought its interface was very inconsistent, using iterators here and indices there, and following very few std library conventions. 88 | `String` is supposed to allow for more Python- or C#-like string interactions, making it feel more like a primitive type than a complicated container, yet also supporting it being treated just like a normal `std::vector`. 89 | 90 | TL;DR: I just want a string that gives me an iterator when I call `String::find` and has intuitive methods like `.replace` and `.split`. 91 | 92 | ### Is it faster / slower than std::string? 93 | 94 | Generally, it's *probably* slower, as is to be expected at this point in development. Construction is just as fast as `std::string`, for any string long enough so that SSO doesn't kick in for `std::string`. This is not a performance library, it's a convenience library. If you think `std::vector` is fast enough, then this library is probably fast enough. 95 | 96 | ### How do you convert to std::string or char\*? 97 | 98 | Since `String` is not null-terminated, conversion is rather slow. 99 | Options for conversion are, from fastest to slowest: 100 | 101 | 1. Append `'\0'`, access `String::data()`, do stuff, then `String::erase` the `'\0'`. This is super fast, won't copy any data, and you can just use it like a regular `const char*`. 102 | This is only useful if the String is only used by one thread and is not `const`. 103 | **Attention:** This will cause huge troubles if you attempt to use the String after adding a `'\0'` *without erasing it again*, as the size will have increased by one (since we treat `'\0'` as a normal character). 104 | This is the fastest, but also the most error-prone way. Not recommended. 105 | 106 | 2. Use `String::to_std_string`. This copies the data into a `std::string`, which might be faster than method nr. 3, as this might use SSO. The returned `std::string` is a copy. 107 | 108 | 3. Use `String::to_c_string`. This allocates a buffer with `new[]`, wraps it in a `std::unique_ptr`, copies the chars into it and returns that `std::unique_ptr`. You can then access the `char*` with `.get()`. This is probably the slowest way, but it will give you back a self-memory-managing buffer, so it's pretty neat. I was thinking about a raw pointer return, but that just *wants* to leak memory. 109 | 110 | For more information on those functions read the [documentation](https://lionkor.github.io/String-docs). 111 | 112 | ### Why std::vector? 113 | I **don't** like `std::string`, I **do** like `std::vector`. 114 | 115 | ### Where did open issues go? 116 | 117 | Closed, since the code that was responsible for them was nuked. 118 | -------------------------------------------------------------------------------- /src/String.cpp: -------------------------------------------------------------------------------- 1 | #include "String.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | String::String() { } 10 | 11 | String::String(std::nullptr_t) { } 12 | 13 | String::String(char c) { 14 | m_chars.push_back(c); 15 | } 16 | 17 | String::String(const char* cstr) 18 | : m_chars(cstr, cstr + std::strlen(cstr)) { 19 | } 20 | 21 | String::String(String::ConstIterator from, String::ConstIterator to) 22 | : m_chars(from, to) { 23 | } 24 | 25 | String::operator std::string() const { 26 | return to_std_string(); 27 | } 28 | 29 | String::Iterator String::begin() { 30 | return m_chars.begin(); 31 | } 32 | 33 | String::Iterator String::end() { 34 | return m_chars.end(); 35 | } 36 | 37 | String::ConstIterator String::begin() const { 38 | return m_chars.begin(); 39 | } 40 | 41 | String::ConstIterator String::end() const { 42 | return m_chars.end(); 43 | } 44 | 45 | char& String::at(std::size_t i) { 46 | return m_chars.at(i); 47 | } 48 | 49 | bool String::empty() const noexcept { 50 | return m_chars.empty(); 51 | } 52 | 53 | std::size_t String::size() const noexcept { 54 | return m_chars.size(); 55 | } 56 | 57 | std::size_t String::length() const noexcept { 58 | return m_chars.size(); 59 | } 60 | 61 | char String::at(std::size_t i) const { 62 | return m_chars.at(i); 63 | } 64 | 65 | std::unique_ptr String::to_c_string() const { 66 | auto ptr = std::unique_ptr(new char[m_chars.size() + 1]); 67 | std::copy_n(m_chars.data(), m_chars.size(), ptr.get()); 68 | ptr.get()[m_chars.size()] = '\0'; 69 | return ptr; 70 | } 71 | 72 | std::string String::to_std_string() const { 73 | return std::string(m_chars.begin(), m_chars.end()); 74 | } 75 | 76 | void String::clear() noexcept { 77 | m_chars.clear(); 78 | } 79 | 80 | void String::insert(String::ConstIterator iter, const String& s) { 81 | if (iter > end()) 82 | throw std::runtime_error("iterator out of range"); 83 | m_chars.insert(iter, s.begin(), s.end()); 84 | } 85 | 86 | void String::insert(String::ConstIterator iter, String::ConstIterator begin, String::ConstIterator end) { 87 | if (iter > this->end()) 88 | throw std::runtime_error("iterator out of range"); 89 | m_chars.insert(iter, begin, end); 90 | } 91 | 92 | void String::insert(String::ConstIterator iter, char c) { 93 | if (iter > end()) 94 | throw std::runtime_error("iterator out of range"); 95 | m_chars.insert(iter, c); 96 | } 97 | 98 | void String::erase(String::ConstIterator iter) { 99 | if (iter < begin() || iter > end() || empty() || iter == end()) 100 | throw std::runtime_error("iterator out of range"); 101 | m_chars.erase(iter); 102 | } 103 | 104 | void String::erase(String::ConstIterator from, String::ConstIterator to) { 105 | if (from < begin() || from > end() || empty() || from == end() || to < begin() || to > end() || to < from) 106 | throw std::runtime_error("iterator out of range"); 107 | m_chars.erase(from, to); 108 | } 109 | 110 | void String::erase(String::ConstIterator iter, std::size_t n) { 111 | erase(iter, iter + n); 112 | } 113 | 114 | String String::substring(String::ConstIterator from, String::ConstIterator to) const { 115 | return String(from, to); 116 | } 117 | 118 | String String::substring(String::ConstIterator start, std::size_t n) const { 119 | return String(start, start + n); 120 | } 121 | 122 | String::Iterator String::find(char c) { 123 | return std::find(m_chars.begin(), m_chars.end(), c); 124 | } 125 | 126 | String::ConstIterator String::find(char c) const { 127 | return std::find(m_chars.begin(), m_chars.end(), c); 128 | } 129 | 130 | String::Iterator String::find(char c, String::Iterator start) { 131 | return std::find(start, m_chars.end(), c); 132 | } 133 | 134 | String::ConstIterator String::find(char c, String::ConstIterator start) const { 135 | return std::find(start, m_chars.end(), c); 136 | } 137 | 138 | String::Iterator String::find(const String& str) { 139 | return std::search(begin(), end(), str.begin(), str.end()); 140 | } 141 | 142 | String::ConstIterator String::find(const String& str) const { 143 | return std::search(begin(), end(), str.begin(), str.end()); 144 | } 145 | 146 | String::Iterator String::find(const String& str, Iterator start) { 147 | return std::search(start, end(), str.begin(), str.end()); 148 | } 149 | 150 | String::ConstIterator String::find(const String& str, String::ConstIterator start) const { 151 | return std::search(start, end(), str.begin(), str.end()); 152 | } 153 | 154 | bool String::contains(const String& str) const { 155 | if (str.size() > size()) 156 | return false; 157 | return find(str) != end(); 158 | } 159 | 160 | bool String::startswith(const String& str) const { 161 | if (str.size() > size()) 162 | return false; 163 | return std::equal(begin(), begin() + str.size(), str.begin(), str.end()); 164 | } 165 | 166 | bool String::endswith(const String& str) const { 167 | if (str.size() > size()) 168 | return false; 169 | return std::equal(end() - str.size(), end(), str.begin(), str.end()); 170 | } 171 | 172 | bool String::equals(const String& str) const { 173 | if (size() != str.size()) 174 | return false; 175 | return std::equal(begin(), end(), str.begin(), str.end()); 176 | } 177 | 178 | bool String::operator==(const String& s) const { 179 | return equals(s); 180 | } 181 | 182 | bool String::operator!=(const String& s) const { 183 | return !equals(s); 184 | } 185 | 186 | String& String::operator+=(const String& s) { 187 | insert(end(), s); 188 | return *this; 189 | } 190 | 191 | String String::operator+(const String& s) const { 192 | String result = *this; 193 | result.insert(result.end(), s); 194 | return result; 195 | } 196 | 197 | void String::replace(char to_replace, char replace_with) { 198 | for (auto& c : m_chars) 199 | if (c == to_replace) 200 | c = replace_with; 201 | } 202 | 203 | void String::replace(const String& to_replace, const String& replace_with) { 204 | if (!to_replace.empty() && replace_with.find(to_replace) != replace_with.end()) 205 | throw std::invalid_argument("replace_with shall not contain to_replace"); 206 | Iterator iter; 207 | do { 208 | iter = std::search(begin(), end(), to_replace.begin(), to_replace.end()); 209 | if (iter != end()) { 210 | erase(iter, to_replace.size()); 211 | insert(iter, replace_with); 212 | } 213 | } while (iter != end()); 214 | } 215 | 216 | void String::replace(const String& to_replace, const String& replace_with, std::size_t n) { 217 | if (!to_replace.empty() && replace_with.find(to_replace) != replace_with.end()) 218 | throw std::invalid_argument("replace_with shall not contain to_replace"); 219 | Iterator iter; 220 | std::size_t i = 0; 221 | do { 222 | if (i >= n) 223 | break; 224 | ++i; 225 | iter = std::search(begin(), end(), to_replace.begin(), to_replace.end()); 226 | if (iter != end()) { 227 | erase(iter, to_replace.size()); 228 | insert(iter, replace_with); 229 | } 230 | } while (iter != end()); 231 | } 232 | 233 | std::vector String::split(char delim, std::size_t expected_splits) const { 234 | std::vector result; 235 | result.reserve(expected_splits); 236 | // FIXME: is this undefined? 237 | auto last_iter = begin() - 1; 238 | auto iter = find(delim); 239 | while (last_iter != end()) { 240 | // +1 skips the delimiter itself 241 | result.push_back(String(last_iter + 1, iter)); 242 | last_iter = iter; 243 | iter = find(delim, iter + 1); 244 | } 245 | return result; 246 | } 247 | 248 | std::vector String::split(const String& delim, std::size_t expected_splits) const { 249 | if (delim.empty()) 250 | throw std::runtime_error("empty delimiter"); 251 | std::vector result; 252 | result.reserve(expected_splits); 253 | // FIXME: is this undefined? 254 | auto last_iter = begin() - delim.size(); 255 | auto iter = find(delim); 256 | while (last_iter != end()) { 257 | // + delim.size() skips the delimiter itself 258 | result.push_back(String(last_iter + delim.size(), iter)); 259 | last_iter = iter; 260 | iter = find(delim, iter + delim.size()); 261 | } 262 | return result; 263 | } 264 | 265 | void String::reserve(std::size_t size) { 266 | m_chars.reserve(size); 267 | } 268 | 269 | std::size_t String::capacity() const { 270 | return m_chars.capacity(); 271 | } 272 | 273 | void String::shrink_to_fit() noexcept { 274 | m_chars.shrink_to_fit(); 275 | } 276 | 277 | char* String::data() noexcept { 278 | return m_chars.data(); 279 | } 280 | 281 | const char* String::data() const noexcept { 282 | return m_chars.data(); 283 | } 284 | 285 | std::ostream& operator<<(std::ostream& os, const String& s) { 286 | return os << s.to_std_string(); 287 | } 288 | 289 | std::istream& operator>>(std::istream& is, String& s) { 290 | const auto len = is.rdbuf()->pubseekoff(0, std::ios::end); 291 | is.rdbuf()->pubseekoff(0, std::ios::beg); 292 | const auto offset = s.m_chars.size(); 293 | s.m_chars.resize(s.m_chars.size() + len); 294 | auto ret = is.rdbuf()->sgetn(s.m_chars.data() + offset, len); 295 | static_cast(ret); 296 | is.rdbuf()->pubseekoff(0, std::ios::end); 297 | return is; 298 | } 299 | 300 | std::ostream& operator<<(std::ostream& os, const String::Format& fmt) { 301 | switch (fmt.alignment) { 302 | case String::Format::Align::Left: 303 | os << std::left; 304 | break; 305 | case String::Format::Align::Right: 306 | os << std::right; 307 | } 308 | 309 | os << std::setprecision(fmt.precision) 310 | << std::setbase(fmt.base) 311 | << std::setw(fmt.width) 312 | << std::setfill(fmt.fill); 313 | 314 | return os; 315 | } 316 | -------------------------------------------------------------------------------- /include/String.h: -------------------------------------------------------------------------------- 1 | #ifndef STRING_H 2 | #define STRING_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | /// \brief The String class represents a not-null-terminated string. 12 | /// \author `lionkor` (Lion Kortlepel) 13 | /// 14 | /// A String class without many of the inconsistencies that `std::string` brings, and many helper 15 | /// functions, making it more alike Python or .NET strings. 16 | /// 17 | /// Implemented as a wrapper around a `std::vector` for safety, simplicity and speed. 18 | /// This means that any `` calls should work as expected. 19 | /// 20 | /// \attention String is \b not null-terminated. If a null-terminated string is needed, it's very simple 21 | /// to convert to a `std::string` or c-string via `String::to_c_string` and `String::to_std_string`. 22 | class String 23 | { 24 | private: 25 | std::vector m_chars; 26 | 27 | public: 28 | /// \brief Iterators used to iterate over the String. 29 | /// \attention Do *not* rely on these iterators being aliases for 30 | /// std::vector iterators. This might change at any point. Treat them as 31 | /// their own types. 32 | using Iterator = std::vector::iterator; 33 | using ConstIterator = std::vector::const_iterator; 34 | using ReverseIterator = std::vector::reverse_iterator; 35 | using ConstReverseIterator = std::vector::const_reverse_iterator; 36 | 37 | /// \brief New empty string, equivalent to `""`. 38 | String(); 39 | /// \brief New string from nullptr -> empty string. 40 | String(std::nullptr_t); 41 | /// \brief New string with only the char `c`. 42 | explicit String(char c); 43 | /// \brief New string with cstr as content 44 | String(const char* cstr); 45 | /// \brief New string from another string's iterators. 46 | String(ConstIterator from, ConstIterator to); 47 | 48 | String(const String&) = default; 49 | String(String&&) = default; 50 | String& operator=(const String&) = default; 51 | 52 | /// \brief Implicit conversion to std::string allowed. 53 | operator std::string() const; 54 | 55 | /// \brief Begin iterator. Points to the first char in the string. 56 | Iterator begin(); 57 | /// \brief Const begin iterator. Points to the first char in the string. 58 | ConstIterator begin() const; 59 | /// \brief End iterator. points at the position past the end of the string. 60 | Iterator end(); 61 | /// \brief Const end iterator. points at the position past the end of the string. 62 | ConstIterator end() const; 63 | /// \brief Accesses the character at position `i` in the string. 64 | /// \throw std::out_of_range if `i` is an invalid index 65 | char& at(std::size_t i); 66 | /// \brief Accesses the character at position i in the string. 67 | /// \throw std::out_of_range if `i` is an invalid index 68 | char at(std::size_t i) const; 69 | /// \brief True if the string is empty, i.e. has length 0 70 | bool empty() const noexcept; 71 | /// \brief Size or length of the string. 72 | std::size_t size() const noexcept; 73 | /// \brief Length or size of the string. 74 | std::size_t length() const noexcept; 75 | 76 | /// \brief A unique_ptr managed char[] containing a copy of the data of the string, 77 | /// guaranteed to be null-terminated. 78 | std::unique_ptr to_c_string() const; 79 | /// \brief A copy of this string represented as a std::string. 80 | std::string to_std_string() const; 81 | 82 | /// \brief Clears the contents of the string, resulting string will be the empty string. 83 | void clear() noexcept; 84 | 85 | /// \brief Inserts a char before the position pointed to by the iterator. May invalidate 86 | /// iterators. 87 | void insert(ConstIterator iter, char c); 88 | /// \brief Inserts the string before the position pointed to by the iterator. May invalidate 89 | /// iterators. 90 | void insert(ConstIterator iter, const String& s); 91 | /// \brief Inserts the part of the string specified by the begin and end iterators 92 | /// before the position pointed to by the "iter" iterator. May invalidate iterators. 93 | void insert(ConstIterator iter, ConstIterator begin, ConstIterator end); 94 | 95 | /// \brief Removes the element pointed to by the iterator. Invalidates iterators. 96 | void erase(ConstIterator iter); 97 | /// \brief Removes elements between from and to. Invalidates iterators. 98 | void erase(ConstIterator from, ConstIterator to); 99 | /// \brief Removes n elements starting at the iterator position. Invalidates iterators. 100 | void erase(ConstIterator iter, std::size_t n); 101 | 102 | /// \brief A copy of the chars between from and to, as a new string. 103 | String substring(ConstIterator from, ConstIterator to) const; 104 | /// \brief A copy of the first n chars from start, as a new string. 105 | String substring(ConstIterator start, std::size_t n) const; 106 | 107 | /// \brief Finds the first occurance of char c in the string. Returns end() if nothing was 108 | /// found. 109 | /// \arg `c` character to find, case-sensitive. 110 | /// \return String::Iterator pointing to the found character, or end() if nothing was found. 111 | Iterator find(char c); 112 | /// \brief Finds the first occurance of char c in the string. Returns end() if nothing was 113 | /// found. 114 | /// \arg `c` character to find, case-sensitive. 115 | /// \return String::ConstIterator pointing to the found character, or end() if nothing was found. 116 | ConstIterator find(char c) const; 117 | /// \brief Finds the first occurance of char c in the string after `start`. Returns end() if nothing was 118 | /// found. 119 | /// \arg `c` character to find, case-sensitive. 120 | /// \arg `start` position from which to search from. 121 | /// \return String::Iterator pointing to the found character, or end() if nothing was found. 122 | Iterator find(char c, Iterator start); 123 | /// \brief Finds the first occurance of char c in the string after `start`. Returns end() if nothing was 124 | /// found. 125 | /// \arg `c` character to find, case-sensitive. 126 | /// \arg `start` position from which to search from. 127 | /// \return String::ConstIterator pointing to the found character, or end() if nothing was found. 128 | ConstIterator find(char c, ConstIterator start) const; 129 | 130 | /// \brief Finds the first occurance of the string inside this string. 131 | /// \return String::Iterator pointing to the beginning of the found substring, or end() if 132 | /// nothing was found 133 | Iterator find(const String&); 134 | /// \brief Finds the first occurance of the string inside this string. 135 | /// \return String::ConstIterator pointing to the beginning of the found substring, or end() if 136 | /// nothing was found 137 | ConstIterator find(const String&) const; 138 | /// \brief Finds the first occurance of the string after `start` inside this string. 139 | /// \return String::Iterator pointing to the beginning of the found substring, or end() if 140 | /// nothing was found 141 | Iterator find(const String&, Iterator start); 142 | /// \brief Finds the first occurance of the string after `start` inside this string. 143 | /// \return String::ConstIterator pointing to the beginning of the found substring, or end() if 144 | /// nothing was found 145 | ConstIterator find(const String&, ConstIterator start) const; 146 | 147 | /// \brief Whether this string contains the substring. 148 | bool contains(const String&) const; 149 | /// \brief Whether this string starts with the substring. 150 | bool startswith(const String&) const; 151 | /// \brief Whether this string ends with the substring. 152 | bool endswith(const String&) const; 153 | 154 | /// \brief Does a case-sensitive comparison between the chars of both strings. 155 | /// Same as String::operator==(const String&). 156 | bool equals(const String&) const; 157 | /// \brief Does a case-sensitive comparison between the chars of both strings. 158 | bool operator==(const String&) const; 159 | /// \brief Does a case-sensitive comparison between the chars of both strings. 160 | bool operator!=(const String&) const; 161 | 162 | /// \brief Appends the given string to this string. 163 | String& operator+=(const String&); 164 | /// \brief Creates a new string by appending a string to this string. 165 | String operator+(const String&) const; 166 | 167 | /// \brief Replaces \b all instances of `to_replace` with `replace_with` in the string. 168 | void replace(char to_replace, char replace_with); 169 | /// \brief Replaces \b all instances of `to_replace` with `replace_with` in the string. 170 | void replace(const String& to_replace, const String& replace_with); 171 | /// \brief Replaces `n` instances of `to_replace` with `replace_with` in the string. 172 | void replace(const String& to_replace, const String& replace_with, std::size_t n); 173 | 174 | /// \brief Splits the String into substrings delimited by `delim`. 175 | /// 176 | /// \arg `delim` delimiter to be used 177 | /// \arg `expected_splits` how many parts are expected. Setting this to a reasonable 178 | /// amount will speed up the split operation as memory can be reserved beforehand. 179 | std::vector split(char delim, std::size_t expected_splits = 2) const; 180 | /// \brief Splits the String into substrings delimited by the String `delim`. 181 | /// 182 | /// \arg `delim` delimiter string to be used 183 | /// \arg `expected_splits` how many parts are expected. Setting this to a reasonable 184 | /// amount will speed up the split operation as memory can be reserved beforehand. 185 | std::vector split(const String& delim, std::size_t expected_splits = 2) const; 186 | 187 | /// \brief Grows the capacity to fit `size` many characters. Does not change the size of the string. 188 | /// 189 | /// Increases the capacity of the currently allocated memory to be able to hold `size` many 190 | /// characters before having to reallocate. Calling this before doing a lot of appending up to a known 191 | /// max length can increase performance significantly, as multiple allocations are avoided. 192 | /// Does not impact length. 193 | void reserve(std::size_t size); 194 | 195 | /// \brief Capacity of the string's underlying allocated memory. 196 | /// 197 | /// The String's size may grow up to this capacity without any reallocation taking place. 198 | std::size_t capacity() const; 199 | 200 | /// \brief Shrinks capacity to be equal to size, thus freeing memory in some cases. Not 201 | /// guaranteed, as it's implementation dependent. 202 | void shrink_to_fit() noexcept; 203 | 204 | /// \brief Raw pointer to the data of this String. 205 | /// Keep in mind that this is NOT null-terminated. 206 | char* data() noexcept; 207 | /// \brief Raw const pointer to the data of this String. 208 | /// Keep in mind that this is NOT null-terminated. 209 | const char* data() const noexcept; 210 | 211 | friend std::ostream& operator<<(std::ostream&, const String&); 212 | friend std::istream& operator>>(std::istream& is, String& s); 213 | 214 | /// \brief Constructs a string from non-string arguments. 215 | /// 216 | /// Accepts and correctly formats any type `T` for which an overload for 217 | /// 218 | /// std::ostream& operator<<(std::ostream&, T) 219 | /// 220 | /// exists. Arguments will be appended to the String in order. 221 | /// Pass String::Format to specify floating point precision, width, fill 222 | /// chars, base, etc. 223 | template 224 | static String format(Args&&... things) { 225 | std::stringstream s; 226 | return format(s, std::forward(things)...); 227 | } 228 | 229 | /// \brief Specifies the formatting of a String::format operation. 230 | /// 231 | /// Example 232 | /// 233 | /// String::Format fmt; 234 | /// fmt.precision = 3; 235 | /// String my_string = String::format(fmt, 2.1337); 236 | /// 237 | /// will result in 238 | /// 239 | /// my_string = "2.13" 240 | /// 241 | struct Format { 242 | enum Align : bool 243 | { 244 | Left, 245 | Right 246 | }; 247 | 248 | enum Base 249 | { 250 | Oct = 8, 251 | Dec = 10, 252 | Hex = 16, 253 | }; 254 | 255 | /// \brief The precision (i.e. how many digits are generated) of floating 256 | /// point numbers output with this format. See `std::ios::precision`. 257 | int precision { 6 }; 258 | /// \brief The base used to display integer types. See `std::ios::base`. 259 | Base base { Base::Dec }; 260 | /// \brief Alignment used with width. See `std::ios::left` and `std::ios::right`. 261 | Align alignment { Align::Left }; 262 | /// \brief Width used on some format operations. See `std::ios::width`. 263 | int width { 0 }; 264 | /// \brief Filler used to fill whitespace in width formats. See `std::ios::fill`. 265 | char fill { ' ' }; 266 | 267 | friend std::ostream& operator<<(std::ostream&, const Format&); 268 | }; 269 | 270 | private: 271 | static String format(std::stringstream& is) { 272 | String s; 273 | is >> s; 274 | return s; 275 | } 276 | 277 | template 278 | static String format(std::stringstream& is, T&& t, Args&&... things) { 279 | is << t; 280 | return format(is, std::forward(things)...); 281 | } 282 | }; 283 | 284 | 285 | /// \brief Null-terminated, fully constexpr string that will almost completely disappear with 286 | /// compiler optimizations turned on. 287 | /// 288 | /// To be used for string constants, as it's as fast as declaring a `const char*` 289 | /// but knows its own size and can be compared with operator==, which is optimized 290 | /// into constants at compile-time. 291 | class ConstString 292 | { 293 | private: 294 | const char* m_buffer; 295 | const std::size_t m_size; 296 | 297 | static constexpr std::size_t length(const char* str) { 298 | return *str ? 1 + length(str + 1) : 0; 299 | } 300 | 301 | public: 302 | /// \brief Initialization with nullptr is not allowed. 303 | constexpr ConstString(std::nullptr_t) = delete; 304 | /// \brief New ConstString from a string literal. 305 | constexpr ConstString(const char*&& buffer) 306 | : m_buffer(buffer) 307 | , m_size(length(buffer)) { 308 | } 309 | 310 | /// \brief Size, aka length, of the string. 311 | constexpr auto size() const { return m_size; } 312 | /// \brief Length, aka size, of the string. 313 | constexpr auto length() const { return m_size; } 314 | 315 | /// \brief Allows implicit conversion to `const char*`. 316 | constexpr operator const char*() const { return m_buffer; } 317 | 318 | /// \brief Comparison with other `char*`-like types. 319 | template 320 | constexpr bool operator==(const T str) const { 321 | return std::strcmp(m_buffer, str) == 0; 322 | } 323 | 324 | /// \brief Comparison with the String type. 325 | bool operator==(const String& str) const { 326 | return m_size != str.size() || std::strncmp(m_buffer, str.data(), m_size) == 0; 327 | } 328 | }; 329 | 330 | #endif // STRING_H 331 | -------------------------------------------------------------------------------- /test/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../include/String.h" 5 | 6 | //* 7 | 8 | #define CATCH_CONFIG_MAIN 9 | #include "Catch2/single_include/catch2/catch.hpp" 10 | 11 | TEST_CASE("String::split char") { 12 | String s0(";1;2;3;4;"); 13 | std::vector result = s0.split(';', 4); 14 | REQUIRE(result.size() == 6); 15 | REQUIRE(result.at(0) == ""); 16 | REQUIRE(result.at(1) == "1"); 17 | REQUIRE(result.at(2) == "2"); 18 | REQUIRE(result.at(3) == "3"); 19 | REQUIRE(result.at(4) == "4"); 20 | REQUIRE(result.at(5) == ""); 21 | 22 | 23 | String s1("Hello, World"); 24 | REQUIRE(s1.split('X').at(0) == s1); 25 | 26 | String s2("name=String"); 27 | std::vector splits = s2.split('='); 28 | REQUIRE(splits.at(0) == "name"); 29 | REQUIRE(splits.at(1) == "String"); 30 | 31 | String s3(";;g;;"); 32 | REQUIRE(s3.split(';').at(2) == "g"); 33 | } 34 | 35 | TEST_CASE("String::split String") { 36 | String s0(";1;2;3;4;"); 37 | std::vector result = s0.split(";", 4); 38 | 39 | String s1("Hello, World"); 40 | std::vector splits = s1.split(", "); 41 | REQUIRE(splits.at(0) == "Hello"); 42 | REQUIRE(splits.at(1) == "World"); 43 | 44 | String s2("Hello, World"); 45 | REQUIRE_THROWS(splits = s2.split("")); 46 | } 47 | 48 | TEST_CASE("String::format") { 49 | REQUIRE(String::format("Hello") == "Hello"); 50 | REQUIRE(String::format("Hello ", "World") == "Hello World"); 51 | REQUIRE(String::format(1, 2, 3) == "123"); 52 | REQUIRE(String::format(1.0) == "1"); 53 | 54 | String::Format fmt; 55 | fmt.precision = 1; 56 | REQUIRE(String::format(fmt, 1.0 / 3.0) == "0.3"); 57 | fmt.precision = 2; 58 | REQUIRE(String::format(fmt, 1.0 / 3.0) == "0.33"); 59 | fmt.base = String::Format::Base::Hex; 60 | REQUIRE(String::format(fmt, 0xf) == "f"); 61 | fmt.base = String::Format::Base::Oct; 62 | REQUIRE(String::format(fmt, 03562) == "3562"); 63 | REQUIRE(String::format(fmt, 10) == "12"); 64 | 65 | String::Format fmt2; 66 | fmt2.width = 4; 67 | REQUIRE(String::format(fmt2, "12", fmt2, "5") == "12 5 "); 68 | fmt2.alignment = String::Format::Align::Right; 69 | REQUIRE(String::format(fmt2, "12", fmt2, "5") == " 12 5"); 70 | fmt2.fill = '-'; 71 | REQUIRE(String::format(fmt2, "12", fmt2, "5") == "--12---5"); 72 | 73 | REQUIRE(String::format(String(), String()) == ""); 74 | std::string s("Hello"); 75 | REQUIRE(String::format(s, String("World")) == "HelloWorld"); 76 | const char* cstr = "Wonder"; 77 | REQUIRE(String::format(cstr, "ful day") == "Wonderful day"); 78 | REQUIRE(String::format("My name is ", "String", " and my age is ", 560) == "My name is String and my age is 560"); 79 | } 80 | 81 | TEST_CASE("String::String") { 82 | REQUIRE_NOTHROW(String()); 83 | REQUIRE_NOTHROW(String("")); 84 | REQUIRE_NOTHROW(String(nullptr)); 85 | String s0; 86 | REQUIRE_NOTHROW(String(std::move(s0))); 87 | REQUIRE_NOTHROW(String(String())); 88 | 89 | String s1; 90 | REQUIRE(s1.size() == s1.length()); 91 | REQUIRE(s1.size() == 0); 92 | 93 | String s2("Hello"); 94 | REQUIRE(s2.size() == s2.length()); 95 | REQUIRE(s2.size() == 5); 96 | 97 | String s3("What a wonderful world"); 98 | String s4(s3.begin() + 7, s3.end() - 6); 99 | REQUIRE(s4 == "wonderful"); 100 | 101 | String s5('v'); 102 | REQUIRE(s5 == "v"); 103 | } 104 | 105 | TEST_CASE("String::begin and String::end") { 106 | String s1("Hello, World"); 107 | REQUIRE(*s1.begin() == 'H'); 108 | REQUIRE(*(s1.end() - 1) == 'd'); 109 | 110 | const String s2("Bye!"); 111 | REQUIRE(*s2.begin() == 'B'); 112 | REQUIRE(*(s2.end() - 1) == '!'); 113 | } 114 | 115 | TEST_CASE("String::empty") { 116 | String s_empty; 117 | String s_notempty("What a wonderful world!"); 118 | REQUIRE(s_empty.empty()); 119 | REQUIRE_FALSE(s_notempty.empty()); 120 | } 121 | 122 | TEST_CASE("String::at") { 123 | String s1("A String"); 124 | REQUIRE(s1.at(0) == 'A'); 125 | REQUIRE(s1.at(s1.size() - 1) == 'g'); 126 | REQUIRE_THROWS(s1.at(100)); 127 | REQUIRE_THROWS(s1.at(s1.size())); 128 | } 129 | 130 | TEST_CASE("String::to_c_string, empty") { 131 | String s1; 132 | auto cstr = s1.to_c_string(); 133 | REQUIRE(std::strcmp(cstr.get(), "") == 0); 134 | } 135 | 136 | TEST_CASE("String::to_c_string, not empty") { 137 | String s1("Hello!"); 138 | auto cstr = s1.to_c_string(); 139 | REQUIRE(std::strcmp(cstr.get(), "Hello!") == 0); 140 | } 141 | 142 | TEST_CASE("String::to_std_string, empty") { 143 | String s1; 144 | std::string str = s1.to_std_string(); 145 | REQUIRE(str.empty()); 146 | } 147 | 148 | TEST_CASE("String::to_std_string, not empty") { 149 | String s1("std string sucks!"); 150 | std::string str = s1.to_std_string(); 151 | REQUIRE(str == "std string sucks!"); 152 | } 153 | 154 | TEST_CASE("String::insert char, empty") { 155 | String s1; 156 | s1.insert(s1.begin(), 'X'); 157 | REQUIRE_NOTHROW(s1.at(0)); 158 | REQUIRE(s1.at(0) == 'X'); 159 | } 160 | 161 | TEST_CASE("String::insert char, not empty") { 162 | // insert middle 163 | String s1("life is pain"); 164 | s1.insert(s1.begin() + 4, 'X'); 165 | REQUIRE_NOTHROW(s1.at(4)); 166 | REQUIRE(s1.at(4) == 'X'); 167 | REQUIRE(s1.to_std_string() == "lifeX is pain"); 168 | // insert end 169 | s1.insert(s1.end(), 'L'); 170 | REQUIRE(s1.to_std_string() == "lifeX is painL"); 171 | // insert begin 172 | s1.insert(s1.begin(), 'e'); 173 | REQUIRE(s1.to_std_string() == "elifeX is painL"); 174 | // errors 175 | REQUIRE_THROWS(s1.insert(s1.end() + 1, 'X')); 176 | } 177 | 178 | TEST_CASE("String::insert String, empty") { 179 | String s1; 180 | s1.insert(s1.begin(), "XYZ"); 181 | REQUIRE_NOTHROW(s1.at(0)); 182 | REQUIRE(s1.size() == 3); 183 | REQUIRE(s1.at(0) == 'X'); 184 | REQUIRE(s1.at(1) == 'Y'); 185 | REQUIRE(s1.at(2) == 'Z'); 186 | REQUIRE(s1.to_std_string() == "XYZ"); 187 | } 188 | 189 | TEST_CASE("String::insert String, not empty") { 190 | String s1("life is pain"); 191 | // insert middle 192 | s1.insert(s1.begin() + 4, "XYZ"); 193 | REQUIRE(s1.to_std_string() == "lifeXYZ is pain"); 194 | // insert end 195 | s1.insert(s1.end(), "lmnop"); 196 | REQUIRE(s1.to_std_string() == "lifeXYZ is painlmnop"); 197 | // insert begin 198 | s1.insert(s1.begin(), "okok"); 199 | REQUIRE(s1.to_std_string() == "okoklifeXYZ is painlmnop"); 200 | // errors 201 | REQUIRE_THROWS(s1.insert(s1.end() + 1, "nice")); 202 | } 203 | 204 | TEST_CASE("String::insert iters, empty") { 205 | String s1; 206 | String s2("hi"); 207 | s1.insert(s1.begin(), s2.begin(), s2.end()); 208 | REQUIRE_NOTHROW(s1.at(0)); 209 | REQUIRE(s1.size() == 2); 210 | REQUIRE(s1.at(0) == 'h'); 211 | REQUIRE(s1.at(1) == 'i'); 212 | REQUIRE(s1.to_std_string() == "hi"); 213 | } 214 | 215 | TEST_CASE("String::insert iters, not empty") { 216 | String s1("life is pain"); 217 | // insert middle 218 | String s2("XYZ"); 219 | s1.insert(s1.begin() + 4, s2.begin(), s2.end()); 220 | REQUIRE(s1.to_std_string() == "lifeXYZ is pain"); 221 | // insert end 222 | String s3("lmnop"); 223 | s1.insert(s1.end(), s3.begin(), s3.end()); 224 | REQUIRE(s1.to_std_string() == "lifeXYZ is painlmnop"); 225 | // insert begin 226 | String s4("okok"); 227 | s1.insert(s1.begin(), s4.begin(), s4.end()); 228 | REQUIRE(s1.to_std_string() == "okoklifeXYZ is painlmnop"); 229 | // errors 230 | REQUIRE_THROWS(s1.insert(s1.end() + 1, s4.begin(), s4.end())); 231 | } 232 | 233 | TEST_CASE("String::clear, empty") { 234 | String s; 235 | REQUIRE(s.size() == 0); 236 | s.clear(); 237 | REQUIRE(s.size() == 0); 238 | } 239 | 240 | TEST_CASE("String::clear, not empty") { 241 | String s("Hello, World"); 242 | REQUIRE(s.size() == 12); 243 | s.clear(); 244 | REQUIRE(s.size() == 0); 245 | } 246 | 247 | TEST_CASE("String::erase iter") { 248 | String s_empty; 249 | REQUIRE_THROWS(s_empty.erase(s_empty.begin())); 250 | 251 | String s1("Hello"); 252 | REQUIRE_THROWS(s1.erase(s1.end())); 253 | 254 | s1.erase(s1.begin()); 255 | REQUIRE(s1.to_std_string() == "ello"); 256 | 257 | s1.erase(s1.begin() + 1); 258 | REQUIRE(s1.to_std_string() == "elo"); 259 | } 260 | 261 | TEST_CASE("String::erase from to") { 262 | String s_empty; 263 | REQUIRE_THROWS(s_empty.erase(s_empty.begin(), s_empty.end())); 264 | 265 | String s1("Hello"); 266 | s1.erase(s1.begin(), s1.end()); 267 | REQUIRE(s1.empty()); 268 | 269 | String s2("Hello"); 270 | s2.erase(s2.begin() + 1, s2.end() - 1); 271 | REQUIRE(s2.to_std_string() == "Ho"); 272 | 273 | String s3("Hello"); 274 | s3.erase(s3.begin() + 1, s3.begin() + 1); 275 | REQUIRE(s3.to_std_string() == "Hello"); 276 | 277 | REQUIRE_THROWS(s3.erase(s3.begin() + 3, s3.begin() + 2)); 278 | } 279 | 280 | TEST_CASE("String::erase n") { 281 | String s_empty; 282 | REQUIRE_THROWS(s_empty.erase(s_empty.begin(), 1)); 283 | 284 | String s1("Hello"); 285 | s1.erase(s1.begin(), s1.size()); 286 | REQUIRE(s1.empty()); 287 | 288 | String s2("Hello"); 289 | s2.erase(s2.begin() + 1, s2.size() - 2); 290 | REQUIRE(s2.to_std_string() == "Ho"); 291 | 292 | String s3("Hello"); 293 | s3.erase(s3.begin() + 1, 0); 294 | REQUIRE(s3.to_std_string() == "Hello"); 295 | } 296 | 297 | TEST_CASE("String::substring") { 298 | String s1("Hello, World!"); 299 | REQUIRE(s1.substring(s1.begin() + 1, s1.end() - 1).to_std_string() == "ello, World"); 300 | 301 | String s2("Hello, World!"); 302 | REQUIRE(s2.substring(s2.begin() + 1, 4).to_std_string() == "ello"); 303 | } 304 | 305 | TEST_CASE("String::find") { 306 | String s1("Hello"); 307 | REQUIRE(s1.find('H') == s1.begin()); 308 | REQUIRE(s1.find('X') == s1.end()); 309 | REQUIRE(s1.find('e') == s1.begin() + 1); 310 | REQUIRE(s1.find('E') == s1.end()); 311 | REQUIRE(s1.find('o') == s1.end() - 1); 312 | 313 | const String s2("Hello"); 314 | REQUIRE(s2.find('H') == s2.begin()); 315 | REQUIRE(s2.find('X') == s2.end()); 316 | REQUIRE(s2.find('e') == s2.begin() + 1); 317 | REQUIRE(s2.find('E') == s2.end()); 318 | REQUIRE(s2.find('o') == s2.end() - 1); 319 | 320 | REQUIRE(s2.find('e', s2.begin() + 3) == s2.end()); 321 | } 322 | 323 | TEST_CASE("String::equals") { 324 | REQUIRE(String("Hello").equals(String("Hello"))); 325 | REQUIRE(String("").equals(String(""))); 326 | REQUIRE(String().equals(String(""))); 327 | REQUIRE(String().equals(String())); 328 | REQUIRE(String("\0\0").equals(String(""))); 329 | REQUIRE_FALSE(String("HELL").equals(String("hell"))); 330 | REQUIRE_FALSE(String("").equals(String(" "))); 331 | } 332 | 333 | TEST_CASE("String::operator==") { 334 | REQUIRE(String("Hello") == String("Hello")); 335 | REQUIRE(String("") == String("")); 336 | REQUIRE(String() == String("")); 337 | REQUIRE(String() == String()); 338 | REQUIRE(String("\0\0") == String("")); 339 | 340 | REQUIRE(String("HELL") != String("hell")); 341 | REQUIRE(String("") != String(" ")); 342 | REQUIRE(String(".") != String("..")); 343 | REQUIRE(String("Aa") != String("A")); 344 | 345 | REQUIRE(String("Hello") == "Hello"); 346 | REQUIRE(String() == ""); 347 | } 348 | 349 | TEST_CASE("String::operator+=") { 350 | String s; 351 | s += "Hello "; 352 | s += "World!"; 353 | REQUIRE(s == "Hello World!"); 354 | 355 | String s2("such is "); 356 | REQUIRE((s2 += "life") == "such is life"); 357 | } 358 | 359 | TEST_CASE("String::operator+") { 360 | String s1("Hello there"); 361 | String s2("my friend!"); 362 | String s3 = s1 + ", " + s2; 363 | REQUIRE(s3 == "Hello there, my friend!"); 364 | REQUIRE(s1 + String() == s1); 365 | } 366 | 367 | TEST_CASE("String::replace String") { 368 | String s("abcdabcdabcdabcd"); 369 | s.replace("ab", "XX"); 370 | REQUIRE(s == "XXcdXXcdXXcdXXcd"); 371 | 372 | String s2; 373 | s2.replace("", "Hello"); 374 | REQUIRE(s2 == ""); 375 | 376 | String s3("hello hello"); 377 | REQUIRE_THROWS(s3.replace("hello", "hello hello")); 378 | } 379 | 380 | TEST_CASE("String::replace char") { 381 | String s("abcdabcdabcdabcd"); 382 | s.replace('a', 'X'); 383 | REQUIRE(s == "XbcdXbcdXbcdXbcd"); 384 | } 385 | 386 | TEST_CASE("String::replace n Strings") { 387 | String s("hello world hello world hello world"); 388 | s.replace("hello world", "bye bye", 2); 389 | REQUIRE(s == "bye bye bye bye hello world"); 390 | 391 | String s2("a b a b a b"); 392 | s2.replace("a b", "XXX", 0); 393 | REQUIRE(s2 == "a b a b a b"); 394 | 395 | String s3("abcabcabc"); 396 | s3.replace("abc", "ABC", 100); 397 | REQUIRE(s3 == "ABCABCABC"); 398 | } 399 | 400 | TEST_CASE("String::find String") { 401 | { 402 | // normal 403 | String s("Hello, World!"); 404 | REQUIRE(s.find("nope") == s.end()); 405 | REQUIRE(s.find("Hello") == s.begin()); 406 | REQUIRE(s.find("!") == s.end() - 1); 407 | REQUIRE(s.find("Hello, World!") == s.begin()); 408 | REQUIRE(s.find("llo") == s.begin() + 2); 409 | REQUIRE_FALSE(s.find("") == s.end()); 410 | } 411 | { 412 | // const 413 | const String s("Hello, World!"); 414 | REQUIRE(s.find("nope") == s.end()); 415 | REQUIRE(s.find("Hello") == s.begin()); 416 | REQUIRE(s.find("!") == s.end() - 1); 417 | REQUIRE(s.find("Hello, World!") == s.begin()); 418 | REQUIRE(s.find("llo") == s.begin() + 2); 419 | REQUIRE_FALSE(s.find("") == s.end()); 420 | } 421 | { 422 | // normal with start 423 | String s("Hello, World!"); 424 | REQUIRE(s.find("nope", s.begin()) == s.end()); 425 | REQUIRE(s.find("Hello", s.begin()) == s.begin()); 426 | REQUIRE(s.find("!", s.begin()) == s.end() - 1); 427 | REQUIRE(s.find("Hello, World!", s.begin()) == s.begin()); 428 | REQUIRE(s.find("llo", s.begin()) == s.begin() + 2); 429 | REQUIRE_FALSE(s.find("", s.begin()) == s.end()); 430 | REQUIRE(s.find("Hello", s.begin() + 6) == s.end()); 431 | REQUIRE(s.find("World", s.begin() + 5) == s.begin() + 7); 432 | } 433 | { 434 | // const with start 435 | const String s("Hello, World!"); 436 | REQUIRE(s.find("nope", s.begin()) == s.end()); 437 | REQUIRE(s.find("Hello", s.begin()) == s.begin()); 438 | REQUIRE(s.find("!", s.begin()) == s.end() - 1); 439 | REQUIRE(s.find("Hello, World!", s.begin()) == s.begin()); 440 | REQUIRE(s.find("llo", s.begin()) == s.begin() + 2); 441 | REQUIRE_FALSE(s.find("", s.begin()) == s.end()); 442 | REQUIRE(s.find("Hello", s.begin() + 6) == s.end()); 443 | REQUIRE(s.find("World", s.begin() + 5) == s.begin() + 7); 444 | } 445 | } 446 | 447 | TEST_CASE("String::contains") { 448 | REQUIRE(String("Hello").contains("Hello")); 449 | REQUIRE(String("Hello").contains("ello")); 450 | REQUIRE(String("Hello").contains("Hell")); 451 | REQUIRE(String("Hello").contains("ell")); 452 | REQUIRE(String("Hello").contains("o")); 453 | REQUIRE_FALSE(String("Hello").contains("hello")); 454 | REQUIRE_FALSE(String("Hello").contains("HELLO")); 455 | REQUIRE_FALSE(String("Hello").contains("HH")); 456 | REQUIRE_FALSE(String("Hello").contains("oo")); 457 | } 458 | 459 | TEST_CASE("String::startswith") { 460 | REQUIRE(String("Hello").startswith("Hello")); 461 | REQUIRE(String("Hello").startswith("Hell")); 462 | REQUIRE(String("Hello").startswith("Hel")); 463 | REQUIRE(String("Hello").startswith("He")); 464 | REQUIRE(String("Hello").startswith("H")); 465 | REQUIRE_FALSE(String("Hello").startswith("HH")); 466 | REQUIRE_FALSE(String("Hello").startswith("ello")); 467 | REQUIRE_FALSE(String("Hello").startswith("o")); 468 | REQUIRE_FALSE(String("Hello").startswith("e")); 469 | REQUIRE_FALSE(String("Hello").startswith("h")); 470 | } 471 | 472 | TEST_CASE("String::endswith") { 473 | REQUIRE(String("Hello").endswith("Hello")); 474 | REQUIRE(String("Hello").endswith("ello")); 475 | REQUIRE(String("Hello").endswith("llo")); 476 | REQUIRE(String("Hello").endswith("lo")); 477 | REQUIRE(String("Hello").endswith("o")); 478 | REQUIRE_FALSE(String("Hello").endswith("Hell")); 479 | REQUIRE_FALSE(String("Hello").endswith("Hel")); 480 | REQUIRE_FALSE(String("Hello").endswith("l")); 481 | } 482 | 483 | TEST_CASE("String::reserve and String::capacity") { 484 | REQUIRE(String().capacity() == 0); 485 | String s("Hello, World"); 486 | REQUIRE(s.capacity() == s.size()); 487 | s.reserve(100); 488 | REQUIRE(s.capacity() == 100); 489 | s += " WOOOO! Adding bytes!"; 490 | REQUIRE(s.capacity() == 100); 491 | } 492 | 493 | TEST_CASE("String::shrink_to_fit") { 494 | // not testable, implementation defined. just make sure it doesn't crash. 495 | String s("hello"); 496 | s.reserve(100); 497 | s.shrink_to_fit(); 498 | REQUIRE(s == "hello"); 499 | } 500 | 501 | //*/ 502 | -------------------------------------------------------------------------------- /Doxyfile: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.18 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 configuration 21 | # file that follow. The default is UTF-8 which is also the encoding used for all 22 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the 23 | # iconv built into libc) for the transcoding. See 24 | # https://www.gnu.org/software/libiconv/ 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 = String 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 = 2.0 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 = "A feature-rich modern C++ string class." 48 | 49 | # With the PROJECT_LOGO tag one can specify a logo or an icon that is included 50 | # in the documentation. The maximum height of the logo should not exceed 55 51 | # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy 52 | # the logo 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 = /home/lion/src/String 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 = YES 72 | 73 | # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII 74 | # characters to appear in the names of generated files. If set to NO, non-ASCII 75 | # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode 76 | # U+3044. 77 | # The default value is: NO. 78 | 79 | ALLOW_UNICODE_NAMES = NO 80 | 81 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 82 | # documentation generated by doxygen is written. Doxygen will use this 83 | # information to generate all constant output in the proper language. 84 | # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, 85 | # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), 86 | # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, 87 | # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), 88 | # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, 89 | # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, 90 | # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, 91 | # Ukrainian and Vietnamese. 92 | # The default value is: English. 93 | 94 | OUTPUT_LANGUAGE = English 95 | 96 | # The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all 97 | # documentation generated by doxygen is written. Doxygen will use this 98 | # information to generate all generated output in the proper direction. 99 | # Possible values are: None, LTR, RTL and Context. 100 | # The default value is: None. 101 | 102 | OUTPUT_TEXT_DIRECTION = None 103 | 104 | # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member 105 | # descriptions after the members that are listed in the file and class 106 | # documentation (similar to Javadoc). Set to NO to disable this. 107 | # The default value is: YES. 108 | 109 | BRIEF_MEMBER_DESC = YES 110 | 111 | # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief 112 | # description of a member or function before the detailed description 113 | # 114 | # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 115 | # brief descriptions will be completely suppressed. 116 | # The default value is: YES. 117 | 118 | REPEAT_BRIEF = YES 119 | 120 | # This tag implements a quasi-intelligent brief description abbreviator that is 121 | # used to form the text in various listings. Each string in this list, if found 122 | # as the leading text of the brief description, will be stripped from the text 123 | # and the result, after processing the whole list, is used as the annotated 124 | # text. Otherwise, the brief description is used as-is. If left blank, the 125 | # following values are used ($name is automatically replaced with the name of 126 | # the entity):The $name class, The $name widget, The $name file, is, provides, 127 | # specifies, contains, represents, a, an and the. 128 | 129 | ABBREVIATE_BRIEF = "The $name class" \ 130 | "The $name widget" \ 131 | "The $name file" \ 132 | is \ 133 | provides \ 134 | specifies \ 135 | contains \ 136 | represents \ 137 | a \ 138 | an \ 139 | the 140 | 141 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 142 | # doxygen will generate a detailed section even if there is only a brief 143 | # description. 144 | # The default value is: NO. 145 | 146 | ALWAYS_DETAILED_SEC = NO 147 | 148 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 149 | # inherited members of a class in the documentation of that class as if those 150 | # members were ordinary class members. Constructors, destructors and assignment 151 | # operators of the base classes will not be shown. 152 | # The default value is: NO. 153 | 154 | INLINE_INHERITED_MEMB = NO 155 | 156 | # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path 157 | # before files name in the file list and in the header files. If set to NO the 158 | # shortest path that makes the file name unique will be used 159 | # The default value is: YES. 160 | 161 | FULL_PATH_NAMES = YES 162 | 163 | # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. 164 | # Stripping is only done if one of the specified strings matches the left-hand 165 | # part of the path. The tag can be used to show relative paths in the file list. 166 | # If left blank the directory from which doxygen is run is used as the path to 167 | # strip. 168 | # 169 | # Note that you can specify absolute paths here, but also relative paths, which 170 | # will be relative from the directory where doxygen is started. 171 | # This tag requires that the tag FULL_PATH_NAMES is set to YES. 172 | 173 | STRIP_FROM_PATH = 174 | 175 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the 176 | # path mentioned in the documentation of a class, which tells the reader which 177 | # header file to include in order to use a class. If left blank only the name of 178 | # the header file containing the class definition is used. Otherwise one should 179 | # specify the list of include paths that are normally passed to the compiler 180 | # using the -I flag. 181 | 182 | STRIP_FROM_INC_PATH = 183 | 184 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but 185 | # less readable) file names. This can be useful is your file systems doesn't 186 | # support long names like on DOS, Mac, or CD-ROM. 187 | # The default value is: NO. 188 | 189 | SHORT_NAMES = NO 190 | 191 | # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the 192 | # first line (until the first dot) of a Javadoc-style comment as the brief 193 | # description. If set to NO, the Javadoc-style will behave just like regular Qt- 194 | # style comments (thus requiring an explicit @brief command for a brief 195 | # description.) 196 | # The default value is: NO. 197 | 198 | JAVADOC_AUTOBRIEF = NO 199 | 200 | # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line 201 | # such as 202 | # /*************** 203 | # as being the beginning of a Javadoc-style comment "banner". If set to NO, the 204 | # Javadoc-style will behave just like regular comments and it will not be 205 | # interpreted by doxygen. 206 | # The default value is: NO. 207 | 208 | JAVADOC_BANNER = NO 209 | 210 | # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first 211 | # line (until the first dot) of a Qt-style comment as the brief description. If 212 | # set to NO, the Qt-style will behave just like regular Qt-style comments (thus 213 | # requiring an explicit \brief command for a brief description.) 214 | # The default value is: NO. 215 | 216 | QT_AUTOBRIEF = NO 217 | 218 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a 219 | # multi-line C++ special comment block (i.e. a block of //! or /// comments) as 220 | # a brief description. This used to be the default behavior. The new default is 221 | # to treat a multi-line C++ comment block as a detailed description. Set this 222 | # tag to YES if you prefer the old behavior instead. 223 | # 224 | # Note that setting this tag to YES also means that rational rose comments are 225 | # not recognized any more. 226 | # The default value is: NO. 227 | 228 | MULTILINE_CPP_IS_BRIEF = NO 229 | 230 | # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the 231 | # documentation from any documented member that it re-implements. 232 | # The default value is: YES. 233 | 234 | INHERIT_DOCS = YES 235 | 236 | # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new 237 | # page for each member. If set to NO, the documentation of a member will be part 238 | # of the file/class/namespace that contains it. 239 | # The default value is: NO. 240 | 241 | SEPARATE_MEMBER_PAGES = NO 242 | 243 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen 244 | # uses this value to replace tabs by spaces in code fragments. 245 | # Minimum value: 1, maximum value: 16, default value: 4. 246 | 247 | TAB_SIZE = 4 248 | 249 | # This tag can be used to specify a number of aliases that act as commands in 250 | # the documentation. An alias has the form: 251 | # name=value 252 | # For example adding 253 | # "sideeffect=@par Side Effects:\n" 254 | # will allow you to put the command \sideeffect (or @sideeffect) in the 255 | # documentation, which will result in a user-defined paragraph with heading 256 | # "Side Effects:". You can put \n's in the value part of an alias to insert 257 | # newlines (in the resulting output). You can put ^^ in the value part of an 258 | # alias to insert a newline as if a physical newline was in the original file. 259 | # When you need a literal { or } or , in the value part of an alias you have to 260 | # escape them by means of a backslash (\), this can lead to conflicts with the 261 | # commands \{ and \} for these it is advised to use the version @{ and @} or use 262 | # a double escape (\\{ and \\}) 263 | 264 | ALIASES = 265 | 266 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 267 | # only. Doxygen will then generate output that is more tailored for C. For 268 | # instance, some of the names that are used will be different. The list of all 269 | # members will be omitted, etc. 270 | # The default value is: NO. 271 | 272 | OPTIMIZE_OUTPUT_FOR_C = NO 273 | 274 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or 275 | # Python sources only. Doxygen will then generate output that is more tailored 276 | # for that language. For instance, namespaces will be presented as packages, 277 | # qualified scopes will look different, etc. 278 | # The default value is: NO. 279 | 280 | OPTIMIZE_OUTPUT_JAVA = NO 281 | 282 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 283 | # sources. Doxygen will then generate output that is tailored for Fortran. 284 | # The default value is: NO. 285 | 286 | OPTIMIZE_FOR_FORTRAN = NO 287 | 288 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 289 | # sources. Doxygen will then generate output that is tailored for VHDL. 290 | # The default value is: NO. 291 | 292 | OPTIMIZE_OUTPUT_VHDL = NO 293 | 294 | # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice 295 | # sources only. Doxygen will then generate output that is more tailored for that 296 | # language. For instance, namespaces will be presented as modules, types will be 297 | # separated into more groups, etc. 298 | # The default value is: NO. 299 | 300 | OPTIMIZE_OUTPUT_SLICE = NO 301 | 302 | # Doxygen selects the parser to use depending on the extension of the files it 303 | # parses. With this tag you can assign which parser to use for a given 304 | # extension. Doxygen has a built-in mapping, but you can override or extend it 305 | # using this tag. The format is ext=language, where ext is a file extension, and 306 | # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, 307 | # Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, 308 | # Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: 309 | # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser 310 | # tries to guess whether the code is fixed or free formatted code, this is the 311 | # default for Fortran type files). For instance to make doxygen treat .inc files 312 | # as Fortran files (default is PHP), and .f files as C (default is Fortran), 313 | # use: inc=Fortran f=C. 314 | # 315 | # Note: For files without extension you can use no_extension as a placeholder. 316 | # 317 | # Note that for custom extensions you also need to set FILE_PATTERNS otherwise 318 | # the files are not read by doxygen. 319 | 320 | EXTENSION_MAPPING = 321 | 322 | # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments 323 | # according to the Markdown format, which allows for more readable 324 | # documentation. See https://daringfireball.net/projects/markdown/ for details. 325 | # The output of markdown processing is further processed by doxygen, so you can 326 | # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in 327 | # case of backward compatibilities issues. 328 | # The default value is: YES. 329 | 330 | MARKDOWN_SUPPORT = YES 331 | 332 | # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up 333 | # to that level are automatically included in the table of contents, even if 334 | # they do not have an id attribute. 335 | # Note: This feature currently applies only to Markdown headings. 336 | # Minimum value: 0, maximum value: 99, default value: 5. 337 | # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. 338 | 339 | TOC_INCLUDE_HEADINGS = 5 340 | 341 | # When enabled doxygen tries to link words that correspond to documented 342 | # classes, or namespaces to their corresponding documentation. Such a link can 343 | # be prevented in individual cases by putting a % sign in front of the word or 344 | # globally by setting AUTOLINK_SUPPORT to NO. 345 | # The default value is: YES. 346 | 347 | AUTOLINK_SUPPORT = YES 348 | 349 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 350 | # to include (a tag file for) the STL sources as input, then you should set this 351 | # tag to YES in order to let doxygen match functions declarations and 352 | # definitions whose arguments contain STL classes (e.g. func(std::string); 353 | # versus func(std::string) {}). This also make the inheritance and collaboration 354 | # diagrams that involve STL classes more complete and accurate. 355 | # The default value is: NO. 356 | 357 | BUILTIN_STL_SUPPORT = NO 358 | 359 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 360 | # enable parsing support. 361 | # The default value is: NO. 362 | 363 | CPP_CLI_SUPPORT = NO 364 | 365 | # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: 366 | # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen 367 | # will parse them like normal C++ but will assume all classes use public instead 368 | # of private inheritance when no explicit protection keyword is present. 369 | # The default value is: NO. 370 | 371 | SIP_SUPPORT = NO 372 | 373 | # For Microsoft's IDL there are propget and propput attributes to indicate 374 | # getter and setter methods for a property. Setting this option to YES will make 375 | # doxygen to replace the get and set methods by a property in the documentation. 376 | # This will only work if the methods are indeed getting or setting a simple 377 | # type. If this is not the case, or you want to show the methods anyway, you 378 | # should set this option to NO. 379 | # The default value is: YES. 380 | 381 | IDL_PROPERTY_SUPPORT = YES 382 | 383 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 384 | # tag is set to YES then doxygen will reuse the documentation of the first 385 | # member in the group (if any) for the other members of the group. By default 386 | # all members of a group must be documented explicitly. 387 | # The default value is: NO. 388 | 389 | DISTRIBUTE_GROUP_DOC = NO 390 | 391 | # If one adds a struct or class to a group and this option is enabled, then also 392 | # any nested class or struct is added to the same group. By default this option 393 | # is disabled and one has to add nested compounds explicitly via \ingroup. 394 | # The default value is: NO. 395 | 396 | GROUP_NESTED_COMPOUNDS = NO 397 | 398 | # Set the SUBGROUPING tag to YES to allow class member groups of the same type 399 | # (for instance a group of public functions) to be put as a subgroup of that 400 | # type (e.g. under the Public Functions section). Set it to NO to prevent 401 | # subgrouping. Alternatively, this can be done per class using the 402 | # \nosubgrouping command. 403 | # The default value is: YES. 404 | 405 | SUBGROUPING = YES 406 | 407 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions 408 | # are shown inside the group in which they are included (e.g. using \ingroup) 409 | # instead of on a separate page (for HTML and Man pages) or section (for LaTeX 410 | # and RTF). 411 | # 412 | # Note that this feature does not work in combination with 413 | # SEPARATE_MEMBER_PAGES. 414 | # The default value is: NO. 415 | 416 | INLINE_GROUPED_CLASSES = NO 417 | 418 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions 419 | # with only public data fields or simple typedef fields will be shown inline in 420 | # the documentation of the scope in which they are defined (i.e. file, 421 | # namespace, or group documentation), provided this scope is documented. If set 422 | # to NO, structs, classes, and unions are shown on a separate page (for HTML and 423 | # Man pages) or section (for LaTeX and RTF). 424 | # The default value is: NO. 425 | 426 | INLINE_SIMPLE_STRUCTS = NO 427 | 428 | # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or 429 | # enum is documented as struct, union, or enum with the name of the typedef. So 430 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 431 | # with name TypeT. When disabled the typedef will appear as a member of a file, 432 | # namespace, or class. And the struct will be named TypeS. This can typically be 433 | # useful for C code in case the coding convention dictates that all compound 434 | # types are typedef'ed and only the typedef is referenced, never the tag name. 435 | # The default value is: NO. 436 | 437 | TYPEDEF_HIDES_STRUCT = NO 438 | 439 | # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This 440 | # cache is used to resolve symbols given their name and scope. Since this can be 441 | # an expensive process and often the same symbol appears multiple times in the 442 | # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small 443 | # doxygen will become slower. If the cache is too large, memory is wasted. The 444 | # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range 445 | # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 446 | # symbols. At the end of a run doxygen will report the cache usage and suggest 447 | # the optimal cache size from a speed point of view. 448 | # Minimum value: 0, maximum value: 9, default value: 0. 449 | 450 | LOOKUP_CACHE_SIZE = 0 451 | 452 | #--------------------------------------------------------------------------- 453 | # Build related configuration options 454 | #--------------------------------------------------------------------------- 455 | 456 | # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in 457 | # documentation are documented, even if no documentation was available. Private 458 | # class members and static file members will be hidden unless the 459 | # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. 460 | # Note: This will also disable the warnings about undocumented members that are 461 | # normally produced when WARNINGS is set to YES. 462 | # The default value is: NO. 463 | 464 | EXTRACT_ALL = YES 465 | 466 | # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will 467 | # be included in the documentation. 468 | # The default value is: NO. 469 | 470 | EXTRACT_PRIVATE = NO 471 | 472 | # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual 473 | # methods of a class will be included in the documentation. 474 | # The default value is: NO. 475 | 476 | EXTRACT_PRIV_VIRTUAL = NO 477 | 478 | # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal 479 | # scope will be included in the documentation. 480 | # The default value is: NO. 481 | 482 | EXTRACT_PACKAGE = NO 483 | 484 | # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be 485 | # included in the documentation. 486 | # The default value is: NO. 487 | 488 | EXTRACT_STATIC = NO 489 | 490 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined 491 | # locally in source files will be included in the documentation. If set to NO, 492 | # only classes defined in header files are included. Does not have any effect 493 | # for Java sources. 494 | # The default value is: YES. 495 | 496 | EXTRACT_LOCAL_CLASSES = YES 497 | 498 | # This flag is only useful for Objective-C code. If set to YES, local methods, 499 | # which are defined in the implementation section but not in the interface are 500 | # included in the documentation. If set to NO, only methods in the interface are 501 | # included. 502 | # The default value is: NO. 503 | 504 | EXTRACT_LOCAL_METHODS = NO 505 | 506 | # If this flag is set to YES, the members of anonymous namespaces will be 507 | # extracted and appear in the documentation as a namespace called 508 | # 'anonymous_namespace{file}', where file will be replaced with the base name of 509 | # the file that contains the anonymous namespace. By default anonymous namespace 510 | # are hidden. 511 | # The default value is: NO. 512 | 513 | EXTRACT_ANON_NSPACES = NO 514 | 515 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all 516 | # undocumented members inside documented classes or files. If set to NO these 517 | # members will be included in the various overviews, but no documentation 518 | # section is generated. This option has no effect if EXTRACT_ALL is enabled. 519 | # The default value is: NO. 520 | 521 | HIDE_UNDOC_MEMBERS = NO 522 | 523 | # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all 524 | # undocumented classes that are normally visible in the class hierarchy. If set 525 | # to NO, these classes will be included in the various overviews. This option 526 | # has no effect if EXTRACT_ALL is enabled. 527 | # The default value is: NO. 528 | 529 | HIDE_UNDOC_CLASSES = NO 530 | 531 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend 532 | # declarations. If set to NO, these declarations will be included in the 533 | # documentation. 534 | # The default value is: NO. 535 | 536 | HIDE_FRIEND_COMPOUNDS = NO 537 | 538 | # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any 539 | # documentation blocks found inside the body of a function. If set to NO, these 540 | # blocks will be appended to the function's detailed documentation block. 541 | # The default value is: NO. 542 | 543 | HIDE_IN_BODY_DOCS = NO 544 | 545 | # The INTERNAL_DOCS tag determines if documentation that is typed after a 546 | # \internal command is included. If the tag is set to NO then the documentation 547 | # will be excluded. Set it to YES to include the internal documentation. 548 | # The default value is: NO. 549 | 550 | INTERNAL_DOCS = NO 551 | 552 | # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file 553 | # names in lower-case letters. If set to YES, upper-case letters are also 554 | # allowed. This is useful if you have classes or files whose names only differ 555 | # in case and if your file system supports case sensitive file names. Windows 556 | # (including Cygwin) ands Mac users are advised to set this option to NO. 557 | # The default value is: system dependent. 558 | 559 | CASE_SENSE_NAMES = NO 560 | 561 | # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with 562 | # their full class and namespace scopes in the documentation. If set to YES, the 563 | # scope will be hidden. 564 | # The default value is: NO. 565 | 566 | HIDE_SCOPE_NAMES = NO 567 | 568 | # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will 569 | # append additional text to a page's title, such as Class Reference. If set to 570 | # YES the compound reference will be hidden. 571 | # The default value is: NO. 572 | 573 | HIDE_COMPOUND_REFERENCE= NO 574 | 575 | # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of 576 | # the files that are included by a file in the documentation of that file. 577 | # The default value is: YES. 578 | 579 | SHOW_INCLUDE_FILES = YES 580 | 581 | # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each 582 | # grouped member an include statement to the documentation, telling the reader 583 | # which file to include in order to use the member. 584 | # The default value is: NO. 585 | 586 | SHOW_GROUPED_MEMB_INC = NO 587 | 588 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include 589 | # files with double quotes in the documentation rather than with sharp brackets. 590 | # The default value is: NO. 591 | 592 | FORCE_LOCAL_INCLUDES = NO 593 | 594 | # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the 595 | # documentation for inline members. 596 | # The default value is: YES. 597 | 598 | INLINE_INFO = YES 599 | 600 | # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the 601 | # (detailed) documentation of file and class members alphabetically by member 602 | # name. If set to NO, the members will appear in declaration order. 603 | # The default value is: YES. 604 | 605 | SORT_MEMBER_DOCS = YES 606 | 607 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief 608 | # descriptions of file, namespace and class members alphabetically by member 609 | # name. If set to NO, the members will appear in declaration order. Note that 610 | # this will also influence the order of the classes in the class list. 611 | # The default value is: NO. 612 | 613 | SORT_BRIEF_DOCS = NO 614 | 615 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the 616 | # (brief and detailed) documentation of class members so that constructors and 617 | # destructors are listed first. If set to NO the constructors will appear in the 618 | # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. 619 | # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief 620 | # member documentation. 621 | # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting 622 | # detailed member documentation. 623 | # The default value is: NO. 624 | 625 | SORT_MEMBERS_CTORS_1ST = NO 626 | 627 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy 628 | # of group names into alphabetical order. If set to NO the group names will 629 | # appear in their defined order. 630 | # The default value is: NO. 631 | 632 | SORT_GROUP_NAMES = NO 633 | 634 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by 635 | # fully-qualified names, including namespaces. If set to NO, the class list will 636 | # be sorted only by class name, not including the namespace part. 637 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 638 | # Note: This option applies only to the class list, not to the alphabetical 639 | # list. 640 | # The default value is: NO. 641 | 642 | SORT_BY_SCOPE_NAME = NO 643 | 644 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper 645 | # type resolution of all parameters of a function it will reject a match between 646 | # the prototype and the implementation of a member function even if there is 647 | # only one candidate or it is obvious which candidate to choose by doing a 648 | # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still 649 | # accept a match between prototype and implementation in such cases. 650 | # The default value is: NO. 651 | 652 | STRICT_PROTO_MATCHING = NO 653 | 654 | # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo 655 | # list. This list is created by putting \todo commands in the documentation. 656 | # The default value is: YES. 657 | 658 | GENERATE_TODOLIST = YES 659 | 660 | # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test 661 | # list. This list is created by putting \test commands in the documentation. 662 | # The default value is: YES. 663 | 664 | GENERATE_TESTLIST = YES 665 | 666 | # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug 667 | # list. This list is created by putting \bug commands in the documentation. 668 | # The default value is: YES. 669 | 670 | GENERATE_BUGLIST = YES 671 | 672 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) 673 | # the deprecated list. This list is created by putting \deprecated commands in 674 | # the documentation. 675 | # The default value is: YES. 676 | 677 | GENERATE_DEPRECATEDLIST= YES 678 | 679 | # The ENABLED_SECTIONS tag can be used to enable conditional documentation 680 | # sections, marked by \if ... \endif and \cond 681 | # ... \endcond blocks. 682 | 683 | ENABLED_SECTIONS = 684 | 685 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the 686 | # initial value of a variable or macro / define can have for it to appear in the 687 | # documentation. If the initializer consists of more lines than specified here 688 | # it will be hidden. Use a value of 0 to hide initializers completely. The 689 | # appearance of the value of individual variables and macros / defines can be 690 | # controlled using \showinitializer or \hideinitializer command in the 691 | # documentation regardless of this setting. 692 | # Minimum value: 0, maximum value: 10000, default value: 30. 693 | 694 | MAX_INITIALIZER_LINES = 30 695 | 696 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at 697 | # the bottom of the documentation of classes and structs. If set to YES, the 698 | # list will mention the files that were used to generate the documentation. 699 | # The default value is: YES. 700 | 701 | SHOW_USED_FILES = YES 702 | 703 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This 704 | # will remove the Files entry from the Quick Index and from the Folder Tree View 705 | # (if specified). 706 | # The default value is: YES. 707 | 708 | SHOW_FILES = NO 709 | 710 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces 711 | # page. This will remove the Namespaces entry from the Quick Index and from the 712 | # Folder Tree View (if specified). 713 | # The default value is: YES. 714 | 715 | SHOW_NAMESPACES = YES 716 | 717 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 718 | # doxygen should invoke to get the current version for each file (typically from 719 | # the version control system). Doxygen will invoke the program by executing (via 720 | # popen()) the command command input-file, where command is the value of the 721 | # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided 722 | # by doxygen. Whatever the program writes to standard output is used as the file 723 | # version. For an example see the documentation. 724 | 725 | FILE_VERSION_FILTER = 726 | 727 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 728 | # by doxygen. The layout file controls the global structure of the generated 729 | # output files in an output format independent way. To create the layout file 730 | # that represents doxygen's defaults, run doxygen with the -l option. You can 731 | # optionally specify a file name after the option, if omitted DoxygenLayout.xml 732 | # will be used as the name of the layout file. 733 | # 734 | # Note that if you run doxygen from a directory containing a file called 735 | # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE 736 | # tag is left empty. 737 | 738 | LAYOUT_FILE = 739 | 740 | # The CITE_BIB_FILES tag can be used to specify one or more bib files containing 741 | # the reference definitions. This must be a list of .bib files. The .bib 742 | # extension is automatically appended if omitted. This requires the bibtex tool 743 | # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. 744 | # For LaTeX the style of the bibliography can be controlled using 745 | # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the 746 | # search path. See also \cite for info how to create references. 747 | 748 | CITE_BIB_FILES = 749 | 750 | #--------------------------------------------------------------------------- 751 | # Configuration options related to warning and progress messages 752 | #--------------------------------------------------------------------------- 753 | 754 | # The QUIET tag can be used to turn on/off the messages that are generated to 755 | # standard output by doxygen. If QUIET is set to YES this implies that the 756 | # messages are off. 757 | # The default value is: NO. 758 | 759 | QUIET = NO 760 | 761 | # The WARNINGS tag can be used to turn on/off the warning messages that are 762 | # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES 763 | # this implies that the warnings are on. 764 | # 765 | # Tip: Turn warnings on while writing the documentation. 766 | # The default value is: YES. 767 | 768 | WARNINGS = YES 769 | 770 | # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate 771 | # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag 772 | # will automatically be disabled. 773 | # The default value is: YES. 774 | 775 | WARN_IF_UNDOCUMENTED = YES 776 | 777 | # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for 778 | # potential errors in the documentation, such as not documenting some parameters 779 | # in a documented function, or documenting parameters that don't exist or using 780 | # markup commands wrongly. 781 | # The default value is: YES. 782 | 783 | WARN_IF_DOC_ERROR = YES 784 | 785 | # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that 786 | # are documented, but have no documentation for their parameters or return 787 | # value. If set to NO, doxygen will only warn about wrong or incomplete 788 | # parameter documentation, but not about the absence of documentation. If 789 | # EXTRACT_ALL is set to YES then this flag will automatically be disabled. 790 | # The default value is: NO. 791 | 792 | WARN_NO_PARAMDOC = NO 793 | 794 | # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when 795 | # a warning is encountered. 796 | # The default value is: NO. 797 | 798 | WARN_AS_ERROR = NO 799 | 800 | # The WARN_FORMAT tag determines the format of the warning messages that doxygen 801 | # can produce. The string should contain the $file, $line, and $text tags, which 802 | # will be replaced by the file and line number from which the warning originated 803 | # and the warning text. Optionally the format may contain $version, which will 804 | # be replaced by the version of the file (if it could be obtained via 805 | # FILE_VERSION_FILTER) 806 | # The default value is: $file:$line: $text. 807 | 808 | WARN_FORMAT = "$file:$line: $text" 809 | 810 | # The WARN_LOGFILE tag can be used to specify a file to which warning and error 811 | # messages should be written. If left blank the output is written to standard 812 | # error (stderr). 813 | 814 | WARN_LOGFILE = 815 | 816 | #--------------------------------------------------------------------------- 817 | # Configuration options related to the input files 818 | #--------------------------------------------------------------------------- 819 | 820 | # The INPUT tag is used to specify the files and/or directories that contain 821 | # documented source files. You may enter file names like myfile.cpp or 822 | # directories like /usr/src/myproject. Separate the files or directories with 823 | # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING 824 | # Note: If this tag is empty the current directory is searched. 825 | 826 | INPUT = /home/lion/src/String/include \ 827 | /home/lion/src/String/LICENSE \ 828 | /home/lion/src/String/src \ 829 | /home/lion/src/String/CONTRIBUTING.md \ 830 | /home/lion/src/String/README.md 831 | 832 | # This tag can be used to specify the character encoding of the source files 833 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses 834 | # libiconv (or the iconv built into libc) for the transcoding. See the libiconv 835 | # documentation (see: https://www.gnu.org/software/libiconv/) for the list of 836 | # possible encodings. 837 | # The default value is: UTF-8. 838 | 839 | INPUT_ENCODING = UTF-8 840 | 841 | # If the value of the INPUT tag contains directories, you can use the 842 | # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and 843 | # *.h) to filter out the source-files in the directories. 844 | # 845 | # Note that for custom extensions or not directly supported extensions you also 846 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 847 | # read by doxygen. 848 | # 849 | # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, 850 | # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, 851 | # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, 852 | # *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), 853 | # *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen 854 | # C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, 855 | # *.vhdl, *.ucf, *.qsf and *.ice. 856 | 857 | FILE_PATTERNS = *.c \ 858 | *.cc \ 859 | *.cxx \ 860 | *.cpp \ 861 | *.c++ \ 862 | *.java \ 863 | *.ii \ 864 | *.ixx \ 865 | *.ipp \ 866 | *.i++ \ 867 | *.inl \ 868 | *.idl \ 869 | *.ddl \ 870 | *.odl \ 871 | *.h \ 872 | *.hh \ 873 | *.hxx \ 874 | *.hpp \ 875 | *.h++ \ 876 | *.cs \ 877 | *.d \ 878 | *.php \ 879 | *.php4 \ 880 | *.php5 \ 881 | *.phtml \ 882 | *.inc \ 883 | *.m \ 884 | *.markdown \ 885 | *.md \ 886 | *.mm \ 887 | *.dox \ 888 | *.doc \ 889 | *.txt \ 890 | *.py \ 891 | *.pyw \ 892 | *.f90 \ 893 | *.f95 \ 894 | *.f03 \ 895 | *.f08 \ 896 | *.f18 \ 897 | *.f \ 898 | *.for \ 899 | *.vhd \ 900 | *.vhdl \ 901 | *.ucf \ 902 | *.qsf \ 903 | *.ice 904 | 905 | # The RECURSIVE tag can be used to specify whether or not subdirectories should 906 | # be searched for input files as well. 907 | # The default value is: NO. 908 | 909 | RECURSIVE = NO 910 | 911 | # The EXCLUDE tag can be used to specify files and/or directories that should be 912 | # excluded from the INPUT source files. This way you can easily exclude a 913 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 914 | # 915 | # Note that relative paths are relative to the directory from which doxygen is 916 | # run. 917 | 918 | EXCLUDE = 919 | 920 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 921 | # directories that are symbolic links (a Unix file system feature) are excluded 922 | # from the input. 923 | # The default value is: NO. 924 | 925 | EXCLUDE_SYMLINKS = NO 926 | 927 | # If the value of the INPUT tag contains directories, you can use the 928 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 929 | # certain files from those directories. 930 | # 931 | # Note that the wildcards are matched against the file with absolute path, so to 932 | # exclude all test directories for example use the pattern */test/* 933 | 934 | EXCLUDE_PATTERNS = 935 | 936 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 937 | # (namespaces, classes, functions, etc.) that should be excluded from the 938 | # output. The symbol name can be a fully qualified name, a word, or if the 939 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 940 | # AClass::ANamespace, ANamespace::*Test 941 | # 942 | # Note that the wildcards are matched against the file with absolute path, so to 943 | # exclude all test directories use the pattern */test/* 944 | 945 | EXCLUDE_SYMBOLS = 946 | 947 | # The EXAMPLE_PATH tag can be used to specify one or more files or directories 948 | # that contain example code fragments that are included (see the \include 949 | # command). 950 | 951 | EXAMPLE_PATH = 952 | 953 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 954 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and 955 | # *.h) to filter out the source-files in the directories. If left blank all 956 | # files are included. 957 | 958 | EXAMPLE_PATTERNS = * 959 | 960 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 961 | # searched for input files to be used with the \include or \dontinclude commands 962 | # irrespective of the value of the RECURSIVE tag. 963 | # The default value is: NO. 964 | 965 | EXAMPLE_RECURSIVE = NO 966 | 967 | # The IMAGE_PATH tag can be used to specify one or more files or directories 968 | # that contain images that are to be included in the documentation (see the 969 | # \image command). 970 | 971 | IMAGE_PATH = 972 | 973 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 974 | # invoke to filter for each input file. Doxygen will invoke the filter program 975 | # by executing (via popen()) the command: 976 | # 977 | # 978 | # 979 | # where is the value of the INPUT_FILTER tag, and is the 980 | # name of an input file. Doxygen will then use the output that the filter 981 | # program writes to standard output. If FILTER_PATTERNS is specified, this tag 982 | # will be ignored. 983 | # 984 | # Note that the filter must not add or remove lines; it is applied before the 985 | # code is scanned, but not when the output code is generated. If lines are added 986 | # or removed, the anchors will not be placed correctly. 987 | # 988 | # Note that for custom extensions or not directly supported extensions you also 989 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 990 | # properly processed by doxygen. 991 | 992 | INPUT_FILTER = 993 | 994 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 995 | # basis. Doxygen will compare the file name with each pattern and apply the 996 | # filter if there is a match. The filters are a list of the form: pattern=filter 997 | # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how 998 | # filters are used. If the FILTER_PATTERNS tag is empty or if none of the 999 | # patterns match the file name, INPUT_FILTER is applied. 1000 | # 1001 | # Note that for custom extensions or not directly supported extensions you also 1002 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 1003 | # properly processed by doxygen. 1004 | 1005 | FILTER_PATTERNS = 1006 | 1007 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 1008 | # INPUT_FILTER) will also be used to filter the input files that are used for 1009 | # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). 1010 | # The default value is: NO. 1011 | 1012 | FILTER_SOURCE_FILES = NO 1013 | 1014 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 1015 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and 1016 | # it is also possible to disable source filtering for a specific pattern using 1017 | # *.ext= (so without naming a filter). 1018 | # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. 1019 | 1020 | FILTER_SOURCE_PATTERNS = 1021 | 1022 | # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that 1023 | # is part of the input, its contents will be placed on the main page 1024 | # (index.html). This can be useful if you have a project on for instance GitHub 1025 | # and want to reuse the introduction page also for the doxygen output. 1026 | 1027 | USE_MDFILE_AS_MAINPAGE = 1028 | 1029 | #--------------------------------------------------------------------------- 1030 | # Configuration options related to source browsing 1031 | #--------------------------------------------------------------------------- 1032 | 1033 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will be 1034 | # generated. Documented entities will be cross-referenced with these sources. 1035 | # 1036 | # Note: To get rid of all source code in the generated output, make sure that 1037 | # also VERBATIM_HEADERS is set to NO. 1038 | # The default value is: NO. 1039 | 1040 | SOURCE_BROWSER = NO 1041 | 1042 | # Setting the INLINE_SOURCES tag to YES will include the body of functions, 1043 | # classes and enums directly into the documentation. 1044 | # The default value is: NO. 1045 | 1046 | INLINE_SOURCES = NO 1047 | 1048 | # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any 1049 | # special comment blocks from generated source code fragments. Normal C, C++ and 1050 | # Fortran comments will always remain visible. 1051 | # The default value is: YES. 1052 | 1053 | STRIP_CODE_COMMENTS = YES 1054 | 1055 | # If the REFERENCED_BY_RELATION tag is set to YES then for each documented 1056 | # entity all documented functions referencing it will be listed. 1057 | # The default value is: NO. 1058 | 1059 | REFERENCED_BY_RELATION = NO 1060 | 1061 | # If the REFERENCES_RELATION tag is set to YES then for each documented function 1062 | # all documented entities called/used by that function will be listed. 1063 | # The default value is: NO. 1064 | 1065 | REFERENCES_RELATION = YES 1066 | 1067 | # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set 1068 | # to YES then the hyperlinks from functions in REFERENCES_RELATION and 1069 | # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will 1070 | # link to the documentation. 1071 | # The default value is: YES. 1072 | 1073 | REFERENCES_LINK_SOURCE = YES 1074 | 1075 | # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the 1076 | # source code will show a tooltip with additional information such as prototype, 1077 | # brief description and links to the definition and documentation. Since this 1078 | # will make the HTML file larger and loading of large files a bit slower, you 1079 | # can opt to disable this feature. 1080 | # The default value is: YES. 1081 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 1082 | 1083 | SOURCE_TOOLTIPS = YES 1084 | 1085 | # If the USE_HTAGS tag is set to YES then the references to source code will 1086 | # point to the HTML generated by the htags(1) tool instead of doxygen built-in 1087 | # source browser. The htags tool is part of GNU's global source tagging system 1088 | # (see https://www.gnu.org/software/global/global.html). You will need version 1089 | # 4.8.6 or higher. 1090 | # 1091 | # To use it do the following: 1092 | # - Install the latest version of global 1093 | # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file 1094 | # - Make sure the INPUT points to the root of the source tree 1095 | # - Run doxygen as normal 1096 | # 1097 | # Doxygen will invoke htags (and that will in turn invoke gtags), so these 1098 | # tools must be available from the command line (i.e. in the search path). 1099 | # 1100 | # The result: instead of the source browser generated by doxygen, the links to 1101 | # source code will now point to the output of htags. 1102 | # The default value is: NO. 1103 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 1104 | 1105 | USE_HTAGS = NO 1106 | 1107 | # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a 1108 | # verbatim copy of the header file for each class for which an include is 1109 | # specified. Set to NO to disable this. 1110 | # See also: Section \class. 1111 | # The default value is: YES. 1112 | 1113 | VERBATIM_HEADERS = NO 1114 | 1115 | #--------------------------------------------------------------------------- 1116 | # Configuration options related to the alphabetical class index 1117 | #--------------------------------------------------------------------------- 1118 | 1119 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all 1120 | # compounds will be generated. Enable this if the project contains a lot of 1121 | # classes, structs, unions or interfaces. 1122 | # The default value is: YES. 1123 | 1124 | ALPHABETICAL_INDEX = YES 1125 | 1126 | # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in 1127 | # which the alphabetical index list will be split. 1128 | # Minimum value: 1, maximum value: 20, default value: 5. 1129 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 1130 | 1131 | COLS_IN_ALPHA_INDEX = 5 1132 | 1133 | # In case all classes in a project start with a common prefix, all classes will 1134 | # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag 1135 | # can be used to specify a prefix (or a list of prefixes) that should be ignored 1136 | # while generating the index headers. 1137 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 1138 | 1139 | IGNORE_PREFIX = 1140 | 1141 | #--------------------------------------------------------------------------- 1142 | # Configuration options related to the HTML output 1143 | #--------------------------------------------------------------------------- 1144 | 1145 | # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output 1146 | # The default value is: YES. 1147 | 1148 | GENERATE_HTML = YES 1149 | 1150 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a 1151 | # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of 1152 | # it. 1153 | # The default directory is: html. 1154 | # This tag requires that the tag GENERATE_HTML is set to YES. 1155 | 1156 | HTML_OUTPUT = docs 1157 | 1158 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each 1159 | # generated HTML page (for example: .htm, .php, .asp). 1160 | # The default value is: .html. 1161 | # This tag requires that the tag GENERATE_HTML is set to YES. 1162 | 1163 | HTML_FILE_EXTENSION = .html 1164 | 1165 | # The HTML_HEADER tag can be used to specify a user-defined HTML header file for 1166 | # each generated HTML page. If the tag is left blank doxygen will generate a 1167 | # standard header. 1168 | # 1169 | # To get valid HTML the header file that includes any scripts and style sheets 1170 | # that doxygen needs, which is dependent on the configuration options used (e.g. 1171 | # the setting GENERATE_TREEVIEW). It is highly recommended to start with a 1172 | # default header using 1173 | # doxygen -w html new_header.html new_footer.html new_stylesheet.css 1174 | # YourConfigFile 1175 | # and then modify the file new_header.html. See also section "Doxygen usage" 1176 | # for information on how to generate the default header that doxygen normally 1177 | # uses. 1178 | # Note: The header is subject to change so you typically have to regenerate the 1179 | # default header when upgrading to a newer version of doxygen. For a description 1180 | # of the possible markers and block names see the documentation. 1181 | # This tag requires that the tag GENERATE_HTML is set to YES. 1182 | 1183 | HTML_HEADER = 1184 | 1185 | # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each 1186 | # generated HTML page. If the tag is left blank doxygen will generate a standard 1187 | # footer. See HTML_HEADER for more information on how to generate a default 1188 | # footer and what special commands can be used inside the footer. See also 1189 | # section "Doxygen usage" for information on how to generate the default footer 1190 | # that doxygen normally uses. 1191 | # This tag requires that the tag GENERATE_HTML is set to YES. 1192 | 1193 | HTML_FOOTER = 1194 | 1195 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style 1196 | # sheet that is used by each HTML page. It can be used to fine-tune the look of 1197 | # the HTML output. If left blank doxygen will generate a default style sheet. 1198 | # See also section "Doxygen usage" for information on how to generate the style 1199 | # sheet that doxygen normally uses. 1200 | # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as 1201 | # it is more robust and this tag (HTML_STYLESHEET) will in the future become 1202 | # obsolete. 1203 | # This tag requires that the tag GENERATE_HTML is set to YES. 1204 | 1205 | HTML_STYLESHEET = 1206 | 1207 | # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined 1208 | # cascading style sheets that are included after the standard style sheets 1209 | # created by doxygen. Using this option one can overrule certain style aspects. 1210 | # This is preferred over using HTML_STYLESHEET since it does not replace the 1211 | # standard style sheet and is therefore more robust against future updates. 1212 | # Doxygen will copy the style sheet files to the output directory. 1213 | # Note: The order of the extra style sheet files is of importance (e.g. the last 1214 | # style sheet in the list overrules the setting of the previous ones in the 1215 | # list). For an example see the documentation. 1216 | # This tag requires that the tag GENERATE_HTML is set to YES. 1217 | 1218 | HTML_EXTRA_STYLESHEET = 1219 | 1220 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 1221 | # other source files which should be copied to the HTML output directory. Note 1222 | # that these files will be copied to the base HTML output directory. Use the 1223 | # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 1224 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that the 1225 | # files will be copied as-is; there are no commands or markers available. 1226 | # This tag requires that the tag GENERATE_HTML is set to YES. 1227 | 1228 | HTML_EXTRA_FILES = 1229 | 1230 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen 1231 | # will adjust the colors in the style sheet and background images according to 1232 | # this color. Hue is specified as an angle on a colorwheel, see 1233 | # https://en.wikipedia.org/wiki/Hue for more information. For instance the value 1234 | # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 1235 | # purple, and 360 is red again. 1236 | # Minimum value: 0, maximum value: 359, default value: 220. 1237 | # This tag requires that the tag GENERATE_HTML is set to YES. 1238 | 1239 | HTML_COLORSTYLE_HUE = 220 1240 | 1241 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors 1242 | # in the HTML output. For a value of 0 the output will use grayscales only. A 1243 | # value of 255 will produce the most vivid colors. 1244 | # Minimum value: 0, maximum value: 255, default value: 100. 1245 | # This tag requires that the tag GENERATE_HTML is set to YES. 1246 | 1247 | HTML_COLORSTYLE_SAT = 100 1248 | 1249 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the 1250 | # luminance component of the colors in the HTML output. Values below 100 1251 | # gradually make the output lighter, whereas values above 100 make the output 1252 | # darker. The value divided by 100 is the actual gamma applied, so 80 represents 1253 | # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not 1254 | # change the gamma. 1255 | # Minimum value: 40, maximum value: 240, default value: 80. 1256 | # This tag requires that the tag GENERATE_HTML is set to YES. 1257 | 1258 | HTML_COLORSTYLE_GAMMA = 80 1259 | 1260 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 1261 | # page will contain the date and time when the page was generated. Setting this 1262 | # to YES can help to show when doxygen was last run and thus if the 1263 | # documentation is up to date. 1264 | # The default value is: NO. 1265 | # This tag requires that the tag GENERATE_HTML is set to YES. 1266 | 1267 | HTML_TIMESTAMP = NO 1268 | 1269 | # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML 1270 | # documentation will contain a main index with vertical navigation menus that 1271 | # are dynamically created via JavaScript. If disabled, the navigation index will 1272 | # consists of multiple levels of tabs that are statically embedded in every HTML 1273 | # page. Disable this option to support browsers that do not have JavaScript, 1274 | # like the Qt help browser. 1275 | # The default value is: YES. 1276 | # This tag requires that the tag GENERATE_HTML is set to YES. 1277 | 1278 | HTML_DYNAMIC_MENUS = YES 1279 | 1280 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 1281 | # documentation will contain sections that can be hidden and shown after the 1282 | # page has loaded. 1283 | # The default value is: NO. 1284 | # This tag requires that the tag GENERATE_HTML is set to YES. 1285 | 1286 | HTML_DYNAMIC_SECTIONS = NO 1287 | 1288 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries 1289 | # shown in the various tree structured indices initially; the user can expand 1290 | # and collapse entries dynamically later on. Doxygen will expand the tree to 1291 | # such a level that at most the specified number of entries are visible (unless 1292 | # a fully collapsed tree already exceeds this amount). So setting the number of 1293 | # entries 1 will produce a full collapsed tree by default. 0 is a special value 1294 | # representing an infinite number of entries and will result in a full expanded 1295 | # tree by default. 1296 | # Minimum value: 0, maximum value: 9999, default value: 100. 1297 | # This tag requires that the tag GENERATE_HTML is set to YES. 1298 | 1299 | HTML_INDEX_NUM_ENTRIES = 100 1300 | 1301 | # If the GENERATE_DOCSET tag is set to YES, additional index files will be 1302 | # generated that can be used as input for Apple's Xcode 3 integrated development 1303 | # environment (see: https://developer.apple.com/xcode/), introduced with OSX 1304 | # 10.5 (Leopard). To create a documentation set, doxygen will generate a 1305 | # Makefile in the HTML output directory. Running make will produce the docset in 1306 | # that directory and running make install will install the docset in 1307 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at 1308 | # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy 1309 | # genXcode/_index.html for more information. 1310 | # The default value is: NO. 1311 | # This tag requires that the tag GENERATE_HTML is set to YES. 1312 | 1313 | GENERATE_DOCSET = NO 1314 | 1315 | # This tag determines the name of the docset feed. A documentation feed provides 1316 | # an umbrella under which multiple documentation sets from a single provider 1317 | # (such as a company or product suite) can be grouped. 1318 | # The default value is: Doxygen generated docs. 1319 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1320 | 1321 | DOCSET_FEEDNAME = "Doxygen generated docs" 1322 | 1323 | # This tag specifies a string that should uniquely identify the documentation 1324 | # set bundle. This should be a reverse domain-name style string, e.g. 1325 | # com.mycompany.MyDocSet. Doxygen will append .docset to the name. 1326 | # The default value is: org.doxygen.Project. 1327 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1328 | 1329 | DOCSET_BUNDLE_ID = org.doxygen.Project 1330 | 1331 | # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify 1332 | # the documentation publisher. This should be a reverse domain-name style 1333 | # string, e.g. com.mycompany.MyDocSet.documentation. 1334 | # The default value is: org.doxygen.Publisher. 1335 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1336 | 1337 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 1338 | 1339 | # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. 1340 | # The default value is: Publisher. 1341 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1342 | 1343 | DOCSET_PUBLISHER_NAME = Publisher 1344 | 1345 | # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three 1346 | # additional HTML index files: index.hhp, index.hhc, and index.hhk. The 1347 | # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop 1348 | # (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on 1349 | # Windows. 1350 | # 1351 | # The HTML Help Workshop contains a compiler that can convert all HTML output 1352 | # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML 1353 | # files are now used as the Windows 98 help format, and will replace the old 1354 | # Windows help format (.hlp) on all Windows platforms in the future. Compressed 1355 | # HTML files also contain an index, a table of contents, and you can search for 1356 | # words in the documentation. The HTML workshop also contains a viewer for 1357 | # compressed HTML files. 1358 | # The default value is: NO. 1359 | # This tag requires that the tag GENERATE_HTML is set to YES. 1360 | 1361 | GENERATE_HTMLHELP = NO 1362 | 1363 | # The CHM_FILE tag can be used to specify the file name of the resulting .chm 1364 | # file. You can add a path in front of the file if the result should not be 1365 | # written to the html output directory. 1366 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1367 | 1368 | CHM_FILE = 1369 | 1370 | # The HHC_LOCATION tag can be used to specify the location (absolute path 1371 | # including file name) of the HTML help compiler (hhc.exe). If non-empty, 1372 | # doxygen will try to run the HTML help compiler on the generated index.hhp. 1373 | # The file has to be specified with full path. 1374 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1375 | 1376 | HHC_LOCATION = 1377 | 1378 | # The GENERATE_CHI flag controls if a separate .chi index file is generated 1379 | # (YES) or that it should be included in the master .chm file (NO). 1380 | # The default value is: NO. 1381 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1382 | 1383 | GENERATE_CHI = NO 1384 | 1385 | # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) 1386 | # and project file content. 1387 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1388 | 1389 | CHM_INDEX_ENCODING = 1390 | 1391 | # The BINARY_TOC flag controls whether a binary table of contents is generated 1392 | # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it 1393 | # enables the Previous and Next buttons. 1394 | # The default value is: NO. 1395 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1396 | 1397 | BINARY_TOC = NO 1398 | 1399 | # The TOC_EXPAND flag can be set to YES to add extra items for group members to 1400 | # the table of contents of the HTML help documentation and to the tree view. 1401 | # The default value is: NO. 1402 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1403 | 1404 | TOC_EXPAND = NO 1405 | 1406 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1407 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that 1408 | # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help 1409 | # (.qch) of the generated HTML documentation. 1410 | # The default value is: NO. 1411 | # This tag requires that the tag GENERATE_HTML is set to YES. 1412 | 1413 | GENERATE_QHP = NO 1414 | 1415 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify 1416 | # the file name of the resulting .qch file. The path specified is relative to 1417 | # the HTML output folder. 1418 | # This tag requires that the tag GENERATE_QHP is set to YES. 1419 | 1420 | QCH_FILE = 1421 | 1422 | # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help 1423 | # Project output. For more information please see Qt Help Project / Namespace 1424 | # (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). 1425 | # The default value is: org.doxygen.Project. 1426 | # This tag requires that the tag GENERATE_QHP is set to YES. 1427 | 1428 | QHP_NAMESPACE = org.doxygen.Project 1429 | 1430 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt 1431 | # Help Project output. For more information please see Qt Help Project / Virtual 1432 | # Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- 1433 | # folders). 1434 | # The default value is: doc. 1435 | # This tag requires that the tag GENERATE_QHP is set to YES. 1436 | 1437 | QHP_VIRTUAL_FOLDER = doc 1438 | 1439 | # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom 1440 | # filter to add. For more information please see Qt Help Project / Custom 1441 | # Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- 1442 | # filters). 1443 | # This tag requires that the tag GENERATE_QHP is set to YES. 1444 | 1445 | QHP_CUST_FILTER_NAME = 1446 | 1447 | # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the 1448 | # custom filter to add. For more information please see Qt Help Project / Custom 1449 | # Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- 1450 | # filters). 1451 | # This tag requires that the tag GENERATE_QHP is set to YES. 1452 | 1453 | QHP_CUST_FILTER_ATTRS = 1454 | 1455 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1456 | # project's filter section matches. Qt Help Project / Filter Attributes (see: 1457 | # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). 1458 | # This tag requires that the tag GENERATE_QHP is set to YES. 1459 | 1460 | QHP_SECT_FILTER_ATTRS = 1461 | 1462 | # The QHG_LOCATION tag can be used to specify the location of Qt's 1463 | # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the 1464 | # generated .qhp file. 1465 | # This tag requires that the tag GENERATE_QHP is set to YES. 1466 | 1467 | QHG_LOCATION = 1468 | 1469 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be 1470 | # generated, together with the HTML files, they form an Eclipse help plugin. To 1471 | # install this plugin and make it available under the help contents menu in 1472 | # Eclipse, the contents of the directory containing the HTML and XML files needs 1473 | # to be copied into the plugins directory of eclipse. The name of the directory 1474 | # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. 1475 | # After copying Eclipse needs to be restarted before the help appears. 1476 | # The default value is: NO. 1477 | # This tag requires that the tag GENERATE_HTML is set to YES. 1478 | 1479 | GENERATE_ECLIPSEHELP = NO 1480 | 1481 | # A unique identifier for the Eclipse help plugin. When installing the plugin 1482 | # the directory name containing the HTML and XML files should also have this 1483 | # name. Each documentation set should have its own identifier. 1484 | # The default value is: org.doxygen.Project. 1485 | # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. 1486 | 1487 | ECLIPSE_DOC_ID = org.doxygen.Project 1488 | 1489 | # If you want full control over the layout of the generated HTML pages it might 1490 | # be necessary to disable the index and replace it with your own. The 1491 | # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top 1492 | # of each HTML page. A value of NO enables the index and the value YES disables 1493 | # it. Since the tabs in the index contain the same information as the navigation 1494 | # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. 1495 | # The default value is: NO. 1496 | # This tag requires that the tag GENERATE_HTML is set to YES. 1497 | 1498 | DISABLE_INDEX = NO 1499 | 1500 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1501 | # structure should be generated to display hierarchical information. If the tag 1502 | # value is set to YES, a side panel will be generated containing a tree-like 1503 | # index structure (just like the one that is generated for HTML Help). For this 1504 | # to work a browser that supports JavaScript, DHTML, CSS and frames is required 1505 | # (i.e. any modern browser). Windows users are probably better off using the 1506 | # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can 1507 | # further fine-tune the look of the index. As an example, the default style 1508 | # sheet generated by doxygen has an example that shows how to put an image at 1509 | # the root of the tree instead of the PROJECT_NAME. Since the tree basically has 1510 | # the same information as the tab index, you could consider setting 1511 | # DISABLE_INDEX to YES when enabling this option. 1512 | # The default value is: NO. 1513 | # This tag requires that the tag GENERATE_HTML is set to YES. 1514 | 1515 | GENERATE_TREEVIEW = YES 1516 | 1517 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that 1518 | # doxygen will group on one line in the generated HTML documentation. 1519 | # 1520 | # Note that a value of 0 will completely suppress the enum values from appearing 1521 | # in the overview section. 1522 | # Minimum value: 0, maximum value: 20, default value: 4. 1523 | # This tag requires that the tag GENERATE_HTML is set to YES. 1524 | 1525 | ENUM_VALUES_PER_LINE = 4 1526 | 1527 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used 1528 | # to set the initial width (in pixels) of the frame in which the tree is shown. 1529 | # Minimum value: 0, maximum value: 1500, default value: 250. 1530 | # This tag requires that the tag GENERATE_HTML is set to YES. 1531 | 1532 | TREEVIEW_WIDTH = 250 1533 | 1534 | # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to 1535 | # external symbols imported via tag files in a separate window. 1536 | # The default value is: NO. 1537 | # This tag requires that the tag GENERATE_HTML is set to YES. 1538 | 1539 | EXT_LINKS_IN_WINDOW = NO 1540 | 1541 | # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg 1542 | # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see 1543 | # https://inkscape.org) to generate formulas as SVG images instead of PNGs for 1544 | # the HTML output. These images will generally look nicer at scaled resolutions. 1545 | # Possible values are: png The default and svg Looks nicer but requires the 1546 | # pdf2svg tool. 1547 | # The default value is: png. 1548 | # This tag requires that the tag GENERATE_HTML is set to YES. 1549 | 1550 | HTML_FORMULA_FORMAT = png 1551 | 1552 | # Use this tag to change the font size of LaTeX formulas included as images in 1553 | # the HTML documentation. When you change the font size after a successful 1554 | # doxygen run you need to manually remove any form_*.png images from the HTML 1555 | # output directory to force them to be regenerated. 1556 | # Minimum value: 8, maximum value: 50, default value: 10. 1557 | # This tag requires that the tag GENERATE_HTML is set to YES. 1558 | 1559 | FORMULA_FONTSIZE = 10 1560 | 1561 | # Use the FORMULA_TRANSPARENT tag to determine whether or not the images 1562 | # generated for formulas are transparent PNGs. Transparent PNGs are not 1563 | # supported properly for IE 6.0, but are supported on all modern browsers. 1564 | # 1565 | # Note that when changing this option you need to delete any form_*.png files in 1566 | # the HTML output directory before the changes have effect. 1567 | # The default value is: YES. 1568 | # This tag requires that the tag GENERATE_HTML is set to YES. 1569 | 1570 | FORMULA_TRANSPARENT = YES 1571 | 1572 | # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands 1573 | # to create new LaTeX commands to be used in formulas as building blocks. See 1574 | # the section "Including formulas" for details. 1575 | 1576 | FORMULA_MACROFILE = 1577 | 1578 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see 1579 | # https://www.mathjax.org) which uses client side JavaScript for the rendering 1580 | # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX 1581 | # installed or if you want to formulas look prettier in the HTML output. When 1582 | # enabled you may also need to install MathJax separately and configure the path 1583 | # to it using the MATHJAX_RELPATH option. 1584 | # The default value is: NO. 1585 | # This tag requires that the tag GENERATE_HTML is set to YES. 1586 | 1587 | USE_MATHJAX = NO 1588 | 1589 | # When MathJax is enabled you can set the default output format to be used for 1590 | # the MathJax output. See the MathJax site (see: 1591 | # http://docs.mathjax.org/en/latest/output.html) for more details. 1592 | # Possible values are: HTML-CSS (which is slower, but has the best 1593 | # compatibility), NativeMML (i.e. MathML) and SVG. 1594 | # The default value is: HTML-CSS. 1595 | # This tag requires that the tag USE_MATHJAX is set to YES. 1596 | 1597 | MATHJAX_FORMAT = HTML-CSS 1598 | 1599 | # When MathJax is enabled you need to specify the location relative to the HTML 1600 | # output directory using the MATHJAX_RELPATH option. The destination directory 1601 | # should contain the MathJax.js script. For instance, if the mathjax directory 1602 | # is located at the same level as the HTML output directory, then 1603 | # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax 1604 | # Content Delivery Network so you can quickly see the result without installing 1605 | # MathJax. However, it is strongly recommended to install a local copy of 1606 | # MathJax from https://www.mathjax.org before deployment. 1607 | # The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. 1608 | # This tag requires that the tag USE_MATHJAX is set to YES. 1609 | 1610 | MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 1611 | 1612 | # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax 1613 | # extension names that should be enabled during MathJax rendering. For example 1614 | # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols 1615 | # This tag requires that the tag USE_MATHJAX is set to YES. 1616 | 1617 | MATHJAX_EXTENSIONS = 1618 | 1619 | # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces 1620 | # of code that will be used on startup of the MathJax code. See the MathJax site 1621 | # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an 1622 | # example see the documentation. 1623 | # This tag requires that the tag USE_MATHJAX is set to YES. 1624 | 1625 | MATHJAX_CODEFILE = 1626 | 1627 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box for 1628 | # the HTML output. The underlying search engine uses javascript and DHTML and 1629 | # should work on any modern browser. Note that when using HTML help 1630 | # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) 1631 | # there is already a search function so this one should typically be disabled. 1632 | # For large projects the javascript based search engine can be slow, then 1633 | # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to 1634 | # search using the keyboard; to jump to the search box use + S 1635 | # (what the is depends on the OS and browser, but it is typically 1636 | # , /