Skip to content

Commit 9c49b77

Browse files
authored
Improved documentation style (ros#76)
Signed-off-by: ahcorde <[email protected]>
1 parent 220c9d3 commit 9c49b77

File tree

1 file changed

+48
-38
lines changed

1 file changed

+48
-38
lines changed

include/console_bridge/console.h

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@
7575
#define CONSOLE_BRIDGE_logDebug(...) \
7676
console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_DEBUG, __VA_ARGS__)
7777

78-
79-
/** \brief Message namespace. This contains classes needed to
80-
output error messages (or logging) from within the library.
81-
Message logging can be performed with \ref logging "logging macros" */
78+
/**
79+
* \brief Message namespace. This contains classes needed to output error messages (or logging)
80+
* from within the library. Message logging can be performed with \ref logging "logging macros"
81+
*/
8282
namespace console_bridge
8383
{
8484
/** \brief The set of priorities for message logging */
@@ -91,37 +91,37 @@ enum CONSOLE_BRIDGE_DLLAPI LogLevel
9191
CONSOLE_BRIDGE_LOG_NONE
9292
};
9393

94-
/** \brief Generic class to handle output from a piece of
95-
code.
96-
97-
In order to handle output from the library in different
98-
ways, an implementation of this class needs to be
99-
provided. This instance can be set with the useOutputHandler
100-
function. */
94+
/**
95+
* \brief Generic class to handle output from a piece of code.
96+
*
97+
* In order to handle output from the library in different ways, an implementation of this class
98+
* needs to be provided. This instance can be set with the useOutputHandler function.
99+
*/
101100
class CONSOLE_BRIDGE_DLLAPI OutputHandler
102101
{
103102
public:
104-
OutputHandler(void)
105-
{
106-
}
107-
108-
virtual ~OutputHandler(void)
109-
{
110-
}
111-
112-
/** \brief log a message to the output handler with the given text
113-
and logging level from a specific file and line number */
103+
OutputHandler(void){}
104+
105+
virtual ~OutputHandler(void){}
106+
107+
/**
108+
* \brief log a message to the output handler with the given text and logging level from a
109+
* specific file and line number
110+
* \param text to log
111+
* \param level console_bridge log level
112+
* \param filename of the output log
113+
* \param line
114+
*/
114115
virtual void log(const std::string &text, LogLevel level, const char *filename, int line) = 0;
115116
};
116117

117-
/** \brief Default implementation of OutputHandler. This sends
118-
the information to the console. */
118+
/**
119+
* \brief Default implementation of OutputHandler. This sends the information to the console.
120+
*/
119121
class CONSOLE_BRIDGE_DLLAPI OutputHandlerSTD : public OutputHandler
120122
{
121123
public:
122-
OutputHandlerSTD(void) : OutputHandler()
123-
{
124-
}
124+
OutputHandlerSTD(void) : OutputHandler(){}
125125

126126
virtual void log(const std::string &text, LogLevel level, const char *filename, int line);
127127
};
@@ -142,41 +142,51 @@ class CONSOLE_BRIDGE_DLLAPI OutputHandlerFile : public OutputHandler
142142
FILE *file_;
143143
};
144144

145-
/** \brief This function instructs ompl that no messages should be outputted.
145+
/**
146+
* \brief This function instructs console bridge that no messages should be outputted.
146147
* Equivalent to useOutputHandler(NULL)
147148
*/
148149
CONSOLE_BRIDGE_DLLAPI void noOutputHandler(void);
149150

150-
/** \brief Restore the output handler that was previously in use (if any) */
151+
/**
152+
* \brief Restore the output handler that was previously in use (if any)
153+
*/
151154
CONSOLE_BRIDGE_DLLAPI void restorePreviousOutputHandler(void);
152155

153-
/** \brief Specify the instance of the OutputHandler to use.
156+
/**
157+
* \brief Specify the instance of the OutputHandler to use.
154158
* By default, this is OutputHandlerSTD
155159
*/
156160
CONSOLE_BRIDGE_DLLAPI void useOutputHandler(OutputHandler *oh);
157161

158-
/** \brief Get the instance of the OutputHandler currently used.
162+
/**
163+
* \brief Get the instance of the OutputHandler currently used.
159164
* This is NULL in case there is no output handler.
160165
*/
161166
CONSOLE_BRIDGE_DLLAPI OutputHandler* getOutputHandler(void);
162167

163-
/** \brief Set the minimum level of logging data to output. Messages
164-
with lower logging levels will not be recorded. */
168+
/**
169+
* \brief Set the minimum level of logging data to output. Messages with lower logging levels will
170+
* not be recorded.
171+
*/
165172
CONSOLE_BRIDGE_DLLAPI void setLogLevel(LogLevel level);
166173

167-
/** \brief Retrieve the current level of logging data. Messages
168-
with lower logging levels will not be recorded. */
174+
/**
175+
* \brief Retrieve the current level of logging data. Messages with lower logging levels will not be
176+
* recorded.
177+
*/
169178
CONSOLE_BRIDGE_DLLAPI LogLevel getLogLevel(void);
170179

171-
/** \brief Root level logging function. This should not be invoked directly,
172-
but rather used via a \ref logging "logging macro". Formats the message
173-
string given the arguments and forwards the string to the output handler */
180+
/**
181+
* \brief Root level logging function. This should not be invoked directly, but rather used via a
182+
* \ref logging "logging macro". Formats the message string given the arguments and forwards the
183+
* string to the output handler
184+
*/
174185
CONSOLE_BRIDGE_DLLAPI void log(const char *file,
175186
int line,
176187
LogLevel level,
177188
const char* m,
178189
...);
179190
} // namespace console_bridge
180191

181-
182192
#endif // INCLUDE_CONSOLE_BRIDGE_CONSOLE_H_

0 commit comments

Comments
 (0)