7#ifndef MI_NEURAYLIB_IEXPRESSION_H
8#define MI_NEURAYLIB_IEXPRESSION_H
20class IAnnotation_block;
21class IExpression_list;
42 MDL_VERSION_FORCE_32_BIT = 0xffffffffU
49 mi::base::Interface_declare<0x0f4a7542,0x9b27,0x4924,0xbd,0x8d,0x82,0xe3,0xa9,0xa7,0xa9,0xd6>
65 EK_FORCE_32_BIT = 0xffffffffU
81 const T* ptr_T =
static_cast<const T*
>( ptr_type->
get_interface(
typename T::IID()));
94 mi::base::Interface_declare<0x9da8d465,0x4058,0x46cb,0x83,0x6e,0x0e,0x38,0xa6,0x7f,0xcd,0xef,
95 neuraylib::IExpression>
111 const T* ptr_T =
static_cast<const T*
>( ptr_value->
get_interface(
typename T::IID()));
126 T* ptr_T =
static_cast<T*
>( ptr_value->
get_interface(
typename T::IID()));
173 mi::base::Interface_declare<0xcf625aec,0x8eb8,0x4743,0x9f,0xf6,0x76,0x82,0x2c,0x02,0x54,0xa3,
174 neuraylib::IExpression>
215 mi::base::Interface_declare<0x206c4319,0x0b53,0x45a7,0x86,0x07,0x29,0x98,0xb3,0x44,0x7f,0xaa,
216 neuraylib::IExpression>
239 mi::base::Interface_declare<0x9253c9d6,0xe162,0x4234,0xab,0x91,0x54,0xc1,0xe4,0x87,0x39,0x66,
240 neuraylib::IExpression>
297 mi::base::Interface_declare<0xd91f484b,0xdbf8,0x4585,0x9d,0xab,0xba,0xd9,0x91,0x7f,0xe1,0x4c,
298 neuraylib::IExpression>
316 mi::base::Interface_declare<0x98ce8e89,0x9f23,0x45ec,0xa7,0xce,0x85,0x78,0x48,0x14,0x85,0x23>
352 const T* ptr_T =
static_cast<const T*
>( ptr_expression->
get_interface(
typename T::IID()));
373 const T* ptr_T =
static_cast<const T*
>( ptr_expression->
get_interface(
typename T::IID()));
410 mi::base::Interface_declare<0xa453318b,0xe056,0x4521,0x9f,0x3c,0x9d,0x5c,0x3,0x23,0x5f,0xb7>
459 AS_FORCE_32_BIT = 0xffffffffU
551 mi::base::Interface_declare<0xa9c652e7,0x952e,0x4887,0x93,0xb4,0x55,0xc8,0x66,0xd0,0x1a,0x1f>
574 mi::base::Interface_declare<0x57b0ae97,0x0815,0x41e8,0x89,0xe7,0x16,0xa1,0x23,0x86,0x80,0x6e>
602 mi::base::Interface_declare<0x6c4663c2,0x112f,0x4eeb,0x81,0x60,0x41,0xa5,0xa6,0xfb,0x74,0x3c>
649 mi::base::Interface_declare<0x9fd3b2d4,0xb5b8,0x4ccd,0x9b,0x5f,0x7b,0xd9,0x9d,0xeb,0x62,0x64>
774 T* ptr_T =
static_cast<T*
>( ptr_expr->
get_interface(
typename T::IID()));
808 COMPARISON_OPTIONS_FORCE_32_BIT = 0xffffffffU
846 Float64 epsilon = 0.0)
const = 0;
869 Float64 epsilon = 0.0)
const = 0;
912 const IAnnotation* annotation,
const char* name,
Size depth = 0)
const = 0;
974 const IType* target_type,
975 const char* cast_db_name,
978 Sint32* errors = 0)
const = 0;
980#ifdef MI_NEURAYLIB_DEPRECATED_15_0
983 const IType* target_type,
984 const char* cast_db_name,
989 src_expr, target_type, cast_db_name, force_cast,
false, errors);
1026 const char* cast_db_name,
1029 Sint32* errors = 0)
const = 0;
A simple string class.
Definition: istring.h:22
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
An annotation block is an array of annotations.
Definition: iexpression.h:575
virtual Sint32 add_annotation(IAnnotation *annotation)=0
Adds an annotation at the end of the annotation block.
virtual Sint32 set_annotation(Size index, const IAnnotation *annotation)=0
Sets an annotation block at a given index.
virtual const IAnnotation * get_annotation(Size index) const =0
Returns the annotation for index, or NULL if index is out of bounds.
virtual Size get_size() const =0
Returns the number of annotations in this block.
An annotation definition.
Definition: iexpression.h:411
virtual const char * get_parameter_name(Size index) const =0
Returns the parameter name of the given index.
virtual Size get_parameter_index(const char *name) const =0
Returns the parameter index of the given name.
virtual const IExpression_list * get_defaults() const =0
Returns the parameter defaults of the annotation definition.
virtual Size get_parameter_count() const =0
Returns the parameter count of the annotation definition.
virtual const IType_list * get_parameter_types() const =0
Returns the parameter types of the annotation definition.
virtual const IAnnotation_block * get_annotations() const =0
Returns the annotations of this definition or NULL if no annotations exist.
virtual const IAnnotation * create_annotation(const IExpression_list *arguments) const =0
Creates an annotation.
virtual const char * get_mdl_simple_name() const =0
Returns the simple MDL name of the annotation definition.
virtual bool is_exported() const =0
Indicates whether the annotation definition is exported by its module.
virtual const char * get_mdl_module_name() const =0
Returns the MDL name of the module containing this annotation definition.
virtual const char * get_module() const =0
Returns the DB name of the module containing this annotation definition.
virtual void get_mdl_version(Mdl_version &since, Mdl_version &removed) const =0
Returns the MDL version when this annotation definition was added and removed.
virtual const char * get_mdl_parameter_type_name(Size index) const =0
Returns the type name of the parameter at index.
Semantics
All known semantics of annotation definitions.
Definition: iexpression.h:419
@ AS_VERSION_ANNOTATION
This is the version() annotation.
Definition: iexpression.h:439
@ AS_REMOVED_ANNOTATION
This is the internal removed() annotation.
Definition: iexpression.h:427
@ AS_DEPRECATED_ANNOTATION
This is the deprecated() annotation.
Definition: iexpression.h:437
@ AS_ENABLE_IF_ANNOTATION
This is the enable_if() annotation.
Definition: iexpression.h:443
@ AS_SOFT_RANGE_ANNOTATION
This is the soft_range() annotation.
Definition: iexpression.h:434
@ AS_SINCE_ANNOTATION
This is the internal since() annotation.
Definition: iexpression.h:426
@ AS_CONST_EXPR_ANNOTATION
This is the internal const_expr() annotation.
Definition: iexpression.h:428
@ AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION
This is the node_output_port_default() annotation.
Definition: iexpression.h:455
@ AS_KEYWORDS_ANNOTATION
This is the key_words() annotation.
Definition: iexpression.h:453
@ AS_ORIGIN_ANNOTATION
This is the origin() annotation.
Definition: iexpression.h:454
@ AS_NOINLINE_ANNOTATION
This is the noinline() annotation.
Definition: iexpression.h:433
@ AS_DISPLAY_NAME_ANNOTATION
This is the display_name() annotation.
Definition: iexpression.h:445
@ AS_THUMBNAIL_ANNOTATION
This is the thumbnail() annotation.
Definition: iexpression.h:444
@ AS_THROWS_ANNOTATION
This is the internal throws() annotation.
Definition: iexpression.h:425
@ AS_NATIVE_ANNOTATION
This is the internal native() annotation.
Definition: iexpression.h:430
@ AS_DERIVABLE_ANNOTATION
This is the internal derivable() annotation.
Definition: iexpression.h:429
@ AS_AUTHOR_ANNOTATION
This is the author() annotation.
Definition: iexpression.h:448
@ AS_UNUSED_ANNOTATION
This is the unused() annotation.
Definition: iexpression.h:432
@ AS_MODIFIED_ANNOTATION
This is the modified() annotation.
Definition: iexpression.h:452
@ AS_DEPENDENCY_ANNOTATION
This is the dependency() annotation.
Definition: iexpression.h:440
@ AS_HIDDEN_ANNOTATION
This is the hidden() annotation.
Definition: iexpression.h:436
@ AS_DESCRIPTION_ANNOTATION
This is the description() annotation.
Definition: iexpression.h:447
@ AS_INTRINSIC_ANNOTATION
This is the internal intrinsic() annotation.
Definition: iexpression.h:423
@ AS_HARD_RANGE_ANNOTATION
This is the hard_range() annotation.
Definition: iexpression.h:435
@ AS_VERSION_NUMBER_ANNOTATION
This is the (old) version_number() annotation.
Definition: iexpression.h:438
@ AS_USAGE_ANNOTATION
This is the usage() annotation.
Definition: iexpression.h:442
@ AS_CREATED_ANNOTATION
This is the created() annotation.
Definition: iexpression.h:451
@ AS_UI_ORDER_ANNOTATION
This is the ui_order() annotation.
Definition: iexpression.h:441
@ AS_COPYRIGHT_NOTICE_ANNOTATION
This is the copyright_notice() annotation.
Definition: iexpression.h:450
@ AS_IN_GROUP_ANNOTATION
This is the in_group() annotation.
Definition: iexpression.h:446
@ AS_CONTRIBUTOR_ANNOTATION
This is the contributor() annotation.
Definition: iexpression.h:449
@ AS_UNKNOWN
Unknown semantics.
Definition: iexpression.h:420
virtual Semantics get_semantic() const =0
Returns the semantic of this annotation definition.
virtual const char * get_name() const =0
Returns the MDL name of the annotation definition.
An ordered collection of annotation blocks identified by name or index.
Definition: iexpression.h:603
virtual Sint32 set_annotation_block(const char *name, const IAnnotation_block *block)=0
Sets an annotation block identified by name.
virtual const char * get_name(Size index) const =0
Returns the name for the given index, or NULL if there is no such block.
virtual Sint32 set_annotation_block(Size index, const IAnnotation_block *block)=0
Sets an annotation block at a given index.
virtual const IAnnotation_block * get_annotation_block(Size index) const =0
Returns the annotation block for index, or NULL if there is no such block.
virtual Size get_size() const =0
Returns the number of elements.
virtual Size get_index(const char *name) const =0
Returns the index for the given name, or -1 if there is no such block.
virtual const IAnnotation_block * get_annotation_block(const char *name) const =0
Returns the annotation block for name, or NULL if there is no such block.
virtual Sint32 add_annotation_block(const char *name, const IAnnotation_block *block)=0
Adds an annotation block at the end of the list.
An annotation is similar to a direct call expression, but without return type.
Definition: iexpression.h:552
virtual const IAnnotation_definition * get_definition() const =0
Returns the definition of this annotation.
virtual const char * get_name() const =0
Returns the name of the annotation.
virtual void set_name(const char *name)=0
Sets the name of the annotation.
virtual const IExpression_list * get_arguments() const =0
Returns the arguments of the annotation.
An indirect call expression.
Definition: iexpression.h:175
virtual Sint32 set_call(const char *name)=0
Sets the name of the referenced function call or material instance.
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:178
virtual const char * get_call() const =0
Returns the DB name of the referenced function call or material instance.
A constant expression.
Definition: iexpression.h:96
virtual const IValue * get_value() const =0
Returns the value of the constant.
const T * get_value() const
Returns the value of the constant.
Definition: iexpression.h:106
T * get_value()
Returns the value of the constant.
Definition: iexpression.h:121
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:99
virtual Sint32 set_value(IValue *value)=0
Sets the value of the constant.
virtual IValue * get_value()=0
Returns the value of the constant.
A direct call expression.
Definition: iexpression.h:241
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:244
virtual const char * get_definition() const =0
Returns the DB name of the corresponding function or material definition.
virtual const IExpression_list * get_arguments() const =0
Returns the arguments of the direct call.
The interface for creating expressions.
Definition: iexpression.h:650
virtual const IString * dump(const IAnnotation_block *block, const char *name, Size depth=0) const =0
Returns a textual representation of an annotation block.
virtual IExpression * create_decl_cast(IExpression *src_expr, const IType_struct *target_type, const char *cast_db_name, bool force_cast, bool direct_call, Sint32 *errors=0) const =0
Returns an expression which casts the source expression to a target type.
T * clone(const T *expr) const
Clones the given expression.
Definition: iexpression.h:769
virtual Sint32 compare(const IExpression_list *lhs, const IExpression_list *rhs, Uint32 flags=0, Float64 epsilon=0.0) const =0
Compares two instances of mi::neuraylib::IExpression_list.
virtual IExpression_list * clone(const IExpression_list *expression_list) const =0
Clones the given expression list.
virtual IExpression * create_cast(IExpression *src_expr, const IType *target_type, const char *cast_db_name, bool force_cast, bool direct_call, Sint32 *errors=0) const =0
Returns an expression which casts the source expression to a target type.
virtual const IString * dump(const IExpression *expr, const char *name, Size depth=0) const =0
Returns a textual representation of an expression.
virtual const IString * dump(const IAnnotation *annotation, const char *name, Size depth=0) const =0
Returns a textual representation of an annotation.
virtual IExpression_call * create_call(const char *name) const =0
Creates a call.
virtual IExpression_parameter * create_parameter(const IType *type, Size index) const =0
Creates a parameter reference.
virtual IValue_factory * get_value_factory() const =0
Returns the value factory associated with this expression factory.
virtual IExpression_list * create_expression_list() const =0
Creates a new expression list.
virtual IExpression * clone(const IExpression *expr) const =0
Clones the given expression.
virtual IExpression_temporary * create_temporary(const IType *type, Size index) const =0
Creates a temporary reference.
virtual IAnnotation_list * create_annotation_list() const =0
Creates a new annotation list.
Comparison_options
Various options for the comparison of expressions or expression lists.
Definition: iexpression.h:792
@ DEFAULT_OPTIONS
Default comparison options.
Definition: iexpression.h:794
@ SKIP_TYPE_ALIASES
This option indicates that all type aliases should be skipped before types of expression are compared...
Definition: iexpression.h:806
@ DEEP_CALL_COMPARISONS
This option indicates that call expressions should be compared for equality, not for identity.
Definition: iexpression.h:801
virtual const IExpression_constant * create_constant(const IValue *value) const =0
Creates a constant (const).
virtual IAnnotation * create_annotation(const char *name, const IExpression_list *arguments) const =0
Creates a new annotation.
virtual IAnnotation_block * create_annotation_block() const =0
Creates a new annotation block.
virtual IExpression_direct_call * create_direct_call(const char *name, IExpression_list *arguments, Sint32 *errors=0) const =0
Creates a direct call.
virtual Sint32 compare(const IExpression *lhs, const IExpression *rhs, Uint32 flags=0, Float64 epsilon=0.0) const =0
Compares two instances of mi::neuraylib::IExpression.
virtual IExpression_constant * create_constant(IValue *value) const =0
Creates a constant (mutable).
virtual const IString * dump(const IAnnotation_list *list, const char *name, Size depth=0) const =0
Returns a textual representation of an annotation list.
virtual const IString * dump(const IExpression_list *list, const char *name, Size depth=0) const =0
Returns a textual representation of an expression list.
An ordered collection of expressions identified by name or index.
Definition: iexpression.h:317
virtual const IExpression * get_expression(const char *name) const =0
Returns the expression for name, or NULL if there is no such expression.
virtual Sint32 add_expression(const char *name, const IExpression *expression)=0
Adds an expression at the end of the list.
const T * get_expression(Size index) const
Returns the expression for index, or NULL if there is no such expression.
Definition: iexpression.h:347
virtual Sint32 set_expression(const char *name, const IExpression *expression)=0
Sets an expression identified by name.
virtual Size get_size() const =0
Returns the number of elements.
virtual Size get_index(const char *name) const =0
Returns the index for the given name, or -1 if there is no such expression.
virtual Sint32 set_expression(Size index, const IExpression *expression)=0
Sets an expression at a given index.
const T * get_expression(const char *name) const
Returns the expression for name, or NULL if there is no such expression.
Definition: iexpression.h:368
virtual const char * get_name(Size index) const =0
Returns the name for the given index, or NULL if there is no such expression.
virtual const IExpression * get_expression(Size index) const =0
Returns the expression for index, or NULL if there is no such expression.
A parameter reference expression.
Definition: iexpression.h:217
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:220
virtual Size get_index() const =0
Returns the index of the referenced parameter.
virtual void set_index(Size index)=0
Sets the index of the referenced parameter.
A temporary reference expression.
Definition: iexpression.h:299
virtual void set_index(Size index)=0
Sets the index of the referenced temporary.
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:302
virtual Size get_index() const =0
Returns the index of the referenced temporary.
The interface to MDL expressions.
Definition: iexpression.h:50
const T * get_type() const
Returns the type of this expression.
Definition: iexpression.h:76
Kind
The possible kinds of expressions.
Definition: iexpression.h:53
@ EK_CALL
An indirect call expression. See mi::neuraylib::IExpression_call.
Definition: iexpression.h:57
@ EK_DIRECT_CALL
A direct call expression. See mi::neuraylib::IExpression_direct_call.
Definition: iexpression.h:61
@ EK_CONSTANT
A constant expression. See mi::neuraylib::IExpression_constant.
Definition: iexpression.h:55
@ EK_PARAMETER
A parameter reference expression. See mi::neuraylib::IExpression_parameter.
Definition: iexpression.h:59
@ EK_TEMPORARY
A temporary reference expression. See mi::neuraylib::IExpression_temporary.
Definition: iexpression.h:63
virtual const IType * get_type() const =0
Returns the type of this expression.
virtual Kind get_kind() const =0
Returns the kind of this expression.
An ordered collection of types identified by name or index.
Definition: itype.h:646
The type of kind struct.
Definition: itype.h:475
The interface to MDL types.
Definition: itype.h:151
The interface for creating values.
Definition: ivalue.h:660
The interface to MDL values.
Definition: ivalue.h:33
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:58
virtual const IInterface * get_interface(const Uuid &interface_id) const =0
Acquires a const interface from another.
virtual Uint32 release() const =0
Decrements the reference count.
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
double Float64
64-bit float.
Definition: types.h:52
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mdl_version
The MDL version.
Definition: iexpression.h:28
@ MDL_VERSION_1_0
MDL version 1.0.
Definition: iexpression.h:29
@ MDL_VERSION_INVALID
Invalid MDL version.
Definition: iexpression.h:41
@ MDL_VERSION_1_6
MDL version 1.6.
Definition: iexpression.h:35
@ MDL_VERSION_1_4
MDL version 1.4.
Definition: iexpression.h:33
@ MDL_VERSION_1_3
MDL version 1.3.
Definition: iexpression.h:32
@ MDL_VERSION_1_7
MDL version 1.7.
Definition: iexpression.h:36
@ MDL_VERSION_1_9
MDL version 1.9.
Definition: iexpression.h:38
@ MDL_VERSION_LATEST
Latest MDL version.
Definition: iexpression.h:40
@ MDL_VERSION_EXP
MDL experimental features.
Definition: iexpression.h:39
@ MDL_VERSION_1_5
MDL version 1.5.
Definition: iexpression.h:34
@ MDL_VERSION_1_1
MDL version 1.1.
Definition: iexpression.h:30
@ MDL_VERSION_1_8
MDL version 1.8.
Definition: iexpression.h:37
@ MDL_VERSION_1_2
MDL version 1.2.
Definition: iexpression.h:31
Values of the MDL type system.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Major and minor version number and an optional qualifier.