ClangStyleMessageFormatter
<p>The <code>ClangStyleMessageFormatter</code> is part of the SOFA framework's logging system, specifically within the <code>sofa::helper::logging</code> namespace. It inherits from the <code>MessageFormatter</code> class and provides a specific formatting style for log messages that mimics the Clang compiler's output format.</p> <p>The role of this component is to format messages in a consistent, human-readable manner, with prefixes indicating message severity (e.g., error, warning). It supports singleton usage through its <code>getInstance</code> method and has two key methods:</p> <ul> <li><code>formatMessage</code>: formats a given log message according to the Clang style and outputs it to an <code>std::ostream</code>.</li> <li><code>getPrefixText</code>: returns the text prefix for a given message type (e.g., "error", "warning"). This method is protected, intended for internal use within the formatter.</li> </ul> <p>This component interacts with other logging components by taking <code>Message</code> objects and formatting them into strings that can be logged or displayed. It does not require any specific data fields or links to other components but relies on its inheritance from <code>MessageFormatter</code>.</p>
- abstract
- The `ClangStyleMessageFormatter` formats log messages in a style similar to Clang compiler output, providing consistent logging for debugging and monitoring.
- sheet
- <h1>ClangStyleMessageFormatter</h1> <h2>Overview</h2> <p>The <code>ClangStyleMessageFormatter</code> is part of the SOFA framework's logging system within the <code>sofa::helper::logging</code> namespace. It inherits from the <code>MessageFormatter</code> class and formats log messages in a style similar to Clang compiler output, aiding in debugging and monitoring.</p> <h2>Parameters and Data</h2> <p>This component does not expose any significant data fields or parameters.</p> <h2>Practical Notes</h2> <p>The <code>ClangStyleMessageFormatter</code> is a utility for consistent logging output. It formats messages according to the Clang style and outputs them using its <code>formatMessage</code> method, which can be accessed via the singleton instance obtained from <code>getInstance</code>.</p>
- description
- <p>The <code>ClangStyleMessageFormatter</code> is part of the SOFA framework's logging system, specifically within the <code>sofa::helper::logging</code> namespace. It inherits from the <code>MessageFormatter</code> class and provides a specific formatting style for log messages that mimics the Clang compiler's output format.</p> <p>The role of this component is to format messages in a consistent, human-readable manner, with prefixes indicating message severity (e.g., error, warning). It supports singleton usage through its <code>getInstance</code> method and has two key methods:</p> <ul> <li><code>formatMessage</code>: formats a given log message according to the Clang style and outputs it to an <code>std::ostream</code>.</li> <li><code>getPrefixText</code>: returns the text prefix for a given message type (e.g., "error", "warning"). This method is protected, intended for internal use within the formatter.</li> </ul> <p>This component interacts with other logging components by taking <code>Message</code> objects and formatting them into strings that can be logged or displayed. It does not require any specific data fields or links to other components but relies on its inheritance from <code>MessageFormatter</code>.</p>
- maths
- The `ClangStyleMessageFormatter` is a logging utility within the SOFA framework, specifically designed to format log messages in a style similar to that used by the Clang compiler. This formatter does not contribute to any governing equations or operators typically found in FEM simulations such as mass matrix M, stiffness matrix K, internal force f_int, residual R, etc. Instead, its role is purely related to formatting and outputting logging information for debugging and monitoring purposes. **Governing Equations/Operators Involved:** None. This component does not directly participate in the numerical solution of any partial differential equations or variational formulations associated with FEM simulations. **Constitutive/Kinematic Laws Involved:** None. The `ClangStyleMessageFormatter` is purely a utility for message formatting and does not involve any material constitutive laws, strain measures, stress tensors, hyperelastic potentials, damping models, or constraint Jacobians typical in FEM formulations. **Role in the Global FEM Pipeline: Assembly, Time Integration, Nonlinear Solve, Linear Solve, Constraint Handling, Mapping:** The `ClangStyleMessageFormatter` is not involved in any aspect of the global FEM pipeline. It does not contribute to assembly, time integration, nonlinear solve, linear solve, constraint handling, or mappings within the simulation framework. **Numerical Methods/Discretization Choices Encoded: None.** The component does not implement any numerical methods or discretization schemes used in FEM simulations. **Fit into the Broader Variational/Lagrangian Mechanics Framework:** The `ClangStyleMessageFormatter` is orthogonal to the variational and Lagrangian mechanics framework that underpins FEM simulations. Its primary function is to provide a consistent logging output format, which aids in debugging and monitoring but does not impact the physics-based simulation pipeline. **Summary: The `ClangStyleMessageFormatter` is a utility component for logging purposes with no mathematical or physical content related to FEM simulations. It formats messages into strings that can be logged or displayed using a consistent style inspired by Clang compiler output.
{
"name": "ClangStyleMessageFormatter",
"main": {
"name": "ClangStyleMessageFormatter",
"namespace": "sofa::helper::logging",
"module": "Sofa.framework.Helper",
"include": "sofa/helper/logging/ClangStyleMessageFormatter.h",
"doc": "",
"inherits": [
"MessageFormatter"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "getInstance",
"return_type": "ClangStyleMessageFormatter &",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": true,
"access": "public"
},
{
"name": "formatMessage",
"return_type": "void",
"params": [
{
"name": "m",
"type": "const Message &"
},
{
"name": "out",
"type": "int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getPrefixText",
"return_type": "int",
"params": [
{
"name": "type",
"type": "unsigned int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
}
]
},
"desc": {
"description": "<p>The <code>ClangStyleMessageFormatter</code> is part of the SOFA framework's logging system, specifically within the <code>sofa::helper::logging</code> namespace. It inherits from the <code>MessageFormatter</code> class and provides a specific formatting style for log messages that mimics the Clang compiler's output format.</p>\n\n<p>The role of this component is to format messages in a consistent, human-readable manner, with prefixes indicating message severity (e.g., error, warning). It supports singleton usage through its <code>getInstance</code> method and has two key methods:</p>\n<ul>\n<li><code>formatMessage</code>: formats a given log message according to the Clang style and outputs it to an <code>std::ostream</code>.</li>\n<li><code>getPrefixText</code>: returns the text prefix for a given message type (e.g., \"error\", \"warning\"). This method is protected, intended for internal use within the formatter.</li>\n</ul>\n\n<p>This component interacts with other logging components by taking <code>Message</code> objects and formatting them into strings that can be logged or displayed. It does not require any specific data fields or links to other components but relies on its inheritance from <code>MessageFormatter</code>.</p>"
},
"maths": {
"maths": "The `ClangStyleMessageFormatter` is a logging utility within the SOFA framework, specifically designed to format log messages in a style similar to that used by the Clang compiler. This formatter does not contribute to any governing equations or operators typically found in FEM simulations such as mass matrix M, stiffness matrix K, internal force f_int, residual R, etc. Instead, its role is purely related to formatting and outputting logging information for debugging and monitoring purposes.\n\n**Governing Equations/Operators Involved:**\nNone. This component does not directly participate in the numerical solution of any partial differential equations or variational formulations associated with FEM simulations.\n\n**Constitutive/Kinematic Laws Involved:**\nNone. The `ClangStyleMessageFormatter` is purely a utility for message formatting and does not involve any material constitutive laws, strain measures, stress tensors, hyperelastic potentials, damping models, or constraint Jacobians typical in FEM formulations.\n\n**Role in the Global FEM Pipeline: Assembly, Time Integration, Nonlinear Solve, Linear Solve, Constraint Handling, Mapping:**\nThe `ClangStyleMessageFormatter` is not involved in any aspect of the global FEM pipeline. It does not contribute to assembly, time integration, nonlinear solve, linear solve, constraint handling, or mappings within the simulation framework.\n\n**Numerical Methods/Discretization Choices Encoded: None.**\nThe component does not implement any numerical methods or discretization schemes used in FEM simulations.\n\n**Fit into the Broader Variational/Lagrangian Mechanics Framework:**\nThe `ClangStyleMessageFormatter` is orthogonal to the variational and Lagrangian mechanics framework that underpins FEM simulations. Its primary function is to provide a consistent logging output format, which aids in debugging and monitoring but does not impact the physics-based simulation pipeline.\n\n**Summary: The `ClangStyleMessageFormatter` is a utility component for logging purposes with no mathematical or physical content related to FEM simulations. It formats messages into strings that can be logged or displayed using a consistent style inspired by Clang compiler output."
},
"summary": {
"abstract": "The `ClangStyleMessageFormatter` formats log messages in a style similar to Clang compiler output, providing consistent logging for debugging and monitoring.",
"sheet": "<h1>ClangStyleMessageFormatter</h1>\n\n<h2>Overview</h2>\n<p>The <code>ClangStyleMessageFormatter</code> is part of the SOFA framework's logging system within the <code>sofa::helper::logging</code> namespace. It inherits from the <code>MessageFormatter</code> class and formats log messages in a style similar to Clang compiler output, aiding in debugging and monitoring.</p>\n\n<h2>Parameters and Data</h2>\n<p>This component does not expose any significant data fields or parameters.</p>\n\n<h2>Practical Notes</h2>\n<p>The <code>ClangStyleMessageFormatter</code> is a utility for consistent logging output. It formats messages according to the Clang style and outputs them using its <code>formatMessage</code> method, which can be accessed via the singleton instance obtained from <code>getInstance</code>.</p>"
}
}