Newer
Older
#pragma once
#ifndef BINARY_C_PYTHON_H
#define BINARY_C_PYTHON_H
/*
* Include binary_C's API
*/
David Hendriks
committed
#include "binary_c.h"
/* Binary_c's python API prototypes */
int run_system(char * argstring,
long int custom_logging_func_memaddr,
struct libbinary_c_store_t * store,
struct persistent_data_t * persistent_data,
int write_logfile,
David Hendriks
committed
int population,
char ** const buffer,
char ** const error_buffer,
size_t * const nbytes);
David Hendriks
committed
/* =================================================================== */
/* Functions to call other API functionality like help and arglines */
/* =================================================================== */
char ** const errorstring,
int return_help_info(char * argstring,
char ** const outstring,
char ** const errorstring,
size_t * const nbytes);
int return_help_all_info(char ** const outstring,
char ** const errorstring,
size_t * const nbytes);
David Hendriks
committed
int return_version_info(char ** const outstring,
char ** const errorstring,
size_t * const nbytes);
David Hendriks
committed
int return_minimum_orbit_for_RLOF(char * argstring,
struct libbinary_c_store_t * store,
David Hendriks
committed
char ** const buffer,
char ** const error_buffer,
size_t * const nbytes);
int return_maximum_mass_ratio_for_RLOF(char * argstring,
struct libbinary_c_store_t * store,
char ** buffer,
char ** error_buffer,
size_t * nbytes);
David Hendriks
committed
David Hendriks
committed
/* =================================================================== */
David Hendriks
committed
/* =================================================================== */
struct libbinary_c_store_t * return_store_memaddr(char ** const buffer,
char ** const error_buffer,
size_t * const nbytes);
struct persistent_data_t * return_persistent_data_memaddr(char ** const buffer,
David Hendriks
committed
char ** const error_buffer,
size_t * const nbytes);
int free_store_memaddr(struct libbinary_c_store_t * store,
char ** const buffer,
char ** const error_buffer,
size_t * const nbytes);
David Hendriks
committed
int free_persistent_data_memaddr_and_return_json_output(struct persistent_data_t * persistent_data,
David Hendriks
committed
char ** const buffer,
char ** const error_buffer,
size_t * const nbytes);
/* C macros */
#define BINARY_C_APITEST_VERSION 0.1
#define APIprint(...) APIprintf(__VA_ARGS__);
#define NO_OUTPUT
David Hendriks
committed
#ifdef BINARY_C_PYTHON_DEBUG
#define debug_printf(fmt, ...) printf(fmt, ##__VA_ARGS__);
David Hendriks
committed
#else
#define debug_printf(fmt, ...) /* Do nothing */
#endif
#endif // BINARY_C_C_PYTHON_H