The R Project SVN R

Rev

Rev 87945 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87945 Rev 89101
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2001-2020 The R Core Team.
3
 *  Copyright (C) 2001-2025 The R Core Team.
4
 *
4
 *
5
 *  This header file is free software; you can redistribute it and/or modify
5
 *  This header file is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
8
 *  (at your option) any later version.
Line 66... Line 66...
66
Rboolean Rf_removeTaskCallbackByIndex(int id);
66
Rboolean Rf_removeTaskCallbackByIndex(int id);
67
Rboolean Rf_removeTaskCallbackByName(const char *name);
67
Rboolean Rf_removeTaskCallbackByName(const char *name);
68
SEXP R_removeTaskCallback(SEXP which);
68
SEXP R_removeTaskCallback(SEXP which);
69
R_ToplevelCallbackEl* Rf_addTaskCallback(R_ToplevelCallback cb, void *data, void (*finalizer)(void *), const char *name, int *pos);
69
R_ToplevelCallbackEl* Rf_addTaskCallback(R_ToplevelCallback cb, void *data, void (*finalizer)(void *), const char *name, int *pos);
70
 
70
 
71
 
-
 
72
 
-
 
73
/*
-
 
74
  The following definitions are for callbacks to R functions and
-
 
75
  methods related to user-level tables.  This was implemented in a
-
 
76
  separate package formerly available from Omegahat and these
-
 
77
  declarations allow the package to interface to the internal R code.
-
 
78
  
-
 
79
  See https://developer.r-project.org/RObjectTables.pdf.
-
 
80
*/
-
 
81
 
-
 
82
typedef struct  _R_ObjectTable R_ObjectTable;
-
 
83
 
-
 
84
/* Do we actually need the exists() since it is never called but R
-
 
85
   uses get to see if the symbol is bound to anything? */
-
 
86
typedef Rboolean (*Rdb_exists)(const char * const name, Rboolean *canCache, R_ObjectTable *);
-
 
87
typedef SEXP     (*Rdb_get)(const char * const name, Rboolean *canCache, R_ObjectTable *);
-
 
88
typedef int      (*Rdb_remove)(const char * const name, R_ObjectTable *);
-
 
89
typedef SEXP     (*Rdb_assign)(const char * const name, SEXP value, R_ObjectTable *);
-
 
90
typedef SEXP     (*Rdb_objects)(R_ObjectTable *);
-
 
91
typedef Rboolean (*Rdb_canCache)(const char * const name, R_ObjectTable *);
-
 
92
 
-
 
93
typedef void     (*Rdb_onDetach)(R_ObjectTable *);
-
 
94
typedef void     (*Rdb_onAttach)(R_ObjectTable *);
-
 
95
 
-
 
96
struct  _R_ObjectTable{
-
 
97
  int       type;
-
 
98
  char    **cachedNames;
-
 
99
  Rboolean  active;
-
 
100
 
-
 
101
  Rdb_exists   exists;
-
 
102
  Rdb_get      get;
-
 
103
  Rdb_remove   remove;
-
 
104
  Rdb_assign   assign;
-
 
105
  Rdb_objects  objects;
-
 
106
  Rdb_canCache canCache;
-
 
107
 
-
 
108
  Rdb_onDetach onDetach;
-
 
109
  Rdb_onAttach onAttach;
-
 
110
  
-
 
111
  void     *privateData;
-
 
112
};
-
 
113
 
-
 
114
 
-
 
115
#ifdef __cplusplus
71
#ifdef __cplusplus
116
}
72
}
117
#endif
73
#endif
118
 
74
 
119
#endif /* R_CALLBACKS_H */
75
#endif /* R_CALLBACKS_H */