mstring  1.3.1
Generates C++ message functions and classes from localized message definitions
GenerationMode Struct Reference

How definitions are emitted. Into a source file: helpers in an unnamed namespace, text functions static. Into the header ($MODULE ... INLINE): every definition inline, helpers in a named namespace behind an include guard, so several INLINE modules can share a translation unit. More...

#include <MWriter.hh>

+ Collaboration diagram for GenerationMode:

Public Member Functions

std::string Export () const
 "MACRO " or "". More...
 
const char * Linkage () const
 Prefix of a function definition: "inline " or "". More...
 
const char * TextFunctionLinkage () const
 Prefix of a per-message text function: "inline " or "static ". More...
 
std::string Helper (const std::string &name) const
 The qualified name of helper name. More...
 
void OpenHelpers (std::ostream &stream, const std::string &guard) const
 Open / close the namespace (and guard) the helper guard lives in. More...
 
void CloseHelpers (std::ostream &stream) const
 

Public Attributes

bool inlineDefinitions { false }
 
std::string exportMacro
 $EXPORT: put before classes and free-function declarations. More...
 

Detailed Description

How definitions are emitted. Into a source file: helpers in an unnamed namespace, text functions static. Into the header ($MODULE ... INLINE): every definition inline, helpers in a named namespace behind an include guard, so several INLINE modules can share a translation unit.

Member Function Documentation

◆ Export()

std::string GenerationMode::Export ( ) const

"MACRO " or "".

References exportMacro.

Referenced by MessagePrototypeWriter::Declarations(), MessageHeaderWriter::ExceptionClass(), and MessageHeaderWriter::StreamableClass().

+ Here is the caller graph for this function:

◆ Linkage()

const char * GenerationMode::Linkage ( ) const

Prefix of a function definition: "inline " or "".

References inlineDefinitions.

Referenced by MessageCodeWriter::ClassConstructor(), MessageCodeWriter::Definitions(), MessageCodeWriter::ExceptionClass(), MessageCodeWriter::StreamableClassBody(), and WriteLocaleMatcher().

+ Here is the caller graph for this function:

◆ TextFunctionLinkage()

const char * GenerationMode::TextFunctionLinkage ( ) const

Prefix of a per-message text function: "inline " or "static ".

References inlineDefinitions.

Referenced by MessageCodeWriter::TextFunction().

+ Here is the caller graph for this function:

◆ Helper()

std::string GenerationMode::Helper ( const std::string &  name) const

The qualified name of helper name.

References inlineDefinitions.

Referenced by MessageCodeWriter::TextFunction().

+ Here is the caller graph for this function:

◆ OpenHelpers()

void GenerationMode::OpenHelpers ( std::ostream &  stream,
const std::string &  guard 
) const

Open / close the namespace (and guard) the helper guard lives in.

References inlineDefinitions.

Referenced by WriteAppendHelper(), and WriteLocaleMatcher().

+ Here is the caller graph for this function:

◆ CloseHelpers()

void GenerationMode::CloseHelpers ( std::ostream &  stream) const

References inlineDefinitions.

Referenced by WriteAppendHelper(), and WriteLocaleMatcher().

+ Here is the caller graph for this function:

Member Data Documentation

◆ inlineDefinitions

bool GenerationMode::inlineDefinitions { false }

◆ exportMacro

std::string GenerationMode::exportMacro

$EXPORT: put before classes and free-function declarations.

Referenced by Export(), WriteCppImplementation(), and WriteCppInterface().


The documentation for this struct was generated from the following files: