GraphMessageInterface Class Reference

#include <graphattribs.h>

Inheritance diagram for GraphMessageInterface:

Detailed Description

A graph message is an error or warning message to tell the user about issues found in the graph. A graph attribute which has one of GraphAttributeInterface::FLAGS::ERROR, GraphAttributeInterface::FLAGS::WARNING set can produce such messages via the method GraphAttributeInterface::GetMessages. To query for messages use GraphNode::GetMessages.

Public Member Functions

MAXON_METHOD GraphAttributeInterface::FLAGS GetFlags () const
MAXON_METHOD const NodePath & GetOrigin () const
MAXON_METHOD String Format (const LanguageRef &language, const ErrorInterface::PartFormatter &partFormatter) const

Private Member Functions

 MAXON_INTERFACE (GraphMessageInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.graph.interface.message")

Member Function Documentation


MAXON_INTERFACE ( GraphMessageInterface  ,

◆ GetFlags()

Returns the flags of this message, either GraphAttributeInterface::FLAGS::ERROR, GraphAttributeInterface::FLAGS::WARNING or both.

Message flags.

◆ GetOrigin()

MAXON_METHOD const NodePath& GetOrigin ( ) const

Returns the origin of the message. The graph model implementation may propagate a message along connections, for example to make a message for a nested node visible at the outside of a group. In such cases the origin tells where the message originates.

The origin of the message.

◆ Format()

MAXON_METHOD String Format ( const LanguageRef &  language,
const ErrorInterface::PartFormatter partFormatter 
) const

Formats the message using the given language and formatter. The default implementation uses the delegate set by SetMessageDelegate or just GetMessage() if no such delegate has been set. This method can be overridden to support more human-friendly messages. The implementation may use the partFormatter to allow for customization of the formatting of certain parts of the error message.

[in]languageThe language to use, may be left empty.
[in]partFormatterA delegate which is used to format parts of the message such as data types, can be null.
Formatted human-readable message.