1
0
Files
libcmo21/Assets/CodeGen/BMapBinder/ExpFctsAnalyzer/ExpFctsHelper.java

95 lines
2.3 KiB
Java
Raw Normal View History

import java.util.Vector;
public class ExpFctsHelper {
/**
* The class represent a single parameter (argument) of function.
*/
public static class ExpFctParam {
/**
* The type of this parameter.
*/
public String mVarType;
/**
* The name of this parameter.
*/
public String mVarName;
/**
* True if this parameter is marked as input parameter, otherwise false.
* <p>
* Input parameter and output parameter is commonly used in C/C++ code. By using
* this feature, each function can receive multiple arguments and return
* multiple arguments without defining a struct to hold it.
* <p>
* The type of input parameter is itself. However, the type of output parameter
* is the pointer of itself. So you may need get its pointer type when
* processing output parameter, especially for the scenario that the target
* language do not support explicit output parameter keyword.
*/
public boolean mIsInput;
/**
* The description of this parameter.
* <p>
* This description is generated by this program. It will indicate the
* underlying C++ type to tell end user how to treat this parameter because some
* target languages' native calling style can not represent these detail.
* <p>
* In this program, this field must be written as a annotation of corresponding
* function.
*/
public String mVarDesc;
public ExpFctParam() {
mVarType = "";
mVarName = "";
mVarDesc = "";
mIsInput = true;
}
}
/**
* The class represent an export BMap function.
*/
public static class ExpFct {
/**
* The name of this function.
*/
public String mFctName;
/**
* The return value type of this function.
*/
public String mFctRvType;
/**
* The parameters (arguments) list of this function. Each item are
* {@linkplain ExpFctParam} and represent parameter one by one from left to
* right.
*/
public Vector<ExpFctParam> mFctParams;
public ExpFct() {
mFctName = "";
mFctRvType = "";
mFctParams = new Vector<ExpFctParam>();
}
}
/**
* The class represent a collection of export BMap functions.
*/
public static class ExpFctCollection {
/**
* The collection of exported BMap functions.
*/
public Vector<ExpFct> mFcts;
public ExpFctCollection() {
mFcts = new Vector<ExpFct>();
}
}
}