MLLIF
a MLIR-based Language to Language Interoperability Flyover
Loading...
Searching...
No Matches
Context.h
Go to the documentation of this file.
1
/*
2
* Copyright 2025 Yeong-won Seo
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#pragma once
18
19
namespace
mllif
{
20
class
Error
{
21
std::string _what;
22
23
public
:
24
Error
(
const
std::string&
what
) : _what(
what
) {}
25
26
const
std::string&
what
()
const
{
return
_what; }
27
};
28
29
class
MLLIFContext
{
30
std::vector<Error> _errors;
31
32
public
:
33
const
std::vector<Error>&
errors
()
const
{
return
_errors; }
34
35
void
error
(
const
std::string& what) {
36
_errors.push_back(
Error
(what));
37
}
38
39
operator
bool()
const
{
40
return
_errors.empty();
41
}
42
43
bool
operator!
()
const
{
44
return
!_errors.empty();
45
}
46
};
47
}
mllif::Error
Definition
Context.h:20
mllif::Error::Error
Error(const std::string &what)
Definition
Context.h:24
mllif::Error::what
const std::string & what() const
Definition
Context.h:26
mllif::MLLIFContext
Definition
Context.h:29
mllif::MLLIFContext::operator!
bool operator!() const
Definition
Context.h:43
mllif::MLLIFContext::errors
const std::vector< Error > & errors() const
Definition
Context.h:33
mllif::MLLIFContext::error
void error(const std::string &what)
Definition
Context.h:35
mllif
Definition
CsBridgeGen.h:21
mllif
Backend
Shared
include
mllif
Backend
Context.h
Generated on Mon May 12 2025 01:41:15 for MLLIF by
1.13.2