fcml  1.2.2
fcml_intel_dialect.hpp
Go to the documentation of this file.
1 /*
2  * FCML - Free Code Manipulation Library.
3  * Copyright (C) 2010-2020 Slawomir Wojtasiak
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
27 #ifndef FCML_INTEL_DIALECT_HPP_
28 #define FCML_INTEL_DIALECT_HPP_
29 
30 #include "fcml_dialect.hpp"
31 
32 #include "fcml_intel_dialect.h"
33 
34 namespace fcml {
35 
39 class IntelDialect: public Dialect {
40 public:
48  fcml_st_dialect *dialect;
49  fcml_ceh_error error = ::fcml_fn_dialect_init_intel(flags, &dialect);
50  if (error) {
51  throw InitException(
52  FCML_TEXT("Can not initialize the Intel dialect."), error);
53  }
54  Dialect::setDialect(dialect);
55  }
60  virtual ~IntelDialect() {
61  }
62 };
63 
64 }
65 
66 #endif /* FCML_INTEL_DIALECT_HPP_ */
void setDialect(fcml_st_dialect *dialect)
Sets a new dialect for the wrapper.
Definition: fcml_dialect.hpp:83
#define FCML_TEXT(x)
Used to code literal strings.
Definition: fcml_types.h:61
struct fcml_st_dialect fcml_st_dialect
Assembler dialect.
Definition: fcml_dialect.h:36
Definition: fcml_assembler.hpp:39
Wraps the Intel dialect.
Definition: fcml_intel_dialect.hpp:39
#define FCML_INTEL_DIALECT_CF_DEFAULT
Default combination of the configuration flags.
Definition: fcml_intel_dialect.h:39
C++ wrapper for the base dialect.
IntelDialect(fcml_uint32_t flags=FCML_INTEL_DIALECT_CF_DEFAULT)
Creates the Intel dialect.
Definition: fcml_intel_dialect.hpp:47
virtual ~IntelDialect()
Virtual destructor.
Definition: fcml_intel_dialect.hpp:60
Intel dialect implementation.
An abstract dialect.
Definition: fcml_dialect.hpp:41
LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_dialect_init_intel(fcml_uint32_t config_flags, fcml_st_dialect **dialect)
Initializes Intel dialect.
Component can not be initialized correctly.
Definition: fcml_common.hpp:231
fcml_uint16_t fcml_ceh_error
All error codes should be held in variables of this type.
Definition: fcml_errors.h:156