| 1 |
/* |
| 2 |
* (C) Copyright 2013 ECMWF. |
| 3 |
* |
| 4 |
* This software is licensed under the terms of the Apache Licence Version 2.0 |
| 5 |
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 6 |
* In applying this licence, ECMWF does not waive the privileges and immunities |
| 7 |
* granted to it by virtue of its status as an intergovernmental organisation |
| 8 |
* nor does it submit to any jurisdiction. |
| 9 |
*/ |
| 10 |
|
| 11 |
#include "atlas/numerics/Method.h" |
| 12 |
#include "atlas/library/config.h" |
| 13 |
#include "atlas/runtime/Exception.h" |
| 14 |
|
| 15 |
namespace atlas { |
| 16 |
namespace numerics { |
| 17 |
|
| 18 |
//---------------------------------------------------------------------------------------------------------------------- |
| 19 |
|
| 20 |
// C wrapper interfaces to C++ routines |
| 21 |
extern "C" { |
| 22 |
void atlas__Method__delete(Method* This) { |
| 23 |
ATLAS_ASSERT(This != nullptr); |
| 24 |
delete This; |
| 25 |
This = nullptr; |
| 26 |
} |
| 27 |
|
| 28 |
const char* atlas__Method__name(Method* This) { |
| 29 |
ATLAS_ASSERT(This != nullptr); |
| 30 |
return This->name().c_str(); |
| 31 |
} |
| 32 |
} |
| 33 |
|
| 34 |
// ------------------------------------------------------------------ |
| 35 |
|
| 36 |
} // namespace numerics |
| 37 |
} // namespace atlas |