Iray SDK API nvidia_logo_transpbg.gif Up
iexpression.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IEXPRESSION_H
8#define MI_NEURAYLIB_IEXPRESSION_H
9
10#include <mi/neuraylib/ivalue.h>
11#include <mi/neuraylib/version.h> // for MI_NEURAYLIB_DEPRECATED_ENUM_VALUE
12
13namespace mi {
14
15class IString;
16
17namespace neuraylib {
18
19class IAnnotation;
20class IAnnotation_block;
21class IExpression_list;
22
42 MDL_VERSION_INVALID = 0xffffffffU
43 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(MDL_VERSION_FORCE_32_BIT, 0xffffffffU)
44};
45
49class IExpression : public
50 mi::base::Interface_declare<0x0f4a7542,0x9b27,0x4924,0xbd,0x8d,0x82,0xe3,0xa9,0xa7,0xa9,0xd6>
51{
52public:
54 enum Kind : Uint32 {
65 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(EK_FORCE_32_BIT, 0xffffffffU)
66 };
67
69 virtual Kind get_kind() const = 0;
70
72 virtual const IType* get_type() const = 0;
73
75 template <class T>
76 const T* get_type() const
77 {
78 const IType* ptr_type = get_type();
79 if( !ptr_type)
80 return 0;
81 const T* ptr_T = static_cast<const T*>( ptr_type->get_interface( typename T::IID()));
82 ptr_type->release();
83 return ptr_T;
84 }
85};
86
92 mi::base::Interface_declare<0x9da8d465,0x4058,0x46cb,0x83,0x6e,0x0e,0x38,0xa6,0x7f,0xcd,0xef,
93 neuraylib::IExpression>
94{
95public:
97 static const Kind s_kind = EK_CONSTANT;
98
100 virtual const IValue* get_value() const = 0;
101
103 template <class T>
104 const T* get_value() const
105 {
106 const IValue* ptr_value = get_value();
107 if( !ptr_value)
108 return nullptr;
109 const T* ptr_T = static_cast<const T*>( ptr_value->get_interface( typename T::IID()));
110 ptr_value->release();
111 return ptr_T;
112 }
113
115 virtual IValue* get_value() = 0;
116
118 template <class T>
120 {
121 IValue* ptr_value = get_value();
122 if( !ptr_value)
123 return nullptr;
124 T* ptr_T = static_cast<T*>( ptr_value->get_interface( typename T::IID()));
125 ptr_value->release();
126 return ptr_T;
127 }
128
135 virtual Sint32 set_value( IValue* value) = 0;
136};
137
170class IExpression_call : public
171 mi::base::Interface_declare<0xcf625aec,0x8eb8,0x4743,0x9f,0xf6,0x76,0x82,0x2c,0x02,0x54,0xa3,
172 neuraylib::IExpression>
173{
174public:
176 static const Kind s_kind = EK_CALL;
177
179 virtual const char* get_call() const = 0;
180
195 virtual Sint32 set_call( const char* name) = 0;
196};
197
213 mi::base::Interface_declare<0x206c4319,0x0b53,0x45a7,0x86,0x07,0x29,0x98,0xb3,0x44,0x7f,0xaa,
214 neuraylib::IExpression>
215{
216public:
218 static const Kind s_kind = EK_PARAMETER;
219
221 virtual Size get_index() const = 0;
222
224 virtual void set_index( Size index) = 0;
225};
226
237 mi::base::Interface_declare<0x9253c9d6,0xe162,0x4234,0xab,0x91,0x54,0xc1,0xe4,0x87,0x39,0x66,
238 neuraylib::IExpression>
239{
240public:
242 static const Kind s_kind = EK_DIRECT_CALL;
243
245 virtual const char* get_definition() const = 0;
246
248 virtual const IExpression_list* get_arguments() const = 0;
249};
250
296 mi::base::Interface_declare<0xd91f484b,0xdbf8,0x4585,0x9d,0xab,0xba,0xd9,0x91,0x7f,0xe1,0x4c,
297 neuraylib::IExpression>
298{
299public:
301 static const Kind s_kind = EK_TEMPORARY;
302
304 virtual Size get_index() const = 0;
305
307 virtual void set_index( Size index) = 0;
308};
309
314class IExpression_list : public
315 mi::base::Interface_declare<0x98ce8e89,0x9f23,0x45ec,0xa7,0xce,0x85,0x78,0x48,0x14,0x85,0x23>
316{
317public:
319 virtual Size get_size() const = 0;
320
322 virtual Size get_index( const char* name) const = 0;
323
325 virtual const char* get_name( Size index) const = 0;
326
335 virtual const IExpression* get_expression( Size index) const = 0;
336
345 template <class T>
346 const T* get_expression( Size index) const
347 {
348 const IExpression* ptr_expression = get_expression( index);
349 if( !ptr_expression)
350 return nullptr;
351 const T* ptr_T = static_cast<const T*>( ptr_expression->get_interface( typename T::IID()));
352 ptr_expression->release();
353 return ptr_T;
354 }
355
360 virtual const IExpression* get_expression( const char* name) const = 0;
361
366 template <class T>
367 const T* get_expression( const char* name) const
368 {
369 const IExpression* ptr_expression = get_expression( name);
370 if( !ptr_expression)
371 return nullptr;
372 const T* ptr_T = static_cast<const T*>( ptr_expression->get_interface( typename T::IID()));
373 ptr_expression->release();
374 return ptr_T;
375 }
376
387 virtual Sint32 set_expression( Size index, const IExpression* expression) = 0;
388
398 virtual Sint32 set_expression( const char* name, const IExpression* expression) = 0;
399
406 virtual Sint32 add_expression( const char* name, const IExpression* expression) = 0;
407};
408
412 mi::base::Interface_declare<0xa453318b,0xe056,0x4521,0x9f,0x3c,0x9d,0x5c,0x3,0x23,0x5f,0xb7>
413{
414public:
415
421 {
423
426 AS_ANNOTATION_FIRST = AS_INTRINSIC_ANNOTATION,
433
459
460 AS_ANNOTATION_LAST = AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION
461 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(AS_FORCE_32_BIT, 0xffffffffU)
462 };
463
467 virtual const char* get_module() const = 0;
468
470 virtual const char* get_name() const = 0;
471
473 virtual const char* get_mdl_module_name() const = 0;
474
481 virtual const char* get_mdl_simple_name() const = 0;
482
491 virtual const char* get_mdl_parameter_type_name( Size index) const = 0;
492
494 virtual Semantics get_semantic() const = 0;
495
497 virtual bool is_exported() const = 0;
498
507 virtual void get_mdl_version( Mdl_version& since, Mdl_version& removed) const = 0;
508
510 virtual Size get_parameter_count() const = 0;
511
517 virtual const char* get_parameter_name( Size index) const = 0;
518
524 virtual Size get_parameter_index( const char* name) const = 0;
525
527 virtual const IType_list* get_parameter_types() const = 0;
528
530 virtual const IExpression_list* get_defaults() const = 0;
531
534 virtual const IAnnotation_block* get_annotations() const = 0;
535
542 virtual const IAnnotation* create_annotation( const IExpression_list* arguments) const = 0;
543};
544
550class IAnnotation : public
551 mi::base::Interface_declare<0xa9c652e7,0x952e,0x4887,0x93,0xb4,0x55,0xc8,0x66,0xd0,0x1a,0x1f>
552{
553public:
555 virtual const char* get_name() const = 0;
556
558 virtual void set_name( const char* name) = 0;
559
563 virtual const IExpression_list* get_arguments() const = 0;
564
566 virtual const IAnnotation_definition* get_definition() const = 0;
567};
568
573class IAnnotation_block : public
574 mi::base::Interface_declare<0x57b0ae97,0x0815,0x41e8,0x89,0xe7,0x16,0xa1,0x23,0x86,0x80,0x6e>
575{
576public:
578 virtual Size get_size() const = 0;
579
581 virtual const IAnnotation* get_annotation( Size index) const = 0;
582
589 virtual Sint32 set_annotation( Size index, const IAnnotation* annotation) = 0;
590
596 virtual Sint32 add_annotation( IAnnotation* annotation) = 0;
597};
598
603class IAnnotation_list : public
604 mi::base::Interface_declare<0x6c4663c2,0x112f,0x4eeb,0x81,0x60,0x41,0xa5,0xa6,0xfb,0x74,0x3c>
605{
606public:
608 virtual Size get_size() const = 0;
609
611 virtual Size get_index( const char* name) const = 0;
612
614 virtual const char* get_name( Size index) const = 0;
615
617 virtual const IAnnotation_block* get_annotation_block( Size index) const = 0;
618
620 virtual const IAnnotation_block* get_annotation_block( const char* name) const = 0;
621
628 virtual Sint32 set_annotation_block( Size index, const IAnnotation_block* block) = 0;
629
636 virtual Sint32 set_annotation_block( const char* name, const IAnnotation_block* block) = 0;
637
644 virtual Sint32 add_annotation_block( const char* name, const IAnnotation_block* block) = 0;
645};
646
654 mi::base::Interface_declare<0x9fd3b2d4,0xb5b8,0x4ccd,0x9b,0x5f,0x7b,0xd9,0x9d,0xeb,0x62,0x64>
655{
656public:
658
659
661 virtual IValue_factory* get_value_factory() const = 0;
662
664
666
671 virtual IExpression_constant* create_constant( IValue* value) const = 0;
672
677 virtual const IExpression_constant* create_constant( const IValue* value) const = 0;
678
683 virtual IExpression_call* create_call( const char* name) const = 0;
684
690 virtual IExpression_parameter* create_parameter( const IType* type, Size index) const = 0;
691
729 const char* name, IExpression_list* arguments, Sint32* errors = nullptr) const = 0;
730
736 virtual IExpression_temporary* create_temporary( const IType* type, Size index) const = 0;
737
740
742
744
749 const char* name, const IExpression_list* arguments) const = 0;
750
753
756
758
760
766 virtual IExpression* clone( const IExpression* expr) const = 0;
767
773 template <class T>
774 T* clone( const T* expr) const
775 {
776 IExpression* ptr_expr = clone( static_cast<const IExpression*>( expr));
777 if( !ptr_expr)
778 return 0;
779 T* ptr_T = static_cast<T*>( ptr_expr->get_interface( typename T::IID()));
780 ptr_expr->release();
781 return ptr_T;
782 }
783
788 virtual IExpression_list* clone( const IExpression_list* expression_list) const = 0;
789
791
793
812 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(COMPARISON_OPTIONS_FORCE_32_BIT, 0xffffffffU)
813 };
814
847 const IExpression* lhs,
848 const IExpression* rhs,
849 Uint32 flags = 0,
850 Float64 epsilon = 0.0) const = 0;
851
870 const IExpression_list* lhs,
871 const IExpression_list* rhs,
872 Uint32 flags = 0,
873 Float64 epsilon = 0.0) const = 0;
874
876
878
887 virtual const IString* dump(
888 const IExpression* expr, const char* name, Size depth = 0) const = 0;
889
899 virtual const IString* dump(
900 const IExpression_list* list, const char* name, Size depth = 0) const = 0;
901
903
905
915 virtual const IString* dump(
916 const IAnnotation* annotation, const char* name, Size depth = 0) const = 0;
917
927 virtual const IString* dump(
928 const IAnnotation_block* block, const char* name, Size depth = 0) const = 0;
929
939 virtual const IString* dump(
940 const IAnnotation_list* list, const char* name, Size depth = 0) const = 0;
941
943
945
977 IExpression* src_expr,
978 const IType* target_type,
979 const char* cast_db_name,
980 bool force_cast,
981 bool direct_call,
982 Sint32* errors = nullptr) const = 0;
983
984#ifdef MI_NEURAYLIB_DEPRECATED_15_0
985 inline IExpression* create_cast(
986 IExpression* src_expr,
987 const IType* target_type,
988 const char* cast_db_name,
989 bool force_cast,
990 Sint32* errors = 0) const
991 {
992 return create_cast(
993 src_expr, target_type, cast_db_name, force_cast, false, errors);
994 }
995#endif // MI_NEURAYLIB_DEPRECATED_15_0
996
1028 IExpression* src_expr,
1029 const IType_struct* target_type,
1030 const char* cast_db_name,
1031 bool force_cast,
1032 bool direct_call,
1033 Sint32* errors = nullptr) const = 0;
1034
1036};
1037 // end group mi_neuray_mdl_types
1039
1040} // namespace neuraylib
1041
1042} // namespace mi
1043
1044#endif // MI_NEURAYLIB_IEXPRESSION_H
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 nullptr 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:413
virtual const char * get_parameter_name(Size index) const =0
Returns the parameter name of the given index.
Semantics
All known semantics of annotation definitions.
Definition: iexpression.h:421
@ AS_VERSION_ANNOTATION
This is the version() annotation.
Definition: iexpression.h:441
@ AS_REMOVED_ANNOTATION
This is the internal removed() annotation.
Definition: iexpression.h:429
@ AS_DEPRECATED_ANNOTATION
This is the deprecated() annotation.
Definition: iexpression.h:439
@ AS_ENABLE_IF_ANNOTATION
This is the enable_if() annotation.
Definition: iexpression.h:445
@ AS_SOFT_RANGE_ANNOTATION
This is the soft_range() annotation.
Definition: iexpression.h:436
@ AS_SINCE_ANNOTATION
This is the internal since() annotation.
Definition: iexpression.h:428
@ AS_CONST_EXPR_ANNOTATION
This is the internal const_expr() annotation.
Definition: iexpression.h:430
@ AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION
This is the node_output_port_default() annotation.
Definition: iexpression.h:457
@ AS_KEYWORDS_ANNOTATION
This is the key_words() annotation.
Definition: iexpression.h:455
@ AS_ORIGIN_ANNOTATION
This is the origin() annotation.
Definition: iexpression.h:456
@ AS_NOINLINE_ANNOTATION
This is the noinline() annotation.
Definition: iexpression.h:435
@ AS_DISPLAY_NAME_ANNOTATION
This is the display_name() annotation.
Definition: iexpression.h:447
@ AS_THUMBNAIL_ANNOTATION
This is the thumbnail() annotation.
Definition: iexpression.h:446
@ AS_THROWS_ANNOTATION
This is the internal throws() annotation.
Definition: iexpression.h:427
@ AS_NATIVE_ANNOTATION
This is the internal native() annotation.
Definition: iexpression.h:432
@ AS_DERIVABLE_ANNOTATION
This is the internal derivable() annotation.
Definition: iexpression.h:431
@ AS_AUTHOR_ANNOTATION
This is the author() annotation.
Definition: iexpression.h:450
@ AS_UNUSED_ANNOTATION
This is the unused() annotation.
Definition: iexpression.h:434
@ AS_MODIFIED_ANNOTATION
This is the modified() annotation.
Definition: iexpression.h:454
@ AS_DEPENDENCY_ANNOTATION
This is the dependency() annotation.
Definition: iexpression.h:442
@ AS_HIDDEN_ANNOTATION
This is the hidden() annotation.
Definition: iexpression.h:438
@ AS_DESCRIPTION_ANNOTATION
This is the description() annotation.
Definition: iexpression.h:449
@ AS_INTRINSIC_ANNOTATION
This is the internal intrinsic() annotation.
Definition: iexpression.h:425
@ AS_HARD_RANGE_ANNOTATION
This is the hard_range() annotation.
Definition: iexpression.h:437
@ AS_VERSION_NUMBER_ANNOTATION
This is the (old) version_number() annotation.
Definition: iexpression.h:440
@ AS_USAGE_ANNOTATION
This is the usage() annotation.
Definition: iexpression.h:444
@ AS_CREATED_ANNOTATION
This is the created() annotation.
Definition: iexpression.h:453
@ AS_UI_ORDER_ANNOTATION
This is the ui_order() annotation.
Definition: iexpression.h:443
@ AS_COPYRIGHT_NOTICE_ANNOTATION
This is the copyright_notice() annotation.
Definition: iexpression.h:452
@ AS_IN_GROUP_ANNOTATION
This is the in_group() annotation.
Definition: iexpression.h:448
@ AS_CONTRIBUTOR_ANNOTATION
This is the contributor() annotation.
Definition: iexpression.h:451
@ AS_UNKNOWN
Unknown semantics.
Definition: iexpression.h:422
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 nullptr 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.
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:605
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 nullptr 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 nullptr 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 nullptr 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:173
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:176
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:94
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:104
T * get_value()
Returns the value of the constant.
Definition: iexpression.h:119
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:97
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:239
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:242
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:655
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_cast(IExpression *src_expr, const IType *target_type, const char *cast_db_name, bool force_cast, bool direct_call, Sint32 *errors=nullptr) 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:774
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_direct_call * create_direct_call(const char *name, IExpression_list *arguments, Sint32 *errors=nullptr) const =0
Creates a direct call.
virtual IExpression_list * clone(const IExpression_list *expression_list) const =0
Clones the given expression list.
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.
virtual const IExpression_constant * create_constant(const IValue *value) const =0
Creates a constant (const).
Comparison_options
Various options for the comparison of expressions or expression lists.
Definition: iexpression.h:797
@ DEFAULT_OPTIONS
Default comparison options.
Definition: iexpression.h:799
@ SKIP_TYPE_ALIASES
This option indicates that all type aliases should be skipped before types of expression are compared...
Definition: iexpression.h:811
@ DEEP_CALL_COMPARISONS
This option indicates that call expressions should be compared for equality, not for identity.
Definition: iexpression.h:806
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 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 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=nullptr) const =0
Returns an expression which casts the source expression to a target type.
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:316
virtual const IExpression * get_expression(const char *name) const =0
Returns the expression for name, or nullptr 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 nullptr if there is no such expression.
Definition: iexpression.h:346
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 nullptr if there is no such expression.
Definition: iexpression.h:367
virtual const char * get_name(Size index) const =0
Returns the name for the given index, or nullptr if there is no such expression.
virtual const IExpression * get_expression(Size index) const =0
Returns the expression for index, or nullptr if there is no such expression.
A parameter reference expression.
Definition: iexpression.h:215
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:218
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:298
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:301
virtual Size get_index() const =0
Returns the index of the referenced temporary.
The interface to MDL expressions.
Definition: iexpression.h:51
Kind
The possible kinds of expressions.
Definition: iexpression.h:54
@ EK_CALL
An indirect call expression. See mi::neuraylib::IExpression_call.
Definition: iexpression.h:58
@ EK_DIRECT_CALL
A direct call expression. See mi::neuraylib::IExpression_direct_call.
Definition: iexpression.h:62
@ EK_CONSTANT
A constant expression. See mi::neuraylib::IExpression_constant.
Definition: iexpression.h:56
@ EK_PARAMETER
A parameter reference expression. See mi::neuraylib::IExpression_parameter.
Definition: iexpression.h:60
@ EK_TEMPORARY
A temporary reference expression. See mi::neuraylib::IExpression_temporary.
Definition: iexpression.h:64
const T * get_type() const
Returns the type of this expression.
Definition: iexpression.h:76
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:638
The type of kind struct.
Definition: itype.h:472
The interface to MDL types.
Definition: itype.h:153
The interface for creating values.
Definition: ivalue.h:658
The interface to MDL values.
Definition: ivalue.h:34
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.
int Sint32
32-bit signed integer.
Definition: types.h:46
double Float64
64-bit float.
Definition: types.h:52
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
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:42
@ 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_10
MDL version 1.10.
Definition: iexpression.h:39
@ 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:41
@ MDL_VERSION_EXP
MDL experimental features.
Definition: iexpression.h:40
@ 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: neuraylib.h:179
Major and minor version number and an optional qualifier.