MDL SDK API nvidia_logo_transpbg.gif Up
imodule.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2022 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
681
689class IModule : public
690 mi::base::Interface_declare<0xe283b0ee,0x712b,0x4bdb,0xa2,0x13,0x32,0x77,0x7a,0x98,0xf9,0xa6,
691 neuraylib::IScene_element>
692{
693public:
698 virtual const char* get_filename() const = 0;
699
706 virtual const char* get_mdl_name() const = 0;
707
710
715 virtual const char* get_mdl_package_component_name( Size index) const = 0;
716
723 virtual const char* get_mdl_simple_name() const = 0;
724
726 virtual Mdl_version get_mdl_version() const = 0;
727
729 virtual Size get_import_count() const = 0;
730
735 virtual const char* get_import( Size index) const = 0;
736
738 virtual const IType_list* get_types() const = 0;
739
741 virtual const IValue_list* get_constants() const = 0;
742
744 virtual Size get_function_count() const = 0;
745
752 virtual const char* get_function( Size index) const = 0;
753
755 virtual Size get_material_count() const = 0;
756
763 virtual const char* get_material( Size index) const = 0;
764
768 virtual Size get_resources_count() const = 0;
769
773 virtual const IValue_resource* get_resource( Size index) const = 0;
774
777
783 virtual const IAnnotation_definition* get_annotation_definition( Size index) const = 0;
784
789 virtual const IAnnotation_definition* get_annotation_definition( const char* name) const = 0;
790
792 virtual const IAnnotation_block* get_annotations() const = 0;
793
798 virtual bool is_standard_module() const = 0;
799
801 virtual bool is_mdle_module() const = 0;
802
818 const char* name, const IExpression_list* arguments = 0) const = 0;
819
847 const char* name, const IArray* parameter_types) const = 0;
848
853 virtual bool is_valid( IMdl_execution_context* context) const = 0;
854
866 virtual Sint32 reload( bool recursive, IMdl_execution_context* context) = 0;
867
883 const char* module_source,
884 bool recursive,
885 IMdl_execution_context* context) = 0;
886
887 virtual const IArray* deprecated_get_function_overloads(
888 const char* name, const char* param_sig) const = 0;
889
890#ifdef MI_NEURAYLIB_DEPRECATED_11_1
891 inline const IArray* get_function_overloads(
892 const char* name, const char* param_sig) const
893 {
894 return deprecated_get_function_overloads( name, param_sig);
895 }
896#endif
897
898 virtual const IType_resource* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(get_resource_type)(
899 Size index) const = 0;
900
901 virtual const char* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(get_resource_mdl_file_path)(
902 Size index) const = 0;
903
904 virtual const char* MI_NEURAYLIB_DEPRECATED_METHOD_12_1(get_resource_name)(
905 Size index) const = 0;
906};
907 // end group mi_neuray_mdl_elements
909
910} // namespace neuraylib
911
912} // namespace mi
913
914#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:468
An annotation definition.
Definition: iexpression.h:306
An ordered collection of expressions identified by name or index.
Definition: iexpression.h:239
The execution context can be used to query status information like error and warning messages concern...
Definition: imdl_execution_context.h:126
This interface represents an MDL module.
Definition: imodule.h:692
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:542
A string valued resource type.
Definition: itype.h:441
An ordered collection of values identified by name or index.
Definition: ivalue.h:585
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:110
signed int Sint32
32-bit signed integer.
Definition: types.h:44
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.