This struct provides a namespace for static utility functions that parse source file names (as may be reported by the FILE macro), including Lakos-style component source and test driver names.
Declared in <bsls_bslsourcenameparserutil.h>
struct BslSourceNameParserUtil;
| Name | Description |
|---|---|
SourceTypes | Bit masks and constants describing the meaning of the type_p parameter of getComponentName. |
| Name | Description |
|---|---|
errorMessage | Return a static, brief English error message that describes the specified negative parsing errorCode. The behavior is undefined unless errorCode < 0 and was returned by one of the parsing methods (of this utility) that states in its contract to use this method to get the description of an error code. |
getComponentName | Parse the specified Lakos-style sourceName source file name with optional path portion to find the component name part. Return zero on success and a non-zero value if parsing failed. In case of success, fill the specified componentNamePtr with a pointer to the first character, and the specified componentNameLength with the number of character of the component name found. Optionally specify type_p. When type_p is not 0 set the bits of the pointed unsigned, according to SourceTypes, that describe the type of the source file that was parsed. |