CXXR (C++ R) API
Macros
uncxxr.h File Reference

($Id: uncxxr.h 1353 2013-03-18 16:59:38Z arr $)

Macros used to provide cues to the uncxxr.pl script. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CXXRBUILTINFUNCTION   BuiltInFunction
 uncxxr.pl deletes 'CXXRBUILTINFUNCTION::'
#define CXXRCONST   const
 const in CXXR, not const in CR.
#define CXXRCONSTRUCT(type, expr)   type(expr)
 uncxxr.pl replaces this by 'expr'.
#define CXXRCCAST(type, expr)   const_cast<type>(expr)
 uncxxr.pl replaces this by 'expr'.
#define CXXRSCAST(type, expr)   static_cast<type>(expr)
 uncxxr.pl replaces this by 'expr'.
#define CXXRFALSE   FALSE
 uncxxr.pl replaces this by '0'.
#define CXXRNOCAST(t)
 Suppress cast unnecessary in C++.
#define CXXRTRUE   TRUE
 uncxxr.pl replaces this by '1'.
#define CXXRUNSIGNED   unsigned
 uncxxr.pl deletes this.

Detailed Description

Macros used to provide cues to the uncxxr.pl script.

Where CR source files have been converted into C++ and otherwise adapted for use in CXXR, the script uncxxr.pl tries as far as possible to reverse the systematic changes. It is used when upgrading to a new version of R to distinguish substantive from routine changes.

This header file defines various macros that are used to provide cues to uncxxr.pl to how it should operate: the macro expansions defined below are the ones required in CXXR; uncxxr.pl will expand them differently, reflecting CR usage.


Macro Definition Documentation

#define CXXRCCAST (   type,
  expr 
)    const_cast<type>(expr)

uncxxr.pl replaces this by 'expr'.

This macro is used in former CR code where a const_cast is needed in C++.

#define CXXRCONST   const

const in CXXR, not const in CR.

Where CXXR inserts additional const declarations into source files inherited from CR, try to use this macro so that the change can be reversed by the uncxxr.pl script, which deletes any occurrence of CXXRCONST.

#define CXXRCONSTRUCT (   type,
  expr 
)    type(expr)

uncxxr.pl replaces this by 'expr'.

This macro is used in former CR code where an explicit constructor expression needs to be used in C++.

#define CXXRFALSE   FALSE

uncxxr.pl replaces this by '0'.

This macro is used in former CR code which uses 0 where C++ needs FALSE.

#define CXXRNOCAST (   t)

Suppress cast unnecessary in C++.

uncxxr.pl deletes the characters CXXRNOCAST so as to leave a C-style cast to type t. CXXR uses this macro in files inherited from CR to suppress casts (usually of NULL) that are unnecessary in C++ (and probably in C also).

#define CXXRSCAST (   type,
  expr 
)    static_cast<type>(expr)

uncxxr.pl replaces this by 'expr'.

This macro is used in former CR code where a static_cast is needed in C++.

#define CXXRTRUE   TRUE

uncxxr.pl replaces this by '1'.

This macro is used in former CR code which uses 1 where C++ needs TRUE.

#define CXXRUNSIGNED   unsigned

uncxxr.pl deletes this.

This macro is used in former CR code where CXXR needs unsigned.