brintos

brintos / llvm-project-archived public Read only

0
0
Text · 23.2 KiB · 9c1ed29 Raw
445 lines · plain
1// RUN: rm -rf %t && mkdir -p %t/docs %t/build2// RUN: sed 's|$test_dir|%/S|g' %S/Inputs/basic-project/database_template.json > %t/build/compile_commands.json3 4// RUN: clang-doc --format=html --output=%t/docs --executor=all-TUs %t/build/compile_commands.json5// RUN: FileCheck %s -input-file=%t/docs/index_json.js -check-prefix=JSON-INDEX6// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Shape.html -check-prefix=HTML-SHAPE7// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Calculator.html -check-prefix=HTML-CALC8// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefix=HTML-RECTANGLE9// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefix=HTML-CIRCLE10 11// RUN: clang-doc --format=html --output=%t/docs-with-prefix --executor=all-TUs %t/build/compile_commands.json --repository=https://repository.com --repository-line-prefix=L12// RUN: FileCheck %s -input-file=%t/docs-with-prefix/GlobalNamespace/Shape.html -check-prefixes=HTML-SHAPE,SHAPE-LINE-PREFIX13// RUN: FileCheck %s -input-file=%t/docs-with-prefix/GlobalNamespace/Calculator.html -check-prefixes=HTML-CALC,CALC-LINE-PREFIX14// RUN: FileCheck %s -input-file=%t/docs-with-prefix/GlobalNamespace/Rectangle.html -check-prefixes=HTML-RECTANGLE,RECTANGLE-LINE-PREFIX15// RUN: FileCheck %s -input-file=%t/docs-with-prefix/GlobalNamespace/Circle.html -check-prefixes=HTML-CIRCLE,CIRCLE-LINE-PREFIX16 17// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Shape.html -check-prefixes=HTML-SHAPE,SHAPE-NO-REPOSITORY18// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Calculator.html -check-prefixes=HTML-CALC,CALC-NO-REPOSITORY19// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefixes=HTML-RECTANGLE,RECTANGLE-NO-REPOSITORY20// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefixes=HTML-CIRCLE,CIRCLE-NO-REPOSITORY21 22// RUN: clang-doc --format=html --output=%t/docs --executor=all-TUs %t/build/compile_commands.json --repository=https://repository.com23// RUN: FileCheck %s -input-file=%t/docs/index_json.js -check-prefixes=JSON-INDEX24// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Shape.html -check-prefixes=HTML-SHAPE,SHAPE-REPOSITORY25// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Calculator.html -check-prefixes=HTML-CALC,CALC-REPOSITORY26// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefixes=HTML-RECTANGLE,RECTANGLE-REPOSITORY27// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefixes=HTML-CIRCLE,CIRCLE-REPOSITORY28 29// RUN: clang-doc --format=md --output=%t/docs --executor=all-TUs %t/build/compile_commands.json30// RUN: FileCheck %s -input-file=%t/docs/all_files.md -check-prefixes=MD-ALL-FILES31// RUN: FileCheck %s -input-file=%t/docs/index.md -check-prefixes=MD-INDEX32// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Shape.md -check-prefixes=MD-SHAPE33// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Calculator.md -check-prefixes=MD-CALC34// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.md -check-prefixes=MD-RECTANGLE35// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.md -check-prefixes=MD-CIRCLE36 37// JSON-INDEX: async function LoadIndex() {38// JSON-INDEX-NEXT: return{39// JSON-INDEX-NEXT:   "USR": "{{([0-9A-F]{40})}}",40// JSON-INDEX-NEXT:   "Name": "",41// JSON-INDEX-NEXT:   "RefType": "default",42// JSON-INDEX-NEXT:   "Path": "",43// JSON-INDEX-NEXT:   "Children": [44// JSON-INDEX-NEXT:     {45// JSON-INDEX-NEXT:       "USR": "{{([0-9A-F]{40})}}",46// JSON-INDEX-NEXT:       "Name": "GlobalNamespace",47// JSON-INDEX-NEXT:       "RefType": "namespace",48// JSON-INDEX-NEXT:       "Path": "GlobalNamespace",49// JSON-INDEX-NEXT:       "Children": [50// JSON-INDEX-NEXT:         {51// JSON-INDEX-NEXT:           "USR": "{{([0-9A-F]{40})}}",52// JSON-INDEX-NEXT:           "Name": "Calculator",53// JSON-INDEX-NEXT:           "RefType": "record",54// JSON-INDEX-NEXT:           "Path": "GlobalNamespace",55// JSON-INDEX-NEXT:           "Children": []56// JSON-INDEX-NEXT:         },57// JSON-INDEX-NEXT:         {58// JSON-INDEX-NEXT:           "USR": "{{([0-9A-F]{40})}}",59// JSON-INDEX-NEXT:           "Name": "Circle",60// JSON-INDEX-NEXT:           "RefType": "record",61// JSON-INDEX-NEXT:           "Path": "GlobalNamespace",62// JSON-INDEX-NEXT:           "Children": []63// JSON-INDEX-NEXT:         },64// JSON-INDEX-NEXT:         {65// JSON-INDEX-NEXT:           "USR": "{{([0-9A-F]{40})}}",66// JSON-INDEX-NEXT:           "Name": "Rectangle",67// JSON-INDEX-NEXT:           "RefType": "record",68// JSON-INDEX-NEXT:           "Path": "GlobalNamespace",69// JSON-INDEX-NEXT:           "Children": []70// JSON-INDEX-NEXT:         },71// JSON-INDEX-NEXT:         {72// JSON-INDEX-NEXT:           "USR": "{{([0-9A-F]{40})}}",73// JSON-INDEX-NEXT:           "Name": "Shape",74// JSON-INDEX-NEXT:           "RefType": "record",75// JSON-INDEX-NEXT:           "Path": "GlobalNamespace",76// JSON-INDEX-NEXT:           "Children": []77// JSON-INDEX-NEXT:         }78// JSON-INDEX-NEXT:       ]79// JSON-INDEX-NEXT:     }80// JSON-INDEX-NEXT:   ]81// JSON-INDEX-NEXT: };82// JSON-INDEX-NEXT: }83 84//      HTML-SHAPE: <h1>class Shape</h1>85//   SHAPE-NO-REPOSITORY: <p>Defined at line 8 of file .{{.}}include{{.}}Shape.h</p>86//      SHAPE-REPOSITORY: <p>87// SHAPE-REPOSITORY-NEXT: Defined at line88// SHAPE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Shape.h#8">8</a>89//     SHAPE-LINE-PREFIX: <a href="https://repository.com/./include/Shape.h#L8">8</a>90// SHAPE-REPOSITORY-NEXT: of file91// SHAPE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Shape.h">Shape.h</a>92// SHAPE-REPOSITORY-NEXT: </p>93//      HTML-SHAPE: <div>brief</div>94//      HTML-SHAPE: <p> Abstract base class for shapes.</p>95//      HTML-SHAPE: <p> Provides a common interface for different types of shapes.</p>96//      HTML-SHAPE: <h2 id="Functions">Functions</h2>97//      HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">area</h3>98//      HTML-SHAPE: <p>public double area()</p>99//      HTML-SHAPE: <div>brief</div>100//      HTML-SHAPE: <p> Calculates the area of the shape.</p>101//      HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>102//      HTML-SHAPE: <p>public double perimeter()</p>103//      HTML-SHAPE: <div>brief</div>104//      HTML-SHAPE: <p> Calculates the perimeter of the shape.</p>105//      HTML-SHAPE: <div>return</div>106//      HTML-SHAPE: <p> double The perimeter of the shape.</p>107//      HTML-SHAPE: <h3 id="{{([0-9A-F]{40})}}">~Shape</h3>108//      HTML-SHAPE: <p>public void ~Shape()</p>109 110//   SHAPE-NO-REPOSITORY: Defined at line 13 of file .{{.}}include{{.}}Shape.h111//      SHAPE-REPOSITORY: Defined at line 112// SHAPE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Shape.h#13">13</a>113//     SHAPE-LINE-PREFIX: <a href="https://repository.com/./include/Shape.h#L13">13</a>114// SHAPE-REPOSITORY-NEXT: of file 115// SHAPE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Shape.h">Shape.h</a>116 117//      HTML-SHAPE: <div>brief</div>118//      HTML-SHAPE: <p> Virtual destructor.</p>119 120//      HTML-CALC: <h1>class Calculator</h1>121// CALC-NO-REPOSITORY: <p>Defined at line 8 of file .{{.}}include{{.}}Calculator.h</p>122//      CALC-REPOSITORY: <p>123// CALC-REPOSITORY-NEXT: Defined at line 124// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./include/Calculator.h#8">8</a>125//     CALC-LINE-PREFIX: <a href="https://repository.com/./include/Calculator.h#L8">8</a>126// CALC-REPOSITORY-NEXT: of file 127// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./include/Calculator.h">Calculator.h</a>128// CALC-REPOSITORY-NEXT: </p>129//      HTML-CALC: <div>brief</div>130//      HTML-CALC: <p> A simple calculator class.</p>131//      HTML-CALC: <p> Provides basic arithmetic operations.</p>132 133//      HTML-CALC: <h2 id="Members">Members</h2>134//      HTML-CALC: <div>brief</div>135//      HTML-CALC: <p> Holds a public value.</p>136//      HTML-CALC: <div>public int public_val</div>137//      HTML-CALC: <div>brief</div>138//      HTML-CALC: <p> A static value.</p>139//      HTML-CALC: <div>public static const int static_val</div>140 141//      HTML-CALC: <h2 id="Functions">Functions</h2>142//      HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">add</h3>143//      HTML-CALC: <p>public int add(int a, int b)</p>144//   CALC-NO-REPOSITORY: Defined at line 3 of file .{{.}}src{{.}}Calculator.cpp145//      CALC-REPOSITORY: Defined at line 146// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp#3">3</a>147//     CALC-LINE-PREFIX: <a href="https://repository.com/./src/Calculator.cpp#L3">3</a>148// CALC-REPOSITORY-NEXT: of file 149// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>150 151//      HTML-CALC: <div>brief</div>152//      HTML-CALC: <p> Adds two integers.</p>153//      HTML-CALC: <div>return</div>154//      HTML-CALC: <p> int The sum of a and b.</p>155//      HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">subtract</h3>156//      HTML-CALC: <p>public int subtract(int a, int b)</p>157//   CALC-NO-REPOSITORY: Defined at line 7 of file .{{.}}src{{.}}Calculator.cpp158//      CALC-REPOSITORY: Defined at line 159// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp#7">7</a>160//     CALC-LINE-PREFIX: <a href="https://repository.com/./src/Calculator.cpp#L7">7</a>161// CALC-REPOSITORY-NEXT: of file 162// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>163 164//      HTML-CALC: <div>brief</div>165//      HTML-CALC: <p> Subtracts the second integer from the first.</p>166//      HTML-CALC: <div>return</div>167//      HTML-CALC: <p> int The result of a - b.</p>168//      HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">multiply</h3>169//      HTML-CALC: <p>public int multiply(int a, int b)</p>170//   CALC-NO-REPOSITORY: Defined at line 11 of file .{{.}}src{{.}}Calculator.cpp171//      CALC-REPOSITORY: Defined at line 172// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp#11">11</a>173//     CALC-LINE-PREFIX: <a href="https://repository.com/./src/Calculator.cpp#L11">11</a>174// CALC-REPOSITORY-NEXT: of file 175// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>176 177//      HTML-CALC: <div>brief</div>178//      HTML-CALC: <p> Multiplies two integers.</p>179//      HTML-CALC: <div>return</div>180//      HTML-CALC: <p> int The product of a and b.</p>181//      HTML-CALC: <h3 id="{{([0-9A-F]{40})}}">divide</h3>182//      HTML-CALC: <p>public double divide(int a, int b)</p>183//   CALC-NO-REPOSITORY: Defined at line 15 of file .{{.}}src{{.}}Calculator.cpp184//      CALC-REPOSITORY: Defined at line 185// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp#15">15</a>186//     CALC-LINE-PREFIX: <a href="https://repository.com/./src/Calculator.cpp#L15">15</a>187// CALC-REPOSITORY-NEXT: of file 188// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./src/Calculator.cpp">Calculator.cpp</a>189 190//      HTML-CALC: <div>brief</div>191//      HTML-CALC: <p> Divides the first integer by the second.</p>192//      HTML-CALC: <div>return</div>193//      HTML-CALC: <p> double The result of a / b.</p>194//      HTML-CALC: <div>throw</div>195//      HTML-CALC: <p>if b is zero.</p>196 197//      HTML-CALC: <p>public static int mod(int a, int b)</p>198//   CALC-NO-REPOSITORY: Defined at line 54 of file .{{.}}include{{.}}Calculator.h199//      CALC-REPOSITORY: Defined at line 200// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./include/Calculator.h#54">54</a>201//     CALC-LINE-PREFIX: <a href="https://repository.com/./include/Calculator.h#L54">54</a>202// CALC-REPOSITORY-NEXT: of file 203// CALC-REPOSITORY-NEXT: <a href="https://repository.com/./include/Calculator.h">Calculator.h</a>204//      HTML-CALC: <div>brief</div>205//      HTML-CALC: <p> Performs the mod operation on integers.</p>206//      HTML-CALC: <div>return</div>207//      HTML-CALC: <p> The result of a % b.</p>208 209//      HTML-RECTANGLE: <h1>class Rectangle</h1>210// RECTANGLE-NO-REPOSITORY: <p>Defined at line 10 of file .{{.}}include{{.}}Rectangle.h</p>211//      RECTANGLE-REPOSITORY: <p>212// RECTANGLE-REPOSITORY-NEXT: Defined at line213// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Rectangle.h#10">10</a>214//     RECTANGLE-LINE-PREFIX: <a href="https://repository.com/./include/Rectangle.h#L10">10</a>215// RECTANGLE-REPOSITORY-NEXT: of file 216// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Rectangle.h">Rectangle.h</a>217// RECTANGLE-REPOSITORY-NEXT: </p>218 219//      HTML-RECTANGLE: <p> Represents a rectangle with a given width and height.</p>220//      HTML-RECTANGLE: <p>221//      HTML-RECTANGLE:   Inherits from222//      HTML-RECTANGLE:   <a href="Shape.html">Shape</a>223//      HTML-RECTANGLE: </p>224//      HTML-RECTANGLE: <h2 id="Members">Members</h2>225//      HTML-RECTANGLE: <p> Width of the rectangle.</p>226//      HTML-RECTANGLE: <div>private double width_</div>227//      HTML-RECTANGLE: <p> Height of the rectangle.</p>228//      HTML-RECTANGLE: <div>private double height_</div>229//      HTML-RECTANGLE: <h2 id="Functions">Functions</h2>230//      HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">Rectangle</h3>231//      HTML-RECTANGLE: <p>public void Rectangle(double width, double height)</p>232//   RECTANGLE-NO-REPOSITORY: Defined at line 3 of file .{{.}}src{{.}}Rectangle.cpp233//      RECTANGLE-REPOSITORY: Defined at line234// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Rectangle.cpp#3">3</a>235//     RECTANGLE-LINE-PREFIX: <a href="https://repository.com/./src/Rectangle.cpp#L3">3</a>236// RECTANGLE-REPOSITORY-NEXT: of file 237// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Rectangle.cpp">Rectangle.cpp</a>238 239//      HTML-RECTANGLE: <div>brief</div>240//      HTML-RECTANGLE: <p> Constructs a new Rectangle object.</p>241//      HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">area</h3>242//      HTML-RECTANGLE: <p>public double area()</p>243//   RECTANGLE-NO-REPOSITORY: Defined at line 6 of file .{{.}}src{{.}}Rectangle.cpp244//      RECTANGLE-REPOSITORY: Defined at line245// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Rectangle.cpp#6">6</a>246//     RECTANGLE-LINE-PREFIX: <a href="https://repository.com/./src/Rectangle.cpp#L6">6</a>247// RECTANGLE-REPOSITORY-NEXT: of file 248// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Rectangle.cpp">Rectangle.cpp</a>249 250//      HTML-RECTANGLE: <div>brief</div>251//      HTML-RECTANGLE: <p> Calculates the area of the rectangle.</p>252//      HTML-RECTANGLE: <div>return</div>253//      HTML-RECTANGLE: <p> double The area of the rectangle.</p>254//      HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>255//      HTML-RECTANGLE: <p>public double perimeter()</p>256//   RECTANGLE-NO-REPOSITORY: Defined at line 10 of file .{{.}}src{{.}}Rectangle.cpp257//      RECTANGLE-REPOSITORY: Defined at line258// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Rectangle.cpp#10">10</a>259// RECTANGLE-LINE-PREFIX: <a href="https://repository.com/./src/Rectangle.cpp#L10">10</a>260// RECTANGLE-REPOSITORY-NEXT: of file 261// RECTANGLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Rectangle.cpp">Rectangle.cpp</a>262//      HTML-RECTANGLE: <div>brief</div>263//      HTML-RECTANGLE: <p> Calculates the perimeter of the rectangle.</p>264//      HTML-RECTANGLE: <div>return</div>265//      HTML-RECTANGLE: <p> double The perimeter of the rectangle.</p>266 267//      HTML-CIRCLE: <h1>class Circle</h1>268// CIRCLE-NO-REPOSITORY: <p>Defined at line 10 of file .{{.}}include{{.}}Circle.h</p>269//      CIRCLE-REPOSITORY: <p>270// CIRCLE-REPOSITORY-NEXT: Defined at line 271// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Circle.h#10">10</a>272//     CIRCLE-LINE-PREFIX: <a href="https://repository.com/./include/Circle.h#L10">10</a>273// CIRCLE-REPOSITORY-NEXT: of file 274// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./include/Circle.h">Circle.h</a>275// CIRCLE-REPOSITORY-NEXT: </p>276 277//      HTML-CIRCLE: <div>brief</div>278//      HTML-CIRCLE: <p> Circle class derived from Shape.</p>279//      HTML-CIRCLE: <p> Represents a circle with a given radius.</p>280//      HTML-CIRCLE: <p>281//      HTML-CIRCLE:   Inherits from282//      HTML-CIRCLE:   <a href="Shape.html">Shape</a>283//      HTML-CIRCLE: </p>284//      HTML-CIRCLE: <h2 id="Members">Members</h2>285//      HTML-CIRCLE: <p> Radius of the circle.</p>286//      HTML-CIRCLE: <div>private double radius_</div>287//      HTML-CIRCLE: <h2 id="Functions">Functions</h2>288//      HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">Circle</h3>289//      HTML-CIRCLE: <p>public void Circle(double radius)</p>290//   CIRCLE-NO-REPOSITORY: Defined at line 3 of file .{{.}}src{{.}}Circle.cpp291//      CIRCLE-REPOSITORY: Defined at line 292// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Circle.cpp#3">3</a>293//     CIRCLE-LINE-PREFIX: <a href="https://repository.com/./src/Circle.cpp#L3">3</a>294// CIRCLE-REPOSITORY-NEXT:  of file 295// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Circle.cpp">Circle.cpp</a>296 297//      HTML-CIRCLE: <div>brief</div>298//      HTML-CIRCLE: <p> Constructs a new Circle object.</p>299//      HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">area</h3>300//      HTML-CIRCLE: <p>public double area()</p>301//   CIRCLE-NO-REPOSITORY: Defined at line 5 of file .{{.}}src{{.}}Circle.cpp302//      CIRCLE-REPOSITORY: Defined at line 303// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Circle.cpp#5">5</a>304//     CIRCLE-LINE-PREFIX: <a href="https://repository.com/./src/Circle.cpp#L5">5</a>305// CIRCLE-REPOSITORY-NEXT:  of file 306// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Circle.cpp">Circle.cpp</a>307 308//      HTML-CIRCLE: <div>brief</div>309//      HTML-CIRCLE: <p> Calculates the area of the circle.</p>310//      HTML-CIRCLE: <div>return</div>311//      HTML-CIRCLE: <p> double The area of the circle.</p>312//      HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>313//      HTML-CIRCLE: <p>public double perimeter()</p>314//   CIRCLE-NO-REPOSITORY: Defined at line  9 of file .{{.}}src{{.}}Circle.cpp315//      CIRCLE-REPOSITORY: Defined at line 316// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Circle.cpp#9">9</a>317//     CIRCLE-LINE-PREFIX: <a href="https://repository.com/./src/Circle.cpp#L9">9</a>318// CIRCLE-REPOSITORY-NEXT:  of file 319// CIRCLE-REPOSITORY-NEXT: <a href="https://repository.com/./src/Circle.cpp">Circle.cpp</a>320 321//      HTML-CIRCLE: <div>brief</div>322//      HTML-CIRCLE: <p> Calculates the perimeter of the circle.</p>323//      HTML-CIRCLE: <div>return</div>324//      HTML-CIRCLE: <p> double The perimeter of the circle.</p>325 326// MD-CALC: # class Calculator327// MD-CALC: *Defined at .{{[\/]}}include{{[\/]}}Calculator.h#8*328// MD-CALC: **brief** A simple calculator class.329// MD-CALC:  Provides basic arithmetic operations.330// MD-CALC: ## Members331// MD-CALC: public int public_val332// MD-CALC: public static const int static_val333// MD-CALC: ## Functions334// MD-CALC: ### add335// MD-CALC: *public int add(int a, int b)*336// MD-CALC: *Defined at .{{[\/]}}src{{[\/]}}Calculator.cpp#3*337// MD-CALC: **brief** Adds two integers.338// MD-CALC: **a** First integer.339// MD-CALC: **b** Second integer.340// MD-CALC: **return** int The sum of a and b.341// MD-CALC: ### subtract342// MD-CALC: *public int subtract(int a, int b)*343// MD-CALC: *Defined at .{{[\/]}}src{{[\/]}}Calculator.cpp#7*344// MD-CALC: **brief** Subtracts the second integer from the first.345// MD-CALC: **a** First integer.346// MD-CALC: **b** Second integer.347// MD-CALC: **return** int The result of a - b.348// MD-CALC: ### multiply349// MD-CALC: *public int multiply(int a, int b)*350// MD-CALC: *Defined at .{{[\/]}}src{{[\/]}}Calculator.cpp#11*351// MD-CALC: **brief** Multiplies two integers.352// MD-CALC: **a** First integer.353// MD-CALC: **b** Second integer.354// MD-CALC: **return** int The product of a and b.355// MD-CALC: ### divide356// MD-CALC: *public double divide(int a, int b)*357// MD-CALC: *Defined at .{{[\/]}}src{{[\/]}}Calculator.cpp#15*358// MD-CALC: **brief** Divides the first integer by the second.359// MD-CALC: **a** First integer.360// MD-CALC: **b** Second integer.361// MD-CALC: **return** double The result of a / b.362// MD-CALC: **throw**if b is zero.363// MD-CALC: ### mod364// MD-CALC: *public static int mod(int a, int b)*365// MD-CALC: *Defined at ./include{{[\/]}}Calculator.h#54*366// MD-CALC: **brief** Performs the mod operation on integers.367// MD-CALC: **a** First integer.368// MD-CALC: **b** Second integer.369// MD-CALC: **return** The result of a % b.370 371// MD-CIRCLE: # class Circle372// MD-CIRCLE: *Defined at .{{[\/]}}include{{[\/]}}Circle.h#10*373// MD-CIRCLE: **brief** Circle class derived from Shape.374// MD-CIRCLE:  Represents a circle with a given radius.375// MD-CIRCLE: Inherits from Shape376// MD-CIRCLE: ## Members377// MD-CIRCLE: private double radius_378// MD-CIRCLE: ## Functions379// MD-CIRCLE: ### Circle380// MD-CIRCLE: *public void Circle(double radius)*381// MD-CIRCLE: *Defined at .{{[\/]}}src{{[\/]}}Circle.cpp#3*382// MD-CIRCLE: **brief** Constructs a new Circle object.383// MD-CIRCLE: **radius** Radius of the circle.384// MD-CIRCLE: ### area385// MD-CIRCLE: *public double area()*386// MD-CIRCLE: *Defined at .{{[\/]}}src{{[\/]}}Circle.cpp#5*387// MD-CIRCLE: **brief** Calculates the area of the circle.388// MD-CIRCLE: **return** double The area of the circle.389// MD-CIRCLE: ### perimeter390// MD-CIRCLE: *public double perimeter()*391// MD-CIRCLE: *Defined at .{{[\/]}}src{{[\/]}}Circle.cpp#9*392// MD-CIRCLE: **brief** Calculates the perimeter of the circle.393// MD-CIRCLE: **return** double The perimeter of the circle.394 395// MD-RECTANGLE: # class Rectangle396// MD-RECTANGLE: *Defined at .{{[\/]}}include{{[\/]}}Rectangle.h#10*397// MD-RECTANGLE: **brief** Rectangle class derived from Shape.398// MD-RECTANGLE:  Represents a rectangle with a given width and height.399// MD-RECTANGLE: Inherits from Shape400// MD-RECTANGLE: ## Members401// MD-RECTANGLE: private double width_402// MD-RECTANGLE: private double height_403// MD-RECTANGLE: ## Functions404// MD-RECTANGLE: ### Rectangle405// MD-RECTANGLE: *public void Rectangle(double width, double height)*406// MD-RECTANGLE: *Defined at .{{[\/]}}src{{[\/]}}Rectangle.cpp#3*407// MD-RECTANGLE: **brief** Constructs a new Rectangle object.408// MD-RECTANGLE: **width** Width of the rectangle.409// MD-RECTANGLE: **height** Height of the rectangle.410// MD-RECTANGLE: ### area411// MD-RECTANGLE: *public double area()*412// MD-RECTANGLE: *Defined at .{{[\/]}}src{{[\/]}}Rectangle.cpp#6*413// MD-RECTANGLE: **brief** Calculates the area of the rectangle.414// MD-RECTANGLE: **return** double The area of the rectangle.415// MD-RECTANGLE: ### perimeter416// MD-RECTANGLE: *public double perimeter()*417// MD-RECTANGLE: *Defined at .{{[\/]}}src{{[\/]}}Rectangle.cpp#10*418// MD-RECTANGLE: **brief** Calculates the perimeter of the rectangle.419// MD-RECTANGLE: **return** double The perimeter of the rectangle.420 421// MD-SHAPE: # class Shape422// MD-SHAPE: *Defined at .{{[\/]}}include{{[\/]}}Shape.h#8*423// MD-SHAPE: **brief** Abstract base class for shapes.424// MD-SHAPE:  Provides a common interface for different types of shapes.425// MD-SHAPE: ## Functions426// MD-SHAPE: ### area427// MD-SHAPE: *public double area()*428// MD-SHAPE: **brief** Calculates the area of the shape.429// MD-SHAPE: **return** double The area of the shape.430// MD-SHAPE: ### perimeter431// MD-SHAPE: *public double perimeter()*432// MD-SHAPE: **brief** Calculates the perimeter of the shape.433// MD-SHAPE: **return** double The perimeter of the shape.434// MD-SHAPE: ### ~Shape435// MD-SHAPE: *public void ~Shape()*436// MD-SHAPE: *Defined at .{{[\/]}}include{{[\/]}}Shape.h#13*437// MD-SHAPE: **brief** Virtual destructor.438 439// MD-ALL-FILES: # All Files440// MD-ALL-FILES: ## [GlobalNamespace](GlobalNamespace{{[\/]}}index.md)441 442// MD-INDEX: #  C/C++ Reference443// MD-INDEX: * Namespace: [GlobalNamespace](GlobalNamespace)444 445