MDL SDK API nvidia_logo_transpbg.gif Up
iexpression.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 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
41 MDL_VERSION_INVALID = 0xffffffffU,
42 MDL_VERSION_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
43};
44
48class IExpression : public
49 mi::base::Interface_declare<0x0f4a7542,0x9b27,0x4924,0xbd,0x8d,0x82,0xe3,0xa9,0xa7,0xa9,0xd6>
50{
51public:
53 enum Kind {
64 // Undocumented, for alignment only.
65 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
87mi_static_assert( sizeof( IExpression::Kind) == sizeof( Uint32));
88
94 mi::base::Interface_declare<0x9da8d465,0x4058,0x46cb,0x83,0x6e,0x0e,0x38,0xa6,0x7f,0xcd,0xef,
95 neuraylib::IExpression>
96{
97public:
99 static const Kind s_kind = EK_CONSTANT;
100
102 virtual const IValue* get_value() const = 0;
103
105 template <class T>
106 const T* get_value() const
107 {
108 const IValue* ptr_value = get_value();
109 if( !ptr_value)
110 return 0;
111 const T* ptr_T = static_cast<const T*>( ptr_value->get_interface( typename T::IID()));
112 ptr_value->release();
113 return ptr_T;
114 }
115
117 virtual IValue* get_value() = 0;
118
120 template <class T>
122 {
123 IValue* ptr_value = get_value();
124 if( !ptr_value)
125 return 0;
126 T* ptr_T = static_cast<T*>( ptr_value->get_interface( typename T::IID()));
127 ptr_value->release();
128 return ptr_T;
129 }
130
137 virtual Sint32 set_value( IValue* value) = 0;
138};
139
172class IExpression_call : public
173 mi::base::Interface_declare<0xcf625aec,0x8eb8,0x4743,0x9f,0xf6,0x76,0x82,0x2c,0x02,0x54,0xa3,
174 neuraylib::IExpression>
175{
176public:
178 static const Kind s_kind = EK_CALL;
179
181 virtual const char* get_call() const = 0;
182
197 virtual Sint32 set_call( const char* name) = 0;
198};
199
215 mi::base::Interface_declare<0x206c4319,0x0b53,0x45a7,0x86,0x07,0x29,0x98,0xb3,0x44,0x7f,0xaa,
216 neuraylib::IExpression>
217{
218public:
220 static const Kind s_kind = EK_PARAMETER;
221
223 virtual Size get_index() const = 0;
224
226 virtual void set_index( Size index) = 0;
227};
228
239 mi::base::Interface_declare<0x9253c9d6,0xe162,0x4234,0xab,0x91,0x54,0xc1,0xe4,0x87,0x39,0x66,
240 neuraylib::IExpression>
241{
242public:
244 static const Kind s_kind = EK_DIRECT_CALL;
245
247 virtual const char* get_definition() const = 0;
248
250 virtual const IExpression_list* get_arguments() const = 0;
251};
252
297 mi::base::Interface_declare<0xd91f484b,0xdbf8,0x4585,0x9d,0xab,0xba,0xd9,0x91,0x7f,0xe1,0x4c,
298 neuraylib::IExpression>
299{
300public:
302 static const Kind s_kind = EK_TEMPORARY;
303
305 virtual Size get_index() const = 0;
306
308 virtual void set_index( Size index) = 0;
309};
310
315class IExpression_list : public
316 mi::base::Interface_declare<0x98ce8e89,0x9f23,0x45ec,0xa7,0xce,0x85,0x78,0x48,0x14,0x85,0x23>
317{
318public:
320 virtual Size get_size() const = 0;
321
323 virtual Size get_index( const char* name) const = 0;
324
326 virtual const char* get_name( Size index) const = 0;
327
336 virtual const IExpression* get_expression( Size index) const = 0;
337
346 template <class T>
347 const T* get_expression( Size index) const
348 {
349 const IExpression* ptr_expression = get_expression( index);
350 if( !ptr_expression)
351 return 0;
352 const T* ptr_T = static_cast<const T*>( ptr_expression->get_interface( typename T::IID()));
353 ptr_expression->release();
354 return ptr_T;
355 }
356
361 virtual const IExpression* get_expression( const char* name) const = 0;
362
367 template <class T>
368 const T* get_expression( const char* name) const
369 {
370 const IExpression* ptr_expression = get_expression( name);
371 if( !ptr_expression)
372 return 0;
373 const T* ptr_T = static_cast<const T*>( ptr_expression->get_interface( typename T::IID()));
374 ptr_expression->release();
375 return ptr_T;
376 }
377
387 virtual Sint32 set_expression( Size index, const IExpression* expression) = 0;
388
397 virtual Sint32 set_expression( const char* name, const IExpression* expression) = 0;
398
404 virtual Sint32 add_expression( const char* name, const IExpression* expression) = 0;
405};
406
410 mi::base::Interface_declare<0xa453318b,0xe056,0x4521,0x9f,0x3c,0x9d,0x5c,0x3,0x23,0x5f,0xb7>
411{
412public:
413
419 {
421
424 AS_ANNOTATION_FIRST = AS_INTRINSIC_ANNOTATION,
431
457
458 AS_ANNOTATION_LAST = AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION,
459 AS_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only.
460 };
461
465 virtual const char* get_module() const = 0;
466
468 virtual const char* get_name() const = 0;
469
471 virtual const char* get_mdl_module_name() const = 0;
472
479 virtual const char* get_mdl_simple_name() const = 0;
480
489 virtual const char* get_mdl_parameter_type_name( Size index) const = 0;
490
492 virtual Semantics get_semantic() const = 0;
493
495 virtual bool is_exported() const = 0;
496
505 virtual void get_mdl_version( Mdl_version& since, Mdl_version& removed) const = 0;
506
508 virtual Size get_parameter_count() const = 0;
509
515 virtual const char* get_parameter_name( Size index) const = 0;
516
522 virtual Size get_parameter_index( const char* name) const = 0;
523
525 virtual const IType_list* get_parameter_types() const = 0;
526
528 virtual const IExpression_list* get_defaults() const = 0;
529
532 virtual const IAnnotation_block* get_annotations() const = 0;
533
540 virtual const IAnnotation* create_annotation( const IExpression_list* arguments) const = 0;
541};
542
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
588 virtual Sint32 set_annotation( Size index, const IAnnotation* annotation) = 0;
589
594 virtual Sint32 add_annotation( IAnnotation* annotation) = 0;
595};
596
601class IAnnotation_list : public
602 mi::base::Interface_declare<0x6c4663c2,0x112f,0x4eeb,0x81,0x60,0x41,0xa5,0xa6,0xfb,0x74,0x3c>
603{
604public:
606 virtual Size get_size() const = 0;
607
609 virtual Size get_index( const char* name) const = 0;
610
612 virtual const char* get_name( Size index) const = 0;
613
615 virtual const IAnnotation_block* get_annotation_block( Size index) const = 0;
616
618 virtual const IAnnotation_block* get_annotation_block( const char* name) const = 0;
619
625 virtual Sint32 set_annotation_block( Size index, const IAnnotation_block* block) = 0;
626
632 virtual Sint32 set_annotation_block( const char* name, const IAnnotation_block* block) = 0;
633
639 virtual Sint32 add_annotation_block( const char* name, const IAnnotation_block* block) = 0;
640};
641
649 mi::base::Interface_declare<0x9fd3b2d4,0xb5b8,0x4ccd,0x9b,0x5f,0x7b,0xd9,0x9d,0xeb,0x62,0x64>
650{
651public:
653
654
656 virtual IValue_factory* get_value_factory() const = 0;
657
659
661
666 virtual IExpression_constant* create_constant( IValue* value) const = 0;
667
672 virtual const IExpression_constant* create_constant( const IValue* value) const = 0;
673
678 virtual IExpression_call* create_call( const char* name) const = 0;
679
685 virtual IExpression_parameter* create_parameter( const IType* type, Size index) const = 0;
686
724 const char* name, IExpression_list* arguments, Sint32* errors = 0) const = 0;
725
731 virtual IExpression_temporary* create_temporary( const IType* type, Size index) const = 0;
732
735
737
739
744 const char* name, const IExpression_list* arguments) const = 0;
745
748
751
753
755
761 virtual IExpression* clone( const IExpression* expr) const = 0;
762
768 template <class T>
769 T* clone( const T* expr) const
770 {
771 IExpression* ptr_expr = clone( static_cast<const IExpression*>( expr));
772 if( !ptr_expr)
773 return 0;
774 T* ptr_T = static_cast<T*>( ptr_expr->get_interface( typename T::IID()));
775 ptr_expr->release();
776 return ptr_T;
777 }
778
783 virtual IExpression_list* clone( const IExpression_list* expression_list) const = 0;
784
786
788
807 // Undocumented, for alignment only
808 COMPARISON_OPTIONS_FORCE_32_BIT = 0xffffffffU
809 };
810
843 const IExpression* lhs,
844 const IExpression* rhs,
845 Uint32 flags = 0,
846 Float64 epsilon = 0.0) const = 0;
847
866 const IExpression_list* lhs,
867 const IExpression_list* rhs,
868 Uint32 flags = 0,
869 Float64 epsilon = 0.0) const = 0;
870
872
874
883 virtual const IString* dump(
884 const IExpression* expr, const char* name, Size depth = 0) const = 0;
885
895 virtual const IString* dump(
896 const IExpression_list* list, const char* name, Size depth = 0) const = 0;
897
899
901
911 virtual const IString* dump(
912 const IAnnotation* annotation, const char* name, Size depth = 0) const = 0;
913
923 virtual const IString* dump(
924 const IAnnotation_block* block, const char* name, Size depth = 0) const = 0;
925
935 virtual const IString* dump(
936 const IAnnotation_list* list, const char* name, Size depth = 0) const = 0;
937
939
941
973 IExpression* src_expr,
974 const IType* target_type,
975 const char* cast_db_name,
976 bool force_cast,
977 bool direct_call,
978 Sint32* errors = 0) const = 0;
979
980#ifdef MI_NEURAYLIB_DEPRECATED_15_0
981 inline IExpression* create_cast(
982 IExpression* src_expr,
983 const IType* target_type,
984 const char* cast_db_name,
985 bool force_cast,
986 Sint32* errors = 0) const
987 {
988 return create_cast(
989 src_expr, target_type, cast_db_name, force_cast, false, errors);
990 }
991#endif // MI_NEURAYLIB_DEPRECATED_15_0
992
1024 IExpression* src_expr,
1025 const IType_struct* target_type,
1026 const char* cast_db_name,
1027 bool force_cast,
1028 bool direct_call,
1029 Sint32* errors = 0) const = 0;
1030
1032};
1033
1035 // end group mi_neuray_mdl_types
1037
1038} // namespace neuraylib
1039
1040} // namespace mi
1041
1042#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 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.