1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
/*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* ADIOSPy.h python binding to ADIOS class
*
* Created on: Mar 13, 2017
* Author: William F Godoy godoywf@ornl.gov
*/
#ifndef ADIOS2_BINDINGS_PYTHON_ADIOS_H_
#define ADIOS2_BINDINGS_PYTHON_ADIOS_H_
#include "py11IO.h"
#include "py11Operator.h"
#include <memory> //std::shared_ptr
#include <string>
#include "adios2/core/ADIOS.h"
namespace adios2
{
namespace py11
{
class ADIOS
{
public:
#if ADIOS2_USE_MPI
ADIOS(const std::string &configFile, MPI4PY_Comm comm);
ADIOS(MPI4PY_Comm comm);
#endif
ADIOS(const std::string &configFile);
ADIOS();
~ADIOS() = default;
/** object inspection true: valid object, false: invalid object */
explicit operator bool() const noexcept;
IO DeclareIO(const std::string name);
IO AtIO(const std::string name);
Operator DefineOperator(const std::string name, const std::string type,
const Params ¶meters = Params());
Operator InquireOperator(const std::string name);
bool RemoveIO(const std::string name);
void RemoveAllIOs();
void FlushAll();
private:
std::shared_ptr<adios2::core::ADIOS> m_ADIOS;
void CheckPointer(const std::string hint);
};
} // end namespace py11
} // end namespace adios2
#endif /* ADIOS2_BINDINGS_PYTHON_ADIOS_H_ */
|