2019-10-24 06:36:42 -07:00
|
|
|
/*
|
|
|
|
* Copyright 2019 by its authors. See AUTHORS.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2014-05-02 15:55:51 -07:00
|
|
|
|
|
|
|
#ifndef EOLIAN_CXX_LIB_HH
|
|
|
|
#define EOLIAN_CXX_LIB_HH
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
2014-06-30 11:32:52 -07:00
|
|
|
#include <Eolian.h>
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace efl { namespace eolian {
|
|
|
|
|
|
|
|
struct eolian_init
|
|
|
|
{
|
|
|
|
eolian_init()
|
|
|
|
{
|
|
|
|
::eolian_init();
|
|
|
|
}
|
|
|
|
~eolian_init()
|
|
|
|
{
|
|
|
|
::eolian_shutdown();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-12-06 16:03:55 -08:00
|
|
|
struct eolian_state
|
|
|
|
{
|
2018-02-27 04:00:36 -08:00
|
|
|
Eolian_State *value;
|
2017-12-06 16:03:55 -08:00
|
|
|
eolian_state()
|
|
|
|
{
|
2018-02-27 04:00:36 -08:00
|
|
|
value = ::eolian_state_new();
|
2017-12-06 16:03:55 -08:00
|
|
|
}
|
|
|
|
~eolian_state()
|
|
|
|
{
|
2018-02-27 04:00:36 -08:00
|
|
|
::eolian_state_free(value);
|
2017-12-06 16:03:55 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Eolian_Unit const* as_unit() const
|
|
|
|
{
|
|
|
|
return (Eolian_Unit const*)value;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-05-02 15:55:51 -07:00
|
|
|
} }
|
|
|
|
|
|
|
|
#endif // EOLIAN_CXX_LIB_HH
|