org.vishia.java2C
Class ClassData.CastInfo

java.lang.Object
  extended by org.vishia.java2C.ClassData.CastInfo
Enclosing class:
ClassData

public static class ClassData.CastInfo
extends java.lang.Object

Simple Data class to hold Strings and modes for generation casting. The class contains a pre- and a suffix String and the access modes. They will be disposed around the input expression to build a expression with cast. The class is used to check and execute possible casts. Some casts where done both in Java and in C implicitly, but the Java2C-translator should known it. Than pre- and suffixes are empty.


Field Summary
(package private)  ClassData castType
           
static int kCastAble
          5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.
static int kCastAutomatic
          5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.
static int kCastCommon
          5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.
static int kCastEqual
          5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.
static int kCastNo
          5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.
(package private)  char modeAccessDst
          The provided access mode of the result.
(package private)  char modeAccessSrc
          The expected access mode of the input.
(package private)  java.lang.String post
          C-Code before and after the expression, which is to cast.
(package private)  java.lang.String pre
          C-Code before and after the expression, which is to cast.
 
Constructor Summary
ClassData.CastInfo(ClassData castType, java.lang.String pre, java.lang.String post, char modeAccessDst, char modeAccessSrc)
          Constructs the data.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kCastEqual

public static final int kCastEqual
5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.

See Also:
Constant Field Values

kCastAutomatic

public static final int kCastAutomatic
5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.

See Also:
Constant Field Values

kCastAble

public static final int kCastAble
5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.

See Also:
Constant Field Values

kCastCommon

public static final int kCastCommon
5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.

See Also:
Constant Field Values

kCastNo

public static final int kCastNo
5 Levels of cast-ability. equal: same types. automatic: cast from compiler, forex short to int.

See Also:
Constant Field Values

pre

final java.lang.String pre
C-Code before and after the expression, which is to cast. At example (int32( and ) to cast from float or double.


post

final java.lang.String post
C-Code before and after the expression, which is to cast. At example (int32( and ) to cast from float or double.


modeAccessDst

final char modeAccessDst
The provided access mode of the result.


modeAccessSrc

final char modeAccessSrc
The expected access mode of the input.


castType

final ClassData castType
Constructor Detail

ClassData.CastInfo

ClassData.CastInfo(ClassData castType,
                   java.lang.String pre,
                   java.lang.String post,
                   char modeAccessDst,
                   char modeAccessSrc)
Constructs the data.