ASERStudio::AStorySyntax::AStoryXDiagnosticData Class
class ASERStudio::AStorySyntax::AStoryXDiagnosticDataAStoryXDiagnosticData记录AStoryX的诊断信息. 详情...
| 头文件: | #include <AStoryXDiagnosticData> |
| 自以下版本: | ASERStudio 2.0 |
公开类型
| enum | DiagnosticType { Undefined, UnknownError, RuleNotSelected, NoSuchRule, NoSuchController, …, NoSuchResource } |
公开成员函数
(自 ASERStudio 2.0 引入) | AStoryXDiagnosticData() |
(自 ASERStudio 2.0 引入) | AStoryXDiagnosticData(const QString &message, qint32 line, qint32 column, ASERStudio::AStorySyntax::AStoryXDiagnosticData::DiagnosticType type = DiagnosticType::Undefined, const QString &fixAdvice = "") |
(自 ASERStudio 2.0 引入) | AStoryXDiagnosticData(const ASERStudio::AStorySyntax::AStoryXDiagnosticData &other) |
(自 ASERStudio 2.0 引入) | AStoryXDiagnosticData(ASERStudio::AStorySyntax::AStoryXDiagnosticData &&other) |
(自 ASERStudio 2.0 引入) | ~AStoryXDiagnosticData() |
(自 ASERStudio 2.0 引入) qint32 | getColumn() const |
(自 ASERStudio 2.0 引入) QString | getFixAdvice() const |
(自 ASERStudio 2.0 引入) qint32 | getLine() const |
(自 ASERStudio 2.0 引入) QString | getMessage() const |
(自 ASERStudio 2.0 引入) ASERStudio::AStorySyntax::AStoryXDiagnosticData::DiagnosticType | getType() const |
(自 ASERStudio 2.0 引入) QString | toString() |
(自 ASERStudio 2.0 引入) ASERStudio::AStorySyntax::AStoryXDiagnosticData & | operator=(ASERStudio::AStorySyntax::AStoryXDiagnosticData &&other) |
(自 ASERStudio 2.0 引入) ASERStudio::AStorySyntax::AStoryXDiagnosticData & | operator=(const ASERStudio::AStorySyntax::AStoryXDiagnosticData &other) |
(自 ASERStudio 2.0 引入) bool | operator==(const ASERStudio::AStorySyntax::AStoryXDiagnosticData &other) const |
成员类型文档
enum AStoryXDiagnosticData::DiagnosticType
| Constant | Value | Description |
|---|---|---|
ASERStudio::AStorySyntax::AStoryXDiagnosticData::Undefined | 0x0000 | 未定义的错误类型 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UnknownError | 0x1000 | 未知错误 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::RuleNotSelected | 0x1001 | 没有选择任何规则 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::NoSuchRule | 0x1002 | 没有这样的规则 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::NoSuchController | 0x1003 | 没有这样的控制器 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::MissingRequiredParameter | 0x1004 | 缺少必选参数 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::ParameterTypeMismatch | 0x1005 | 参数类型不匹配 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::ParameterOutOfRange | 0x1006 | 参数值超出范围 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::ParameterFormatError | 0x1007 | 参数格式错误 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UnexpectedParameter | 0x1008 | 出现了意外的参数 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UnclosedSymbol | 0x1009 | 未闭合的符号,它泛指一切应该成对出现的符号(甚至包括XML标签) |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::VariableNotDefined | 0x100a | 变量未定义 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UseTabInsteadSpace | 0x100b | 使用了空格但应该使用制表符 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UseSpaceInsteadTab | 0x100c | 使用了制表符但应该使用空格 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UseEnglishPunctuation | 0x100d | 使用了中文标点但应该使用英文标点 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UseChinesePunctuation | 0x100e | 使用了英文标点但应该使用中文标点 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::NoSuchBlock | 0x100f | 找不到代码块 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::BlockNameConflict | 0x1010 | 代码块名称冲突 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::InstrumentRedundant | 0x1011 | 冗余的指令(重定义) |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::NoSuchPreprocessor | 0x1012 | 没有这样的处理器 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::ParameterRepeated | 0x1013 | 参数重定义 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::UnknownWarning | 0x2000 | 未知警告 |
ASERStudio::AStorySyntax::AStoryXDiagnosticData::NoSuchResource | 0x2001 | 没有这样的资源 |
UnknownError开始的错误类型均为可能导致AStoryX根本无法运行的错误, 而UnknownWarning开始的错误类型则是不影响运行但可能导致AStoryX行为不符合预期的警告。 由于ASE-Remake的控制器识别逻辑里,会将所有匹配不到的控制器都默认视作 Dialog控制器,因此实际上NoSuchController暂时是不会出现的,但为了完整性和未来可能的变化,还是保留了这个错误类型。
成员函数文档
[since ASERStudio 2.0] AStoryXDiagnosticData::AStoryXDiagnosticData()
默认构造函数,创建一个未定义的诊断信息。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] AStoryXDiagnosticData::AStoryXDiagnosticData(const QString &message, qint32 line, qint32 column, ASERStudio::AStorySyntax::AStoryXDiagnosticData::DiagnosticType type = DiagnosticType::Undefined, const QString &fixAdvice = "")
构造函数。 message 诊断消息 line 诊断位置的行号 column 诊断位置的列号 type 诊断类型,默认为Undefined fixAdvice 修复建议,默认为空字符串
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] AStoryXDiagnosticData::AStoryXDiagnosticData(const ASERStudio::AStorySyntax::AStoryXDiagnosticData &other)
other 另一个AStoryXDiagnosticData实例
复制构造函数。
这个function 从 ASERStudio 2.0 开始支持。
[noexcept, since ASERStudio 2.0] AStoryXDiagnosticData::AStoryXDiagnosticData(ASERStudio::AStorySyntax::AStoryXDiagnosticData &&other)
other 另一个AStoryXDiagnosticData实例
移动构造函数。
这个function 从 ASERStudio 2.0 开始支持。
[noexcept, since ASERStudio 2.0] AStoryXDiagnosticData::~AStoryXDiagnosticData()
析构函数。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] qint32 AStoryXDiagnosticData::getColumn() const
return 诊断位置的列号。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] QString AStoryXDiagnosticData::getFixAdvice() const
return 修复建议。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] qint32 AStoryXDiagnosticData::getLine() const
return 诊断位置的行号。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] QString AStoryXDiagnosticData::getMessage() const
return 诊断消息。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] ASERStudio::AStorySyntax::AStoryXDiagnosticData::DiagnosticType AStoryXDiagnosticData::getType() const
return 诊断类型。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] QString AStoryXDiagnosticData::toString()
return 诊断信息的字符串表示形式,主要用于调试和日志记录等目的。通常会包含诊断类型、位置和消息等内容。
这个function 从 ASERStudio 2.0 开始支持。
[noexcept, since ASERStudio 2.0] ASERStudio::AStorySyntax::AStoryXDiagnosticData &AStoryXDiagnosticData::operator=(ASERStudio::AStorySyntax::AStoryXDiagnosticData &&other)
other 另一个AStoryXDiagnosticData实例 移动赋值运算符。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] ASERStudio::AStorySyntax::AStoryXDiagnosticData &AStoryXDiagnosticData::operator=(const ASERStudio::AStorySyntax::AStoryXDiagnosticData &other)
other 另一个AStoryXDiagnosticData实例
复制赋值运算符。
这个function 从 ASERStudio 2.0 开始支持。
[since ASERStudio 2.0] bool AStoryXDiagnosticData::operator==(const ASERStudio::AStorySyntax::AStoryXDiagnosticData &other) const
other 另一个AStoryXDiagnosticData实例
return 两个AStoryXDiagnosticData是否相等。
相等的条件是它们的位置、类型都相同。消息和修复建议不在考虑范围内。
这个function 从 ASERStudio 2.0 开始支持。