Changeset 7291
- Timestamp:
- Aug 31, 2010, 5:19:36 PM (14 years ago)
- Location:
- code/branches/doc/src/libraries
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/core/XMLPort.h
r7284 r7291 153 153 With this macro, you can simply use them instead of writing your own functions. 154 154 155 @example155 Example: 156 156 Your class is called SpaceShip and this class has an object (myPilot_) of class Pilot. Pilot has a name 157 157 and two functions, setName(name) and getName(). Now you want an attribute "pilotname" in your … … 231 231 } 232 232 233 @example233 Example: 234 234 Possible usage of the macro: 235 235 > XMLPortObject(SpaceShip, Weapon, "weapons", addWeapon, getWeapon, xmlelement, mode, false, true); -
code/branches/doc/src/libraries/util/Debug.h
r6443 r7291 52 52 6: Crazy debug information 53 53 54 @example 54 Example: 55 @code 55 56 COUT(0) << "Very important output" << std::endl; 56 57 COUT(1) << "Error: Something went wrong!" << std::endl; … … 58 59 COUT(3) << "Info: It's Monday" << std::endl; 59 60 COUT(4) << "Debug: x is 1.23456" << std::endl; 61 @endcode 60 62 */ 61 63 … … 96 98 where (a > b ? 0 : ) stands for COUT(x). This should explain how 97 99 this macro magic can possibly even work ;) 98 @example 100 101 Example: 102 @code 99 103 COUT(3) << "Some info" << std::endl; 104 @endcode 100 105 @note 101 106 The ? : operator requires both possible results to have the type of -
code/branches/doc/src/libraries/util/Math.cc
r7284 r7291 93 93 @return The angle 94 94 95 @example95 Examples: 96 96 If the other object is exactly in front of me, the function returns 0. 97 97 If the other object is exactly behind me, the function returns pi. … … 116 116 @return The viewing direction 117 117 118 @example118 Examples: 119 119 If the other object is exactly in front of me, the function returns Vector2(0, 0). 120 120 If the other object is exactly at my left, the function returns Vector2(-1, 0). … … 156 156 @return The viewing direction 157 157 158 @example158 Examples: 159 159 If the other object is exactly in front of me, the function returns Vector2(0, 0). 160 160 If the other object is exactly at my left, the function returns Vector2(-0.5, 0). -
code/branches/doc/src/libraries/util/MultiType.h
r7284 r7291 52 52 - setValue<T>(value) assigns a new value and changes the type to T. 53 53 54 @example 54 Examples: 55 @code 55 56 MultiType a = 10;; // a has now the type int and the value 10 56 57 a.setValue("3.14"); // a has still the type int and "3.14" gets converted, therefore the value is now 3 … … 58 59 a.convert<bool>(); // converts 3.14 to bool, which is true 59 60 a = false; // assigns false, this is equivalent to a.setValue(false) 61 @endcode 60 62 61 63 @note -
code/branches/doc/src/libraries/util/SubString.h
r7284 r7291 47 47 * but also removing leading and trailing spaces around the comma. 48 48 * 49 * @example49 * Example: 50 50 * Split the String std::string st = "1345, The new empire , is , orxonox" 51 51 * is splitted with: 52 * SubString(st, ',', " \n\t")52 * @code SubString(st, ',', " \n\t") @endcode 53 53 * into 54 54 * "1345", "The new empire", "is", "orxonox"
Note: See TracChangeset
for help on using the changeset viewer.