MDL 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>
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 MDL_VERSION_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
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 {
65 // Undocumented, for alignment only.
66 EK_FORCE_32_BIT = 0xffffffffU
67 };
68
70 virtual Kind get_kind() const = 0;
71
73 virtual const IType* get_type() const = 0;
74
76 template <class T>
77 const T* get_type() const
78 {
79 const IType* ptr_type = get_type();
80 if( !ptr_type)
81 return 0;
82 const T* ptr_T = static_cast<const T*>( ptr_type->get_interface( typename T::IID()));
83 ptr_type->release();
84 return ptr_T;
85 }
86};
87
88mi_static_assert( sizeof( IExpression::Kind) == sizeof( Uint32));
89
95 mi::base::Interface_declare<0x9da8d465,0x4058,0x46cb,0x83,0x6e,0x0e,0x38,0xa6,0x7f,0xcd,0xef,
96 neuraylib::IExpression>
97{
98public:
100 static const Kind s_kind = EK_CONSTANT;
101
103 virtual const IValue* get_value() const = 0;
104
106 template <class T>
107 const T* get_value() const
108 {
109 const IValue* ptr_value = get_value();
110 if( !ptr_value)
111 return nullptr;
112 const T* ptr_T = static_cast<const T*>( ptr_value->get_interface( typename T::IID()));
113 ptr_value->release();
114 return ptr_T;
115 }
116
118 virtual IValue* get_value() = 0;
119
121 template <class T>
123 {
124 IValue* ptr_value = get_value();
125 if( !ptr_value)
126 return nullptr;
127 T* ptr_T = static_cast<T*>( ptr_value->get_interface( typename T::IID()));
128 ptr_value->release();
129 return ptr_T;
130 }
131
138 virtual Sint32 set_value( IValue* value) = 0;
139};
140
173class IExpression_call : public
174 mi::base::Interface_declare<0xcf625aec,0x8eb8,0x4743,0x9f,0xf6,0x76,0x82,0x2c,0x02,0x54,0xa3,
175 neuraylib::IExpression>
176{
177public:
179 static const Kind s_kind = EK_CALL;
180
182 virtual const char* get_call() const = 0;
183
198 virtual Sint32 set_call( const char* name) = 0;
199};
200
216 mi::base::Interface_declare<0x206c4319,0x0b53,0x45a7,0x86,0x07,0x29,0x98,0xb3,0x44,0x7f,0xaa,
217 neuraylib::IExpression>
218{
219public:
221 static const Kind s_kind = EK_PARAMETER;
222
224 virtual Size get_index() const = 0;
225
227 virtual void set_index( Size index) = 0;
228};
229
240 mi::base::Interface_declare<0x9253c9d6,0xe162,0x4234,0xab,0x91,0x54,0xc1,0xe4,0x87,0x39,0x66,
241 neuraylib::IExpression>
242{
243public:
245 static const Kind s_kind = EK_DIRECT_CALL;
246
248 virtual const char* get_definition() const = 0;
249
251 virtual const IExpression_list* get_arguments() const = 0;
252};
253
299 mi::base::Interface_declare<0xd91f484b,0xdbf8,0x4585,0x9d,0xab,0xba,0xd9,0x91,0x7f,0xe1,0x4c,
300 neuraylib::IExpression>
301{
302public:
304 static const Kind s_kind = EK_TEMPORARY;
305
307 virtual Size get_index() const = 0;
308
310 virtual void set_index( Size index) = 0;
311};
312
317class IExpression_list : public
318 mi::base::Interface_declare<0x98ce8e89,0x9f23,0x45ec,0xa7,0xce,0x85,0x78,0x48,0x14,0x85,0x23>
319{
320public:
322 virtual Size get_size() const = 0;
323
325 virtual Size get_index( const char* name) const = 0;
326
328 virtual const char* get_name( Size index) const = 0;
329
338 virtual const IExpression* get_expression( Size index) const = 0;
339
348 template <class T>
349 const T* get_expression( Size index) const
350 {
351 const IExpression* ptr_expression = get_expression( index);
352 if( !ptr_expression)
353 return nullptr;
354 const T* ptr_T = static_cast<const T*>( ptr_expression->get_interface( typename T::IID()));
355 ptr_expression->release();
356 return ptr_T;
357 }
358
363 virtual const IExpression* get_expression( const char* name) const = 0;
364
369 template <class T>
370 const T* get_expression( const char* name) const
371 {
372 const IExpression* ptr_expression = get_expression( name);
373 if( !ptr_expression)
374 return nullptr;
375 const T* ptr_T = static_cast<const T*>( ptr_expression->get_interface( typename T::IID()));
376 ptr_expression->release();
377 return ptr_T;
378 }
379
390 virtual Sint32 set_expression( Size index, const IExpression* expression) = 0;
391
401 virtual Sint32 set_expression( const char* name, const IExpression* expression) = 0;
402
409 virtual Sint32 add_expression( const char* name, const IExpression* expression) = 0;
410};
411
415 mi::base::Interface_declare<0xa453318b,0xe056,0x4521,0x9f,0x3c,0x9d,0x5c,0x3,0x23,0x5f,0xb7>
416{
417public:
418
424 {
426
429 AS_ANNOTATION_FIRST = AS_INTRINSIC_ANNOTATION,
436
462
463 AS_ANNOTATION_LAST = AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION,
464 AS_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only.
465 };
466
470 virtual const char* get_module() const = 0;
471
473 virtual const char* get_name() const = 0;
474
476 virtual const char* get_mdl_module_name() const = 0;
477
484 virtual const char* get_mdl_simple_name() const = 0;
485
494 virtual const char* get_mdl_parameter_type_name( Size index) const = 0;
495
497 virtual Semantics get_semantic() const = 0;
498
500 virtual bool is_exported() const = 0;
501
510 virtual void get_mdl_version( Mdl_version& since, Mdl_version& removed) const = 0;
511
513 virtual Size get_parameter_count() const = 0;
514
520 virtual const char* get_parameter_name( Size index) const = 0;
521
527 virtual Size get_parameter_index( const char* name) const = 0;
528
530 virtual const IType_list* get_parameter_types() const = 0;
531
533 virtual const IExpression_list* get_defaults() const = 0;
534
537 virtual const IAnnotation_block* get_annotations() const = 0;
538
545 virtual const IAnnotation* create_annotation( const IExpression_list* arguments) const = 0;
546};
547
549
555class IAnnotation : public
556 mi::base::Interface_declare<0xa9c652e7,0x952e,0x4887,0x93,0xb4,0x55,0xc8,0x66,0xd0,0x1a,0x1f>
557{
558public:
560 virtual const char* get_name() const = 0;
561
563 virtual void set_name( const char* name) = 0;
564
568 virtual const IExpression_list* get_arguments() const = 0;
569
571 virtual const IAnnotation_definition* get_definition() const = 0;
572};
573
578class IAnnotation_block : public
579 mi::base::Interface_declare<0x57b0ae97,0x0815,0x41e8,0x89,0xe7,0x16,0xa1,0x23,0x86,0x80,0x6e>
580{
581public:
583 virtual Size get_size() const = 0;
584
586 virtual const IAnnotation* get_annotation( Size index) const = 0;
587
594 virtual Sint32 set_annotation( Size index, const IAnnotation* annotation) = 0;
595
601 virtual Sint32 add_annotation( IAnnotation* annotation) = 0;
602};
603
608class IAnnotation_list : public
609 mi::base::Interface_declare<0x6c4663c2,0x112f,0x4eeb,0x81,0x60,0x41,0xa5,0xa6,0xfb,0x74,0x3c>
610{
611public:
613 virtual Size get_size() const = 0;
614
616 virtual Size get_index( const char* name) const = 0;
617
619 virtual const char* get_name( Size index) const = 0;
620
622 virtual const IAnnotation_block* get_annotation_block( Size index) const = 0;
623
625 virtual const IAnnotation_block* get_annotation_block( const char* name) const = 0;
626
633 virtual Sint32 set_annotation_block( Size index, const IAnnotation_block* block) = 0;
634
641 virtual Sint32 set_annotation_block( const char* name, const IAnnotation_block* block) = 0;
642
649 virtual Sint32 add_annotation_block( const char* name, const IAnnotation_block* block) = 0;
650};
651
659 mi::base::Interface_declare<0x9fd3b2d4,0xb5b8,0x4ccd,0x9b,0x5f,0x7b,0xd9,0x9d,0xeb,0x62,0x64>
660{
661public:
663
664
666 virtual IValue_factory* get_value_factory() const = 0;
667
669
671
676 virtual IExpression_constant* create_constant( IValue* value) const = 0;
677
682 virtual const IExpression_constant* create_constant( const IValue* value) const = 0;
683
688 virtual IExpression_call* create_call( const char* name) const = 0;
689
695 virtual IExpression_parameter* create_parameter( const IType* type, Size index) const = 0;
696
734 const char* name, IExpression_list* arguments, Sint32* errors = nullptr) const = 0;
735
741 virtual IExpression_temporary* create_temporary( const IType* type, Size index) const = 0;
742
745
747
749
754 const char* name, const IExpression_list* arguments) const = 0;
755
758
761
763
765
771 virtual IExpression* clone( const IExpression* expr) const = 0;
772
778 template <class T>
779 T* clone( const T* expr) const
780 {
781 IExpression* ptr_expr = clone( static_cast<const IExpression*>( expr));
782 if( !ptr_expr)
783 return 0;
784 T* ptr_T = static_cast<T*>( ptr_expr->get_interface( typename T::IID()));
785 ptr_expr->release();
786 return ptr_T;
787 }
788
793 virtual IExpression_list* clone( const IExpression_list* expression_list) const = 0;
794
796
798
817 // Undocumented, for alignment only
818 COMPARISON_OPTIONS_FORCE_32_BIT = 0xffffffffU
819 };
820
853 const IExpression* lhs,
854 const IExpression* rhs,
855 Uint32 flags = 0,
856 Float64 epsilon = 0.0) const = 0;
857
876 const IExpression_list* lhs,
877 const IExpression_list* rhs,
878 Uint32 flags = 0,
879 Float64 epsilon = 0.0) const = 0;
880
882
884
893 virtual const IString* dump(
894 const IExpression* expr, const char* name, Size depth = 0) const = 0;
895
905 virtual const IString* dump(
906 const IExpression_list* list, const char* name, Size depth = 0) const = 0;
907
909
911
921 virtual const IString* dump(
922 const IAnnotation* annotation, const char* name, Size depth = 0) const = 0;
923
933 virtual const IString* dump(
934 const IAnnotation_block* block, const char* name, Size depth = 0) const = 0;
935
945 virtual const IString* dump(
946 const IAnnotation_list* list, const char* name, Size depth = 0) const = 0;
947
949
951
983 IExpression* src_expr,
984 const IType* target_type,
985 const char* cast_db_name,
986 bool force_cast,
987 bool direct_call,
988 Sint32* errors = nullptr) const = 0;
989
990#ifdef MI_NEURAYLIB_DEPRECATED_15_0
991 inline IExpression* create_cast(
992 IExpression* src_expr,
993 const IType* target_type,
994 const char* cast_db_name,
995 bool force_cast,
996 Sint32* errors = 0) const
997 {
998 return create_cast(
999 src_expr, target_type, cast_db_name, force_cast, false, errors);
1000 }
1001#endif // MI_NEURAYLIB_DEPRECATED_15_0
1002
1034 IExpression* src_expr,
1035 const IType_struct* target_type,
1036 const char* cast_db_name,
1037 bool force_cast,
1038 bool direct_call,
1039 Sint32* errors = nullptr) const = 0;
1040
1042};
1043
1045 // end group mi_neuray_mdl_types
1047
1048} // namespace neuraylib
1049
1050} // namespace mi
1051
1052#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:580
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:416
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 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.
Semantics
All known semantics of annotation definitions.
Definition: iexpression.h:424
@ AS_VERSION_ANNOTATION
This is the version() annotation.
Definition: iexpression.h:444
@ AS_REMOVED_ANNOTATION
This is the internal removed() annotation.
Definition: iexpression.h:432
@ AS_DEPRECATED_ANNOTATION
This is the deprecated() annotation.
Definition: iexpression.h:442
@ AS_ENABLE_IF_ANNOTATION
This is the enable_if() annotation.
Definition: iexpression.h:448
@ AS_SOFT_RANGE_ANNOTATION
This is the soft_range() annotation.
Definition: iexpression.h:439
@ AS_SINCE_ANNOTATION
This is the internal since() annotation.
Definition: iexpression.h:431
@ AS_CONST_EXPR_ANNOTATION
This is the internal const_expr() annotation.
Definition: iexpression.h:433
@ AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION
This is the node_output_port_default() annotation.
Definition: iexpression.h:460
@ AS_KEYWORDS_ANNOTATION
This is the key_words() annotation.
Definition: iexpression.h:458
@ AS_ORIGIN_ANNOTATION
This is the origin() annotation.
Definition: iexpression.h:459
@ AS_NOINLINE_ANNOTATION
This is the noinline() annotation.
Definition: iexpression.h:438
@ AS_DISPLAY_NAME_ANNOTATION
This is the display_name() annotation.
Definition: iexpression.h:450
@ AS_THUMBNAIL_ANNOTATION
This is the thumbnail() annotation.
Definition: iexpression.h:449
@ AS_THROWS_ANNOTATION
This is the internal throws() annotation.
Definition: iexpression.h:430
@ AS_NATIVE_ANNOTATION
This is the internal native() annotation.
Definition: iexpression.h:435
@ AS_DERIVABLE_ANNOTATION
This is the internal derivable() annotation.
Definition: iexpression.h:434
@ AS_AUTHOR_ANNOTATION
This is the author() annotation.
Definition: iexpression.h:453
@ AS_UNUSED_ANNOTATION
This is the unused() annotation.
Definition: iexpression.h:437
@ AS_MODIFIED_ANNOTATION
This is the modified() annotation.
Definition: iexpression.h:457
@ AS_DEPENDENCY_ANNOTATION
This is the dependency() annotation.
Definition: iexpression.h:445
@ AS_HIDDEN_ANNOTATION
This is the hidden() annotation.
Definition: iexpression.h:441
@ AS_DESCRIPTION_ANNOTATION
This is the description() annotation.
Definition: iexpression.h:452
@ AS_INTRINSIC_ANNOTATION
This is the internal intrinsic() annotation.
Definition: iexpression.h:428
@ AS_HARD_RANGE_ANNOTATION
This is the hard_range() annotation.
Definition: iexpression.h:440
@ AS_VERSION_NUMBER_ANNOTATION
This is the (old) version_number() annotation.
Definition: iexpression.h:443
@ AS_USAGE_ANNOTATION
This is the usage() annotation.
Definition: iexpression.h:447
@ AS_CREATED_ANNOTATION
This is the created() annotation.
Definition: iexpression.h:456
@ AS_UI_ORDER_ANNOTATION
This is the ui_order() annotation.
Definition: iexpression.h:446
@ AS_COPYRIGHT_NOTICE_ANNOTATION
This is the copyright_notice() annotation.
Definition: iexpression.h:455
@ AS_IN_GROUP_ANNOTATION
This is the in_group() annotation.
Definition: iexpression.h:451
@ AS_CONTRIBUTOR_ANNOTATION
This is the contributor() annotation.
Definition: iexpression.h:454
@ AS_UNKNOWN
Unknown semantics.
Definition: iexpression.h:425
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:610
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:557
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:176
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:179
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:97
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:107
T * get_value()
Returns the value of the constant.
Definition: iexpression.h:122
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:100
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:242
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:245
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:660
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:779
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.
Comparison_options
Various options for the comparison of expressions or expression lists.
Definition: iexpression.h:802
@ DEFAULT_OPTIONS
Default comparison options.
Definition: iexpression.h:804
@ SKIP_TYPE_ALIASES
This option indicates that all type aliases should be skipped before types of expression are compared...
Definition: iexpression.h:816
@ DEEP_CALL_COMPARISONS
This option indicates that call expressions should be compared for equality, not for identity.
Definition: iexpression.h:811
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 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:319
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:349
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:370
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:218
static const Kind s_kind
The kind of this subclass.
Definition: iexpression.h:221
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:301
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:304
virtual Size get_index() const =0
Returns the index of the referenced temporary.
The interface to MDL expressions.
Definition: iexpression.h:51
const T * get_type() const
Returns the type of this expression.
Definition: iexpression.h:77
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
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:650
The type of kind struct.
Definition: itype.h:479
The interface to MDL types.
Definition: itype.h:154
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.
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: example_derivatives.dox:5
Major and minor version number and an optional qualifier.