intarsys nativeC library

de.intarsys.nativec.type
Class StructDeclaration

java.lang.Object
  extended by de.intarsys.nativec.type.StructDeclaration

public class StructDeclaration
extends Object

The internal structure definition of a type that is made up of named slots containing other types. The StructDeclaration exists once per type.


Constructor Summary
StructDeclaration()
          Create a new StructDeclaration
 
Method Summary
 StructMember declare(String name, INativeType declaration)
          Declare a new member for the struct.
 int getByteSize()
          The total size of the StructDeclaration.
 StructMember getField(String name)
           
 List getFields()
          The collection of StructMember instances in declaration order.
 int getFieldsSize()
           
 INativeObject getNativeObject(NativeStruct struct, String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructDeclaration

public StructDeclaration()
Create a new StructDeclaration

Method Detail

declare

public StructMember declare(String name,
                            INativeType declaration)
Declare a new member for the struct.

Parameters:
name - The name of the new member slot.
declaration - The type declaration for the slot

getByteSize

public int getByteSize()
The total size of the StructDeclaration.

Returns:
The total size of the StructDeclaration.

getField

public StructMember getField(String name)

getFields

public List getFields()
The collection of StructMember instances in declaration order.

Returns:
The collection of StructMember instances in declaration order.

getFieldsSize

public int getFieldsSize()

getNativeObject

public INativeObject getNativeObject(NativeStruct struct,
                                     String name)

toString

public String toString()
Overrides:
toString in class Object

intarsys nativeC library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.