private class Header2Reflection.ConverterClass
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
bClassBasedOnObjectJc
Inheritance situation.
|
(package private) boolean |
bFirst |
(package private) int |
bitfieldByte
The byte-number of more bitfields.
|
(package private) int |
bitfieldPos
Current Bit position in Bitfield.
|
(package private) boolean |
bObjectifcBaseJcpp
Inheritance situation.
|
(package private) boolean |
bObjectJcpp
Inheritance situation.
|
(package private) boolean |
bStructHasFirstObjectJc
Inheritance situation.
|
(package private) boolean |
cppClass |
(package private) java.util.TreeMap<java.lang.String,java.lang.String> |
innerTypes |
(package private) java.lang.String |
lastOffsetBeforeBitfield
It stores the last offset always.
|
(package private) java.lang.String |
lastType
Size of the last element.
|
(package private) static int |
mObjectifcBaseJcpp_Modifier_reflectJc
This mask is defined originally in ReflectionJc.h, TODO import org.vishia.byteDataAccess.ReflectionJc
|
(package private) static int |
mObjectJc_Modifier_reflectJc
This mask is defined originally in ReflectionJc.h, TODO import org.vishia.byteDataAccess.ReflectionJc
|
(package private) int |
nrofAttributes |
(package private) java.lang.StringBuffer |
sbCfile |
(package private) java.lang.StringBuffer |
sbForward |
(package private) java.lang.String |
sCppClassName |
(package private) java.lang.String |
sReflectionClassName |
(package private) java.lang.String |
sSeparator |
(package private) java.lang.String |
sTypeName
Used for offsetof(sTypeName,
|
Constructor and Description |
---|
ConverterClass(java.util.TreeMap<java.lang.String,java.lang.String> innerTypesP) |
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
buildOffset(java.lang.String sTypeName,
java.lang.String sAttributeNameP,
boolean cppClass) |
private boolean |
convertAttribute(boolean bFirst,
java.lang.String sSeparator,
java.lang.String sCppClassName,
java.lang.String sReflectionClassName,
java.lang.String sNameVariant,
ZbnfParseResultItem attributeItem,
java.lang.StringBuffer sbCfile,
java.lang.StringBuffer sbForward,
boolean cppClass)
converts a attribute from parsed header.
|
private void |
convertClass(java.lang.String sClassName,
java.lang.String sStructName,
java.lang.String sParentCppClassName,
java.lang.String sParentReflectionClassName,
ZbnfParseResultItem classItem,
java.lang.String sFilePath,
boolean cppClass) |
private void |
convertElement(ZbnfParseResultItem zbnfElement,
java.lang.String sNameVariant)
Convert 1 element in a class or struct or inner part (visibility-block).
|
private void |
convertElementsInClass(ZbnfParseResultItem classItem,
java.lang.String sVariantName)
Convert all element in a class or struct or inner part (visibility-block).
|
(package private) void |
convertInnerClassAndStruct(java.lang.String sParentCppClassName,
java.lang.String sParentReflectionClassName,
ZbnfParseResultItem zbnfParent,
java.util.TreeMap<java.lang.String,java.lang.String> innerTypesP,
java.lang.String sFilePath,
boolean cppClass)
called inside convertClass to detect inner classes.
|
(package private) byte[] |
int2bytes4(int val)
Converts a int value to 4 bytes.
|
(package private) void |
setFieldTypeInfos(java.lang.String sType,
java.lang.StringBuffer sbForward,
Header2Reflection.FieldTypeInfos ret,
int bitfieldNrofBits)
Detects all infos about the field type.
|
(package private) void |
testBasedOnObject(java.lang.String sNameSuperclass) |
java.lang.String |
toString() |
boolean cppClass
boolean bObjectJcpp
boolean bClassBasedOnObjectJc
boolean bStructHasFirstObjectJc
boolean bObjectifcBaseJcpp
java.lang.String sReflectionClassName
java.lang.String sCppClassName
java.lang.String sTypeName
int bitfieldPos
int bitfieldByte
java.lang.String lastOffsetBeforeBitfield
java.lang.String lastType
final java.util.TreeMap<java.lang.String,java.lang.String> innerTypes
static final int mObjectJc_Modifier_reflectJc
static final int mObjectifcBaseJcpp_Modifier_reflectJc
int nrofAttributes
boolean bFirst
java.lang.StringBuffer sbCfile
java.lang.StringBuffer sbForward
java.lang.String sSeparator
ConverterClass(java.util.TreeMap<java.lang.String,java.lang.String> innerTypesP)
private void convertClass(java.lang.String sClassName, java.lang.String sStructName, java.lang.String sParentCppClassName, java.lang.String sParentReflectionClassName, ZbnfParseResultItem classItem, java.lang.String sFilePath, boolean cppClass) throws java.io.IOException
java.io.IOException
private void convertElementsInClass(ZbnfParseResultItem classItem, java.lang.String sVariantName) throws java.io.IOException
java.io.IOException
private void convertElement(ZbnfParseResultItem zbnfElement, java.lang.String sNameVariant) throws java.io.IOException
zbnfElement
- The element from which the reflection should generated.sNameStruct
- null or a name of the superior structure,
which is used in form sNameStruct.nameElement to build the offset.java.io.IOException
AccessException
void testBasedOnObject(java.lang.String sNameSuperclass)
void convertInnerClassAndStruct(java.lang.String sParentCppClassName, java.lang.String sParentReflectionClassName, ZbnfParseResultItem zbnfParent, java.util.TreeMap<java.lang.String,java.lang.String> innerTypesP, java.lang.String sFilePath, boolean cppClass) throws java.io.IOException
java.io.IOException
private boolean convertAttribute(boolean bFirst, java.lang.String sSeparator, java.lang.String sCppClassName, java.lang.String sReflectionClassName, java.lang.String sNameVariant, ZbnfParseResultItem attributeItem, java.lang.StringBuffer sbCfile, java.lang.StringBuffer sbForward, boolean cppClass) throws java.io.IOException
sSeparator
- initialy " " but than " , " to implement the separator between or the introduce to the first attribute block.sCppClassName
- Name of the class in c++-language, a.e. MyClass::InnerClasssReflectionClassName
- Name of the class for Reflection identifier, a.e. MyClass_InnerClasssNameVariant
- Name of the superior struct, which builds the variantattributeItem
- The parse result item describing the attribute.sbCfile
- buffer for C-file-content.sbForward
- buffer for forward declarationsjava.io.IOException
java.lang.String buildOffset(java.lang.String sTypeName, java.lang.String sAttributeNameP, boolean cppClass)
void setFieldTypeInfos(java.lang.String sType, java.lang.StringBuffer sbForward, Header2Reflection.FieldTypeInfos ret, int bitfieldNrofBits)
sType
- The type maybe a scalar type, maybe an inner type of the class.sbForward
- Bufferret
- All return informations where filled there.byte[] int2bytes4(int val)
val
- public java.lang.String toString()
toString
in class java.lang.Object