Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
Diff: Base.h
- Revision:
- 43:e2ed12d17f06
- Parent:
- 27:7110ebee3484
--- a/Base.h Wed Aug 29 12:44:47 2012 +0100
+++ b/Base.h Fri Oct 26 17:40:46 2012 +0100
@@ -26,8 +26,7 @@
};
#endif
-/* Class Base
- * The base class for most things
+/** The base class for most things
*/
class Base {
@@ -37,66 +36,63 @@
virtual ~Base();
- /* Function register_object
- * Registers this object with the given name, so that it can be
+ /** Registers this object with the given name, so that it can be
* looked up with lookup. If this object has already been
* registered, then this just changes the name.
*
- * Variables
- * name - The name to give the object. If NULL we do nothing.
+ * @param name The name to give the object. If NULL we do nothing.
*/
void register_object(const char *name);
- /* Function name
- * Returns the name of the object, or NULL if it has no name.
+ /** Returns the name of the object
+ *
+ * @returns
+ * The name of the object, or NULL if it has no name.
*/
const char *name();
#ifdef MBED_RPC
- /* Function rpc
- * Call the given method with the given arguments, and write the
+ /** Call the given method with the given arguments, and write the
* result into the string pointed to by result. The default
* implementation calls rpc_methods to determine the supported
* methods.
*
- * Variables
- * method - The name of the method to call.
- * arguments - A list of arguments separated by spaces.
- * result - A pointer to a string to write the result into. May
- * be NULL, in which case nothing is written.
+ * @param method The name of the method to call.
+ * @param arguments A list of arguments separated by spaces.
+ * @param result A pointer to a string to write the result into. May be NULL, in which case nothing is written.
*
- * Returns
- * true if method corresponds to a valid rpc method, or
- * false otherwise.
+ * @returns
+ * true if method corresponds to a valid rpc method, or
+ * false otherwise.
*/
- virtual bool rpc(const char *method, const char *arguments, char *result);
+ virtual bool rpc(const char *method, const char *arguments, char *result);
- /* Function get_rpc_methods
- * Returns a pointer to an array describing the rpc methods
+ /** Returns a pointer to an array describing the rpc methods
* supported by this object, terminated by either
* RPC_METHOD_END or RPC_METHOD_SUPER(Superclass).
*
* Example
- * > class Example : public Base {
- * > int foo(int a, int b) { return a + b; }
- * > virtual const struct rpc_method *get_rpc_methods() {
- * > static const rpc_method rpc_methods[] = {
- * > { "foo", generic_caller<int, Example, int, int, &Example::foo> },
- * > RPC_METHOD_SUPER(Base)
- * > };
- * > return rpc_methods;
- * > }
- * > };
+ * @code
+ * class Example : public Base {
+ * int foo(int a, int b) { return a + b; }
+ * virtual const struct rpc_method *get_rpc_methods() {
+ * static const rpc_method rpc_methods[] = {
+ * { "foo", generic_caller<int, Example, int, int, &Example::foo> },
+ * RPC_METHOD_SUPER(Base)
+ * };
+ * return rpc_methods;
+ * }
+ * };
+ * @endcode
*/
virtual const struct rpc_method *get_rpc_methods();
- /* Function rpc
- * Use the lookup function to lookup an object and, if
+ /** Use the lookup function to lookup an object and, if
* successful, call its rpc method
*
- * Variables
- * returns - false if name does not correspond to an object,
+ * @returns
+ * false if name does not correspond to an object,
* otherwise the return value of the call to the object's rpc
* method.
*/
@@ -104,12 +100,10 @@
#endif
- /* Function lookup
- * Lookup and return the object that has the given name.
+ /** Lookup and return the object that has the given name.
*
- * Variables
- * name - the name to lookup.
- * len - the length of name.
+ * @param name the name to lookup.
+ * @param len the length of name.
*/
static Base *lookup(const char *name, unsigned int len);
@@ -141,8 +135,7 @@
public:
#ifdef MBED_RPC
- /* Function add_rpc_class
- * Add the class to the list of classes which can have static
+ /** Add the class to the list of classes which can have static
* methods called via rpc (the static methods which can be called
* are defined by that class' get_rpc_class() static method).
*/
@@ -206,15 +199,13 @@
};
-/* Macro MBED_OBJECT_NAME_MAX
- * The maximum size of object name (including terminating null byte)
+/** The maximum size of object name (including terminating null byte)
* that will be recognised when using fopen to open a FileLike
* object, or when using the rpc function.
*/
#define MBED_OBJECT_NAME_MAX 32
-/* Macro MBED_METHOD_NAME_MAX
- * The maximum size of rpc method name (including terminating null
+/** The maximum size of rpc method name (including terminating null
* byte) that will be recognised by the rpc function (in rpc.h).
*/
#define MBED_METHOD_NAME_MAX 32


