mstring  1.3.1
Generates C++ message functions and classes from localized message definitions
MMessage.cpp File Reference
#include "MMessage.hh"
#include <algorithm>
#include <ostream>
#include <vector>
#include "MParameter.hh"
#include "MText.hh"
+ Include dependency graph for MMessage.cpp:

Functions

bool NeedsStreamer (const Message &message)
 Whether a message needs the stream / the string text function. More...
 
bool NeedsBuilder (const Message &message)
 
void WriteLocaleMatcher (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 = "InternalLocaleMatches"
 Name of the helper the source defines when a message has several languages; see WriteLocaleMatcher(). More...
 

Function Documentation

◆ NeedsStreamer()

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:

◆ NeedsBuilder()

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:

◆ WriteLocaleMatcher()

void WriteLocaleMatcher ( 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:

Variable Documentation

◆ LocaleMatcherName

const char* const LocaleMatcherName = "InternalLocaleMatches"

Name of the helper the source defines when a message has several languages; see WriteLocaleMatcher().

Referenced by MessageCodeWriter::TextFunction(), and WriteLocaleMatcher().