MDL SDK API nvidia_logo_transpbg.gif Up
imodule.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMODULE_H
8#define MI_NEURAYLIB_IMODULE_H
9
13
14
15namespace mi {
16
17class IArray;
18
19namespace neuraylib {
20
21class IAnnotation_block;
22class IAnnotation_definition;
23class IExpression_list;
24class IMdl_execution_context;
25class IType_list;
26class IType_resource;
27class IValue_list;
28class IValue_resource;
29 // end group mi_neuray_mdl_elements
600
608class IModule : public
609 mi::base::Interface_declare<0xe283b0ee,0x712b,0x4bdb,0xa2,0x13,0x32,0x77,0x7a,0x98,0xf9,0xa6,
610 neuraylib::IScene_element>
611{
612public:
617 virtual const char* get_filename() const = 0;
618
625 virtual const char* get_mdl_name() const = 0;
626
629
634 virtual const char* get_mdl_package_component_name( Size index) const = 0;
635
642 virtual const char* get_mdl_simple_name() const = 0;
643
645 virtual Mdl_version get_mdl_version() const = 0;
646
648 virtual Size get_import_count() const = 0;
649
654 virtual const char* get_import( Size index) const = 0;
655
657 virtual const IType_list* get_types() const = 0;
658
660 virtual const IValue_list* get_constants() const = 0;
661
663 virtual Size get_function_count() const = 0;
664
671 virtual const char* get_function( Size index) const = 0;
672
674 virtual Size get_material_count() const = 0;
675
682 virtual const char* get_material( Size index) const = 0;
683
687 virtual Size get_resources_count() const = 0;
688
692 virtual const IValue_resource* get_resource( Size index) const = 0;
693
696
702 virtual const IAnnotation_definition* get_annotation_definition( Size index) const = 0;
703
708 virtual const IAnnotation_definition* get_annotation_definition( const char* name) const = 0;
709
711 virtual const IAnnotation_block* get_annotations() const = 0;
712
717 virtual bool is_standard_module() const = 0;
718
720 virtual bool is_mdle_module() const = 0;
721
737 const char* name, const IExpression_list* arguments = 0) const = 0;
738
766 const char* name, const IArray* parameter_types) const = 0;
767
772 virtual bool is_valid( IMdl_execution_context* context) const = 0;
773
785 virtual Sint32 reload( bool recursive, IMdl_execution_context* context) = 0;
786
801 const char* module_source,
802 bool recursive,
803 IMdl_execution_context* context) = 0;
804
805 virtual const IType_resource* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(get_resource_type)(
806 Size index) const = 0;
807
808 virtual const char* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(get_resource_mdl_file_path)(
809 Size index) const = 0;
810
811 virtual const char* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(get_resource_name)(
812 Size index) const = 0;
813};
814 // end group mi_neuray_mdl_elements
816
817} // namespace neuraylib
818
819} // namespace mi
820
821#endif // MI_NEURAYLIB_IMODULE_H
This interface represents static arrays, i.e., arrays with a fixed number of elements.
Definition: iarray.h:37
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
An annotation block is an array of annotations.
Definition: iexpression.h:573
An annotation definition.
Definition: iexpression.h:409
An ordered collection of expressions identified by name or index.
Definition: iexpression.h:315
The execution context can be used to query status information like error and warning messages concern...
Definition: imdl_execution_context.h:131
This interface represents an MDL module.
Definition: imodule.h:611
virtual const IValue_resource * get_resource(Size index) const =0
Returns a resource defined in the module.
virtual Size get_function_count() const =0
Returns the number of function definitions exported by the module.
virtual const IAnnotation_block * get_annotations() const =0
Returns the annotations of the module, or NULL if there are no such annotations.
virtual const char * get_function(Size index) const =0
Returns the DB name of the function definition at index.
virtual const IArray * get_function_overloads(const char *name, const IArray *parameter_types) const =0
Returns overloads of a function or material definition.
virtual bool is_standard_module() const =0
Indicates whether this module is a standard module.
virtual Size get_annotation_definition_count() const =0
Returns the number of annotations defined in the module.
virtual const IArray * get_function_overloads(const char *name, const IExpression_list *arguments=0) const =0
Returns overloads of a function or material definition.
virtual Mdl_version get_mdl_version() const =0
Returns the MDL version of this module.
virtual Sint32 reload_from_string(const char *module_source, bool recursive, IMdl_execution_context *context)=0
Reload the module from string.
virtual const IValue_list * get_constants() const =0
Returns the constants exported by this module.
virtual const char * get_mdl_simple_name() const =0
Returns the simple MDL name of the module.
virtual bool is_valid(IMdl_execution_context *context) const =0
Returns true if all imports of the module are valid.
virtual const char * get_filename() const =0
Returns the name of the MDL source file from which this module was created.
virtual Size get_import_count() const =0
Returns the number of modules imported by the module.
virtual const IAnnotation_definition * get_annotation_definition(const char *name) const =0
Returns the annotation definition of the given name.
virtual const char * get_material(Size index) const =0
Returns the DB name of the material definition at index.
virtual const char * get_import(Size index) const =0
Returns the DB name of the imported module at index.
virtual const char * get_mdl_name() const =0
Returns the MDL name of the module.
virtual const IAnnotation_definition * get_annotation_definition(Size index) const =0
Returns the annotation definition at index.
virtual const char * get_mdl_package_component_name(Size index) const =0
Returns the name of a package component in the MDL name.
virtual Size get_material_count() const =0
Returns the number of material definitions exported by the module.
virtual Sint32 reload(bool recursive, IMdl_execution_context *context)=0
Reload the module from disk.
virtual bool is_mdle_module() const =0
Indicates whether this module results from an .mdle file.
virtual const IType_list * get_types() const =0
Returns the types exported by this module.
virtual Size get_resources_count() const =0
Returns the number of resources defined in the module.
virtual Size get_mdl_package_component_count() const =0
Returns the number of package components in the MDL name.
An ordered collection of types identified by name or index.
Definition: itype.h:540
A string valued resource type.
Definition: itype.h:439
An ordered collection of values identified by name or index.
Definition: ivalue.h:587
Base class for resource values.
Definition: ivalue.h:490
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mdl_version
The MDL version.
Definition: iexpression.h:27
Expressions of the MDL type system.
Base class for all scene elements.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Major and minor version number and an optional qualifier.