Helper class to remove single and multi line comments from a file.
More...
#include <RemoveComments.h>
|
static void | RemoveLineComments (const char *szComment, char *szBuffer, char chReplacement=' ') |
|
static void | RemoveMultiLineComments (const char *szCommentStart, const char *szCommentEnd, char *szBuffer, char chReplacement=' ') |
|
Helper class to remove single and multi line comments from a file.
Some mesh formats like MD5 have comments that are quite similar to those in C or C++ so this code has been moved to a separate module.
◆ RemoveLineComments()
static void Assimp::CommentRemover::RemoveLineComments |
( |
const char * |
szComment, |
|
|
char * |
szBuffer, |
|
|
char |
chReplacement = ' ' |
|
) |
| |
|
static |
Remove single-line comments. The end of a line is expected to be either NL or CR or NLCR.
- Parameters
-
szComment | The start sequence of the comment, e.g. "//" |
szBuffer | Buffer to work with |
chReplacement | Character to be used as replacement for commented lines. By default this is ' ' |
◆ RemoveMultiLineComments()
static void Assimp::CommentRemover::RemoveMultiLineComments |
( |
const char * |
szCommentStart, |
|
|
const char * |
szCommentEnd, |
|
|
char * |
szBuffer, |
|
|
char |
chReplacement = ' ' |
|
) |
| |
|
static |
Remove multi-line comments. The end of a line is expected to be either NL or CR or NLCR. Multi-line comments may not be nested (as in C).
- Parameters
-
szCommentStart | The start sequence of the comment, e.g. "/*" |
szCommentEnd | The end sequence of the comment, e.g. "*‍/" |
szBuffer | Buffer to work with |
chReplacement | Character to be used as replacement for commented lines. By default this is ' ' |
The documentation for this class was generated from the following file: