001/**************************************************************************** 002 * Copyright/Copyleft: 003 * 004 * For this source the LGPL Lesser General Public License, 005 * published by the Free Software Foundation is valid. 006 * It means: 007 * 1) You can use this source without any restriction for any desired purpose. 008 * 2) You can redistribute copies of this source to everybody. 009 * 3) Every user of this source, also the user of redistribute copies 010 * with or without payment, must accept this license for further using. 011 * 4) But the LPGL is not appropriate for a whole software product, 012 * if this source is only a part of them. It means, the user 013 * must publish this part of source, 014 * but don't need to publish the whole source of the own product. 015 * 5) You can study and modify (improve) this source 016 * for own using or for redistribution, but you have to license the 017 * modified sources likewise under this LGPL Lesser General Public License. 018 * You mustn't delete this Copyright/Copyleft inscription in this source file. 019 * 020 * @author Hartmut Schorrig: hartmut.schorrig@vishia.de, www.vishia.org 021 * @version 0.93 2011-01-05 (year-month-day) 022 *******************************************************************************/ 023package org.vishia.java2C.test; 024 025 026 027/**It is not a final (able to expand) 028 * data class. It doesn't base on ObjectJc in C. 029 * In C the <code>struct</code> is defined as: 030 * <pre> 031typedef struct ExpandableDataStruct_Test_t 032{ 033 int16 xb; 034 int16 yb; 035 double db; 036} ExpandableDataStruct_Test_s; 037 *</pre> 038 * It is very simple. Such an class may be used in an array. 039 * The inheritance from Object is a basic feature in Java anytime, but this feature doesn't may be used mostly. 040 * Therefore in C it can be optimized writing a <code>@ java2c=noObject.</code>-tag in the comment. 041 * <br><br> 042 * See also {@link ExpandedDataStruct}. Inherited classes don't base on Object too. 043 * 044 * @java2c=noObject. 045 */ 046public class SimpleDataStruct 047{ 048 /**Some variables in the data class. <code>short</code>in Java will be translated to <code>int16</code> in C. */ 049 short xb,yb; 050 051 /**A double variable in Java is a double variable in C too. (8 Byte float). 052 */ 053 double db; 054} 055