#include <graphattribs.h>
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.
◆ MAXON_INTERFACE()
◆ GetFlags()
◆ GetOrigin()
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.
- Returns
- The origin of the message.
◆ Format()
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.
- Parameters
-
[in] | language | The language to use, may be left empty. |
[in] | partFormatter | A delegate which is used to format parts of the message such as data types, can be null. |
- Returns
- Formatted human-readable message.
◆ GetData()
Allows to read the message's internal data. The data is valid as long as the message's lifetime. Any graph change will invalidate it.
- Returns
- The data (can be empty if message has no additional data).