40 #ifndef R_CCONVERTERS_H
41 #define R_CCONVERTERS_H
49 #define freeCConverter RC_freeCConverter
50 #define R_addToCConverter RC_addToCConverter
51 #define R_converterMatchClass RC_converterMatchClass
52 #define R_converterMatchClass RC_converterMatchClass
53 #define R_getToCConverterByDescription RC_getToCConverterByDescription
54 #define R_getToCConverterByIndex RC_getToCConverterByIndex
55 #define R_getToCConverterByIndex RC_getToCConverterByIndex
56 #define R_removeToCConverter RC_removeToCConverter
73 typedef struct RtoCConverter R_toCConverter;
74 typedef struct RFromCConvertInfo R_FromCConvertInfo;
78 typedef Rboolean (*R_ToCPredicate)(
SEXP obj, R_CConvertInfo *info, R_toCConverter *el);
82 typedef void* (*R_ToCConverter)(
SEXP obj, R_CConvertInfo *info, R_toCConverter *el);
85 typedef SEXP (*R_FromCConverter)(
void *value,
SEXP arg, R_FromCConvertInfo *info,
90 struct RtoCConverter {
91 R_ToCPredicate matcher;
92 R_ToCConverter converter;
93 R_FromCConverter reverse;
104 struct RFromCConvertInfo {
105 const char *functionName;
119 void *Rf_convertToC(
SEXP s, R_CConvertInfo *info,
int *success, R_toCConverter **converter);
122 R_toCConverter *R_addToCConverter(R_ToCPredicate match, R_ToCConverter converter,
123 R_FromCConverter reverse,
124 void *userData,
char *desc);
125 R_toCConverter *R_getToCConverterByIndex(
int which);
126 R_toCConverter *R_getToCConverterByDescription(
const char *desc);
127 void R_removeToCConverter(R_toCConverter *el);
129 Rboolean R_converterMatchClass(
SEXP obj, R_CConvertInfo *inf, R_toCConverter *el);
130 void freeCConverter(R_toCConverter *el);