|
mstring
1.3.1
Generates C++ message functions and classes from localized message definitions
|
Writers for everything generated from one $MESSAGE: the declarations in the header and the definitions in the source.
More...
Include dependency graph for MMessage.hh:
This graph shows which files directly or indirectly include this file:Classes | |
| class | MessagePrototypeWriter |
| struct | MessagePrototypeWriter::Placement |
| Where a generated function lives and what it takes. More... | |
| class | MessageHeaderWriter |
| class | MessageCodeWriter |
Enumerations | |
| enum class | FunctionKind { String , Error , Throw , Log } |
The functions a FunctionConcept generates. More... | |
Functions | |
| bool | NeedsStreamer (const Message &message) |
| Whether a message needs the stream / the string text function. More... | |
| bool | NeedsBuilder (const Message &message) |
| void | WriteLocaleMatcher (std::ostream &stream) |
Define the locale-name matcher: exact name, or the language followed by '_', '.' or '@' — [tr] and [tr_TR] both select tr_TR.UTF-8. More... | |
Variables | |
| const char *const | LocaleMatcherName |
Name of the helper the source defines when a message has several languages; see WriteLocaleMatcher(). More... | |
Writers for everything generated from one $MESSAGE: the declarations in the header and the definitions in the source.
Per message the source gets up to two static text functions: InternalStreamerFunctionOf_<name> writes the text to a std::ostream (for the streamable class and the error function), and InternalBuilderOf_<name> appends it to a std::string without a stream (for the string and syslog functions and the exception's What()) — several times faster than building through a std::ostringstream.
|
strong |
The functions a FunctionConcept generates.
| Enumerator | |
|---|---|
| String | |
| Error | |
| Throw | |
| Log | |
| bool NeedsStreamer | ( | const Message & | message | ) |
Whether a message needs the stream / the string text function.
References Concept::_Active, MessageSettings::_Error, MessageSettings::_Streamable, and Message::Settings.
Referenced by MessageCodeWriter::operator()().
Here is the caller graph for this function:| bool NeedsBuilder | ( | const Message & | message | ) |
References Concept::_Active, MessageSettings::_Exception, MessageSettings::_Log, MessageSettings::_String, MessageSettings::_Throw, and Message::Settings.
Referenced by MessageCodeWriter::operator()(), and WriteDefinitions().
Here is the caller graph for this function:| void WriteLocaleMatcher | ( | std::ostream & | stream | ) |
Define the locale-name matcher: exact name, or the language followed by '_', '.' or '@' — [tr] and [tr_TR] both select tr_TR.UTF-8.
References GenerationMode::CloseHelpers(), GenerationMode::Linkage(), LocaleMatcherName, Mode, and GenerationMode::OpenHelpers().
Referenced by WriteDefinitions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
extern |
Name of the helper the source defines when a message has several languages; see WriteLocaleMatcher().
Referenced by MessageCodeWriter::TextFunction(), and WriteLocaleMatcher().