Zserio C++ runtime library
1.2.0
Built for Zserio 2.16.0
IValidationObserver.h
Go to the documentation of this file.
1
#ifndef ZSERIO_I_VALIDATION_OBSERVER_H_INC
2
#define ZSERIO_I_VALIDATION_OBSERVER_H_INC
3
4
#include "
zserio/Span.h
"
5
#include "
zserio/StringView.h
"
6
#include "
zserio/Types.h
"
7
8
namespace
zserio
9
{
10
14
class
IValidationObserver
15
{
16
public
:
17
virtual
~IValidationObserver
() =
default
;
18
24
virtual
void
beginDatabase
(
size_t
numberOfTables) = 0;
25
31
virtual
void
endDatabase
(
size_t
numberOfValidatedTables) = 0;
32
41
virtual
bool
beginTable
(
StringView
tableName,
size_t
numberOfRows) = 0;
42
51
virtual
bool
endTable
(
StringView
tableName,
size_t
numberOfValidatedRows) = 0;
52
56
enum
ErrorType
57
{
61
INVALID_COLUMN_TYPE
,
62
66
INVALID_COLUMN_CONSTRAINT
,
67
71
COLUMN_MISSING
,
72
76
COLUMN_SUPERFLUOUS
,
77
81
VALUE_OUT_OF_RANGE
,
82
86
INVALID_VALUE
,
87
91
BLOB_PARSE_FAILED
,
92
96
BLOB_COMPARE_FAILED
97
};
98
110
virtual
bool
reportError
(
StringView
tableName,
StringView
fieldName,
111
Span<const StringView>
primaryKeyValues,
ErrorType
errorType,
StringView
message) = 0;
112
};
113
114
}
// namespace zserio
115
116
#endif
// ZSERIO_I_VALIDATION_OBSERVER_H_INC
Span.h
StringView.h
Types.h
zserio::BasicStringView< char, std::char_traits< char > >
zserio::IValidationObserver
Definition:
IValidationObserver.h:15
zserio::IValidationObserver::beginTable
virtual bool beginTable(StringView tableName, size_t numberOfRows)=0
zserio::IValidationObserver::beginDatabase
virtual void beginDatabase(size_t numberOfTables)=0
zserio::IValidationObserver::~IValidationObserver
virtual ~IValidationObserver()=default
zserio::IValidationObserver::ErrorType
ErrorType
Definition:
IValidationObserver.h:57
zserio::IValidationObserver::INVALID_COLUMN_TYPE
@ INVALID_COLUMN_TYPE
Definition:
IValidationObserver.h:61
zserio::IValidationObserver::INVALID_COLUMN_CONSTRAINT
@ INVALID_COLUMN_CONSTRAINT
Definition:
IValidationObserver.h:66
zserio::IValidationObserver::BLOB_PARSE_FAILED
@ BLOB_PARSE_FAILED
Definition:
IValidationObserver.h:91
zserio::IValidationObserver::COLUMN_MISSING
@ COLUMN_MISSING
Definition:
IValidationObserver.h:71
zserio::IValidationObserver::VALUE_OUT_OF_RANGE
@ VALUE_OUT_OF_RANGE
Definition:
IValidationObserver.h:81
zserio::IValidationObserver::COLUMN_SUPERFLUOUS
@ COLUMN_SUPERFLUOUS
Definition:
IValidationObserver.h:76
zserio::IValidationObserver::BLOB_COMPARE_FAILED
@ BLOB_COMPARE_FAILED
Definition:
IValidationObserver.h:96
zserio::IValidationObserver::INVALID_VALUE
@ INVALID_VALUE
Definition:
IValidationObserver.h:86
zserio::IValidationObserver::endDatabase
virtual void endDatabase(size_t numberOfValidatedTables)=0
zserio::IValidationObserver::endTable
virtual bool endTable(StringView tableName, size_t numberOfValidatedRows)=0
zserio::IValidationObserver::reportError
virtual bool reportError(StringView tableName, StringView fieldName, Span< const StringView > primaryKeyValues, ErrorType errorType, StringView message)=0
zserio::Span
Definition:
Span.h:59
zserio
Definition:
AllocatorHolder.h:7
zserio
IValidationObserver.h
Generated by
1.9.1