1/30/2024 0 Comments Param doxygen![]() the element from the generated documentation. the version of the software in which the element being documented was introduced. the author of the element being documented. identifierĪdds a link to the specified class or method to the See also block of the documentation. identifierĮmbeds the body of the function with the specified qualified name into the documentation for the current element, in order to show an example of how the element could be used. ![]() Since Kotlin does not have checked exceptions, there is also no expectation that all possible exceptions are documented, but you can still use this tag when it provides useful information for users of the class. class, classĭocuments an exception which can be thrown by a method. This tag can be used for documenting properties declared in the primary constructor, where putting a doc comment directly before the property definition would be awkward. nameĭocuments the property of a class which has the specified name. The following two syntaxes are therefore name description. To better separate the parameter name from the description, if you prefer, you can enclose the name of the parameter in brackets. KDoc currently supports the following block tags: nameĭocuments a value parameter of a function or a type parameter of a class, property or function. If we change bool to boolean, and rename one_flip to oneFlip… we have a Java function.* This class has no useful logic it's just a documentation example. Both p and the possible return values are documented. * true if the result is heads and false if the result is tails Which one do I get for heads? Let us add an /** Now what about the return? We know that bool means a true or false. What does p represent? Does it represent the probability of heads or tails? /** ![]() The one_flip function needs a description. Seed the random number generator with the current time Suppose we have just finished writing a quick program to simulate a trick coin (i.e., a coin where heads and tails are not equally probable). However, I will leave those tweaks as a practice exercise. There are a few more tweaks to be made to the Java Cookbook documentation. We just updated the Java Constructor using the same process from the C++ version! What does r represent? Let us by add r to the documentation and clean up the description. Similar to the C++ Cookbook… the second constructor looks incomplete. * List each Recipe, seperating them with a blank line followed by "-" * This depends on implementation decisions (e.g., selected data Iterator iterator() * Compute the hashcode by adding all recipe hashcodes together. * true if both this and rhs are Cookbooks with the same boolean equals(Object rhs) * Compare two recipes based on the recipes they contain, ignoring the Let us perform a quick audit of a Java Cookbook Example. We revised the description for brevity and clarity.Īny time a function has a parameter it should be documented. ![]() We documented the input into the constructor (i.e., the parameter r) with an tag.* Create a Cookbook with a set recipe limit. The description should probably be cleaned up a little. * r max number of recipes that can be stored. What does r represent? Let us start by adding r to the documentation /** * outs output destination (e.g., cout or a file) * Display the Cookbook with each recipe separator by `\n-\n`. * true if both `this` should be listed before `rhs`īool operator<(const Cookbook& rhs) const * recipes then compare each pair of recipes, basing lhs < rhs on the * - If lhs and rhs have the same number of recipes, sort each set of * - If lhs has fewer recipes than rhs, lhs < rhs. * true if both this and rhs are Cookbooks with the same recipesīool operator=(const Cookbook& rhs) const * Compare two cookbooks based on the recipes they contain, ignoring the Void removeRecipe(const Recipe& to_remove) * part of this cookbook, this method becomes a no-op (it completes * `to_remove` is present in the cookbook. * to_remove recipe to remove from the cookbook * Create a Cookbook that can contain at most _r_ * Create a Cookbook that can contain at most MAX_RECIPES
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |