|
mstring
1.3.1
Generates C++ message functions and classes from localized message definitions
|
Turns a parsed Module into the C++ header / source pair.
More...
Include dependency graph for MString.hh:
This graph shows which files directly or indirectly include this file:Functions | |
| void | ValidateModule (const Module &module) |
Reject message definitions the generated code could not compile with (e.g. MEMBER AS without a streamable class). Throws MException. More... | |
| std::string | HeaderFileName (const Module &module) |
The header file name (name.hh), or "" for NOHEADER. More... | |
| std::string | SourceFileName (const Module &module) |
The source file name (name.cpp), or "" for NOSOURCE. More... | |
| void | WriteCppInterface (std::ostream &stream, const Module &module, const std::string &input) |
Write the header. input names the message file in the banner. More... | |
| void | WriteCppImplementation (std::ostream &stream, const Module &module, const std::string &input) |
Write the source. With NOHEADER the declarations are written into it, so it compiles on its own. More... | |
| void | WriteDefinitions (std::ostream &stream, const Module &module) |
Includes, helpers and the definitions of every message — the body of the source, or the tail of the header for INLINE. More... | |
| bool | WriteIfChanged (const std::string &path, const std::string &content) |
Write content to path unless the file already holds exactly that — an unchanged message file does not trigger a rebuild. More... | |
Turns a parsed Module into the C++ header / source pair.
| void ValidateModule | ( | const Module & | module | ) |
Reject message definitions the generated code could not compile with (e.g. MEMBER AS without a streamable class). Throws MException.
References Concept::_Active, MessageSettings::_Error, MessageSettings::_Exception, MessageSettings::_Log, ClassConcept::_Override, ClassConcept::_Parent, MessageSettings::_Streamable, MessageSettings::_String, MessageSettings::_Throw, Module::HeaderExtension, Module::Inline, MEMBER_AS, Module::Messages, Message::Name, Module::Name, and Message::Settings.
Referenced by main().
Here is the caller graph for this function:| std::string HeaderFileName | ( | const Module & | module | ) |
The header file name (name.hh), or "" for NOHEADER.
References Module::HeaderExtension, and Module::Name.
Referenced by main(), WriteCppImplementation(), and WriteCppInterface().
Here is the caller graph for this function:| std::string SourceFileName | ( | const Module & | module | ) |
The source file name (name.cpp), or "" for NOSOURCE.
References Module::Name, and Module::SourceExtension.
Referenced by main(), and WriteCppImplementation().
Here is the caller graph for this function:| void WriteCppInterface | ( | std::ostream & | stream, |
| const Module & | module, | ||
| const std::string & | input | ||
| ) |
Write the header. input names the message file in the banner.
References Module::Export, GenerationMode::exportMacro, HeaderFileName(), Module::Inline, Mode, and WriteDefinitions().
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:| void WriteCppImplementation | ( | std::ostream & | stream, |
| const Module & | module, | ||
| const std::string & | input | ||
| ) |
Write the source. With NOHEADER the declarations are written into it, so it compiles on its own.
References Module::Export, GenerationMode::exportMacro, HeaderFileName(), Mode, SourceFileName(), and WriteDefinitions().
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:| void WriteDefinitions | ( | std::ostream & | stream, |
| const Module & | module | ||
| ) |
Includes, helpers and the definitions of every message — the body of the source, or the tail of the header for INLINE.
References Module::Inline, GenerationMode::inlineDefinitions, Module::Messages, Mode, Module::Namespaces, NeedsBuilder(), WriteAppendHelper(), and WriteLocaleMatcher().
Referenced by WriteCppImplementation(), and WriteCppInterface().
Here is the call graph for this function:
Here is the caller graph for this function:| bool WriteIfChanged | ( | const std::string & | path, |
| const std::string & | content | ||
| ) |
Write content to path unless the file already holds exactly that — an unchanged message file does not trigger a rebuild.
true if the file was written. Referenced by main().
Here is the caller graph for this function: