next up previous contents
Next: Numeric Types Up: Basics: Interfaces, Classes and Previous: Examples   Contents

Fundamental Types


Table 3.2: ALL SIDL Types And Their Bindings.
SIDL type size (bits) C Binding C++ Binding F77 Binding F90 Binding Python Binding Java Binding
bool 1 int bool LOGICAL LOGICAL Numeric Python TBD
char 8 char char CHARACTER*1 CHARACTER (LEN=1) Numeric Python TBD
int 32 int32_t int32_t INTEGER*4 INTEGER (SELECTED_INT_KIND(9)) same TBD
long 64 int64_t int64_t INTEGER*8 INTEGER (SELECTED_INT_KIND(18)) same TBD
float 32 float float REAL REAL (SELECTED_REAL_KIND(8,38)) same TBD
double 64 double double DOUBLE PRECISION REAL (SELECTED_REAL_KIND(17,308)) same TBD
fcomplex 64 struct std::complex$<$float$>$ COMPLEX COMPLEX (SELECTED_REAL_KIND(8,38)) same TBD
dcomplex 128 struct std::complex$<$double$>$ DOUBLE COMPLEX COMPLEX (SELECTED_REAL_KIND(17,308)) same TBD
opaque 64 void* void* INTEGER*8 INTEGER (SELECTED_INT_KIND(18)) same TBD
string varies char* std::string CHARACTER*(*) CHARACTER*(*) same TBD
enum 32 enum enum INTEGER INTEGER (SELECTED_INT_KIND(9)) same TBD
interface varies struct class INTEGER*8 INTEGER (SELECTED_INT_KIND(18)) same TBD
class varies struct class INTEGER*8 INTEGER (SELECTED_INT_KIND(18)) same TBD
array$<$Type,Dim$>$ varies struct template class INTEGER*8 INTEGER (SELECTED_INT_KIND(18)) same TBD

Table 3.2 briefly shows the different data types that are supported in Babel and some of the language specific bindings to that SIDL type. The ``S'' in SIDL stands for ``Scientific.'' This emphasis is reflected in the fundametal support for complex numbers (fcomplex and dcomplex) and dynamic multidimensional arrays (array$<$Type,Dim$>$).

C++ developers looking at the SIDL syntax for arrays, might think that SIDL is a templated IDL, but this is not so. Although the syntax for SIDL arrays looks like a template, it is specific only to the array type. Developers cannot create templated classes or methods in SIDL.
\begin{rationale}
Although C++ templates are a very powerful programming
mechan...
... have to add babel C++ bindings on a compiler by compiler basis.
\end{rationale}

Discussion of the various types is broken up into sections. Numeric types such as bool, char, int, long, float, double, fcomplex, and dcomplex are discussed in SubSection 3.3.1. Discussion of strings is found in SubSection 3.3.2. A brief justification for the opaque type is in SubSection 3.3.4. Information about enumerated types is presented in SubSection 3.3.4 which concludes our discussion of fundamental types and this section. Information about extended types such as Interfaces and Classes (Section 3.4) and Arrays (Section 3.5 follow thereafter.



Subsections
next up previous contents
Next: Numeric Types Up: Basics: Interfaces, Classes and Previous: Examples   Contents


babel-0.8.0
users_guide Last Modified 2003-01-14

http://www.llnl.gov/CASC/components
components@llnl.gov