A type is also a simple Pliant data that can be built, transformed, and even deleted (with care)The interface for dealing with types is a bit rough (low level), but is not intended for the programmers mainstream ...To create a new data type with high level mainstream functions, please read documentation here
method t name -> n arg Type t ; arg Str n
method t size -> s arg Type t ; arg Int s
method t bitsize -> s arg Type t ; arg Int s
method t flags -> i arg Type t ; arg Int i
These are a few constants that can be used to check the type properties:
if (t:flags .and. type_scalar)<>0 ...
method t nb_fields i -> n arg Type t ; arg Int n
method t field -> f arg Type t ; arg_C TypeField f
method t define_field -> type name arg_rw Type t ; arg Type type ; arg Str name
method t terminate_fields arg_rw Type t
generate_string_functions type1 type2 ... arg_rw Type type1 type2
method t position -> p arg Type t ; arg Str p
A data with type 'TypeField' is a simple structure:
type TypeField field Link:Type type field Int offset field Str name
method t generic_level -> l arg Type t ; arg_C Int l
method t maybe -> l arg Type t ; arg List l
method t build_instance a arg Type t ; arg address a
method t destroy_instance a arg Type t ; arg address a
method t copy_instance src dest arg Type t ; arg address src dest
method t real_data_type t2 arg Type t ; arg_C Type t2
method t maybe atype arg_rw Type t ; arg Type atype