The R Project SVN R

Rev

Rev 84150 | Rev 87945 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 84150 Rev 87936
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 41... Line 41...
41
  value - the result of the top-level task, i.e. evaluating expr.
41
  value - the result of the top-level task, i.e. evaluating expr.
42
  succeeded - a logical value indicating whether the task completed properly.
42
  succeeded - a logical value indicating whether the task completed properly.
43
  visible - a logical value indicating whether the result was printed to the R ``console''/stdout.
43
  visible - a logical value indicating whether the result was printed to the R ``console''/stdout.
44
  data - user-level data passed to the registration routine.
44
  data - user-level data passed to the registration routine.
45
 */
45
 */
46
typedef Rboolean (*R_ToplevelCallback)(SEXP expr, SEXP value, Rboolean succeeded, Rboolean visible, void *);
46
typedef bool (*R_ToplevelCallback)(SEXP expr, SEXP value, bool succeeded, bool visible, void *);
47
 
47
 
48
typedef struct _ToplevelCallback  R_ToplevelCallbackEl;
48
typedef struct _ToplevelCallback  R_ToplevelCallbackEl;
49
/** 
49
/** 
50
 Linked list element for storing the top-level task callbacks.
50
 Linked list element for storing the top-level task callbacks.
51
 */
51
 */
Line 61... Line 61...
61
 
61
 
62
#ifdef __cplusplus
62
#ifdef __cplusplus
63
extern "C" {
63
extern "C" {
64
#endif
64
#endif
65
 
65
 
66
Rboolean Rf_removeTaskCallbackByIndex(int id);
66
bool Rf_removeTaskCallbackByIndex(int id);
67
Rboolean Rf_removeTaskCallbackByName(const char *name);
67
bool 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
 
71
 
72
 
72
 
Line 81... Line 81...
81
 
81
 
82
typedef struct  _R_ObjectTable R_ObjectTable;
82
typedef struct  _R_ObjectTable R_ObjectTable;
83
 
83
 
84
/* Do we actually need the exists() since it is never called but R
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? */
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 *);
86
typedef bool (*Rdb_exists)(const char * const name, bool *canCache, R_ObjectTable *);
87
typedef SEXP     (*Rdb_get)(const char * const name, Rboolean *canCache, R_ObjectTable *);
87
typedef SEXP     (*Rdb_get)(const char * const name, bool *canCache, R_ObjectTable *);
88
typedef int      (*Rdb_remove)(const char * const name, 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 *);
89
typedef SEXP     (*Rdb_assign)(const char * const name, SEXP value, R_ObjectTable *);
90
typedef SEXP     (*Rdb_objects)(R_ObjectTable *);
90
typedef SEXP     (*Rdb_objects)(R_ObjectTable *);
91
typedef Rboolean (*Rdb_canCache)(const char * const name, R_ObjectTable *);
91
typedef bool (*Rdb_canCache)(const char * const name, R_ObjectTable *);
92
 
92
 
93
typedef void     (*Rdb_onDetach)(R_ObjectTable *);
93
typedef void     (*Rdb_onDetach)(R_ObjectTable *);
94
typedef void     (*Rdb_onAttach)(R_ObjectTable *);
94
typedef void     (*Rdb_onAttach)(R_ObjectTable *);
95
 
95
 
96
struct  _R_ObjectTable{
96
struct  _R_ObjectTable{
97
  int       type;
97
  int       type;
98
  char    **cachedNames;
98
  char    **cachedNames;
99
  Rboolean  active;
99
  bool  active;
100
 
100
 
101
  Rdb_exists   exists;
101
  Rdb_exists   exists;
102
  Rdb_get      get;
102
  Rdb_get      get;
103
  Rdb_remove   remove;
103
  Rdb_remove   remove;
104
  Rdb_assign   assign;
104
  Rdb_assign   assign;