Struct vkxml::Define
[−]
[src]
pub struct Define {
pub name: Identifier,
pub notation: Option<Notation>,
pub is_disabled: bool,
pub comment: Option<String>,
pub replace: bool,
pub defref: Vec<Identifier>,
pub parameters: Vec<Identifier>,
pub c_expression: Option<String>,
pub value: Option<String>,
}C #define statement.
The 4 forms of defines:
#define {name} {c_expression}#define {name}({parameters}) {c_expression}{c_expression}#define {name} {value}
If value exists, the macro is simply #define {name} {value}. This type of macro definition
represents something that is generally language-neutral; a decimal number or string literal,
for example.
If value does not exist, the macro will be a C-expression with optional parameters and
defrefs.
Fields
name: Identifier
notation: Option<Notation>
is_disabled: bool
If "true", then the processing system should add comments to each line of the
#define. That is, the #define exists, but has been commented out for some
reason.
comment: Option<String>
Specifies a possibly multi-line in-language comment which is expected to be
placed near the element in which comment appears.
replace: bool
If true, then the processor should not attempt to generate the #define statement at all.
The entire c-expression will include the #define, as well as the typename of the define,
and any parameters. This is used for very complex macros.
defref: Vec<Identifier>
Specifies a definition that is referenced in the C-expression.
parameters: Vec<Identifier>
The name of a #define's parameter.
c_expression: Option<String>
Text that is intended to be used verbatim in C or C++ implementations.
If the replace attribute is not true, then the processor should
generate the #define {name}({parameters}) part of the define before the c-expression.
value: Option<String>
Decimal number or string literal.