0
|
1 \name{typeinfo}
|
|
2 \alias{TypeInfo}
|
|
3 \alias{getTypeInfo}
|
|
4 \alias{type information}
|
|
5 \title{S3 class for run-time type information of foreign C data types}
|
|
6 \description{S3 class for run-time type information of foreign C data types.}
|
|
7 \usage{
|
|
8 TypeInfo(name, type = c("base","pointer","struct","union"),
|
|
9 size = NA, align = NA, basetype = NA, fields = NA,
|
|
10 signature = NA)
|
|
11 getTypeInfo(name, envir = parent.frame())
|
|
12 }
|
|
13 \arguments{
|
|
14 \item{name}{character string specifying the type name.}
|
|
15 \item{type}{character string specifying the type.}
|
|
16 \item{size}{integer, size of type in bytes.}
|
|
17 \item{align}{integer, alignment of type in bytes.}
|
|
18 \item{basetype}{character string, base type of 'pointer' types.}
|
|
19 \item{signature}{character string specifying the struct/union type \link{signature}.}
|
|
20 \item{envir}{the environment to look for type object.}
|
|
21 \item{fields}{data frame with type and offset information that specifies aggregate struct and union types.}
|
|
22 }
|
|
23 \details{
|
|
24 Type information objects are created at run-time to describe the concrete
|
|
25 layout of foreign C data types on the host machine. While \link{type signature}s
|
|
26 give an abstract information on e.g. the field types and names of
|
|
27 aggregate structure types, these objects store concrete memory size, alignment and layout information
|
|
28 about C data types.
|
|
29 }
|
|
30 \value{
|
|
31 List object tagged as S3 class 'TypeInfo' with the following named entries
|
|
32 \item{type}{Type name.}
|
|
33 \item{size}{Size in bytes.}
|
|
34 \item{align}{Alignment in bytes.}
|
|
35 \item{fields}{Data frame for field information with the following columns:
|
|
36 \tabular{ll}{
|
|
37 \code{type} \tab type name\cr
|
|
38 \code{offset} \tab byte offset (starts counted from 0)\cr
|
|
39 }
|
|
40 }
|
|
41 }
|
|
42 \seealso{
|
|
43 \code{\link{parseStructInfos}} for details on the framework for handling foreign C data types.
|
|
44 }
|
|
45
|