Those commands manipulate IDL type objects and return information about
them. They all take a type object as their first argument, noted $type
in the following command descriptions. Such an object is typically returned
by other procedures, such as dotgen types
(see dotgen types).
Return a string describing the nature of the IDL type, such as
long
,double
,struct
...
Return the name of the IDL type. No namespace components are included in the result.
Return the fully qualified name of the IDL type. The result includes the namespace hierarchy in which the type is defined and the last component is the result of
$type name
.
Return the list of lexical scopes in which the type is defined. Each element of the list contains two values: the nature of the scope and its name. The nature of the scope will be either
module
for IDL modules, orstruct
if the type is defined inside an IDLstruct
.
Return a boolean indicating if the type is of fixed, constant size (true) or not (false).
Return a new type object with all aliases resolved. For
const
types, this returns the type of the constant. Fortypedef
, this return the first non-aliased type. Forstruct
andunion
members, this returns the type of the member.
Return the parent type of a nested type definition, or raise an error if the type is not nested.
Return a list of all types recursively defined in the given type. This is mostly useful for
struct
orunion
types.Parameters:
- filter
- The optional filter can be used to filter out some elements from the type list. The filter must be a tcl anonymous function (see tcl [apply] command) that accepts one argument that is a genom object. It must return a boolean to indicate whether the type should be included (true) or excluded (false).
Return the underlying type of a type that contains another type definition. For instance, this procedure invoked on an
array
orsequence
type returns the element type. It returns the aliased type fortypedef
.
Return a list of types defined by the given
struct
,union
orenum
type.
Return an ASCII string uniquely describing the given type, suitable for use in source code written in the current programming language.
Return an ASCII string representing the implementation (definition) of the given type, suitable for use in source code written in the current programming language.
Return the declarator for $type or for a variable var of that type, in the current language.
Parameters:
- var
- The variable being declared. If not given, an abstract declarator is returned.
Return an expression representing the address of a variable of the given type in the current language.
Parameters:
- var
- The variable of which the address must be taken.
Return an expression that declares a parameter var of the given type, passed by value or reference according to the second parameter.
Parameters:
- var
- The argument name being declared. If not given, an abstract declarator is returned.
Return an expression that passes a variable var of the given type as a function parameter. The variable is passed by value or reference according to second argument.
Parameters:
- var
- The variable that must be passed.
Return an expression that retrieves the value of a parameter var, passed by value or reference according to the second argument.
Parameters:
- var
- The argument name.
Return an ASCII representaion (32 characters) of an MD5 digest of the given type. This is useful for implementing a cheap runtime verification that two types match.
Return any value defined in a
#pragma masquerade
for that type, if the current template matches the corresponding parameter of the#pragma
. See #pragma masquerade.