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
12
13namespace mi {
14
15class IArray;
16
17namespace neuraylib {
18
19class IAnnotation_block;
20class IAnnotation_definition;
21class IExpression_list;
22class IMdl_execution_context;
23class IType_list;
24class IType_resource;
25class IValue_list;
26class IValue_resource;
27 // end group mi_neuray_mdl_elements
623
631class IModule : public
632 mi::base::Interface_declare<0xe283b0ee,0x712b,0x4bdb,0xa2,0x13,0x32,0x77,0x7a,0x98,0xf9,0xa6,
633 neuraylib::IScene_element>
634{
635public:
640 virtual const char* get_filename() const = 0;
641
648 virtual const char* get_mdl_name() const = 0;
649
652
657 virtual const char* get_mdl_package_component_name( Size index) const = 0;
658
665 virtual const char* get_mdl_simple_name() const = 0;
666
668 virtual Mdl_version get_mdl_version() const = 0;
669
671 virtual Size get_import_count() const = 0;
672
677 virtual const char* get_import( Size index) const = 0;
678
681
683 virtual const IType_list* get_types() const = 0;
684
686 virtual const IValue_list* get_constants() const = 0;
687
689 virtual Size get_function_count() const = 0;
690
697 virtual const char* get_function( Size index) const = 0;
698
700 virtual Size get_material_count() const = 0;
701
708 virtual const char* get_material( Size index) const = 0;
709
713 virtual Size get_resources_count() const = 0;
714
718 virtual const IValue_resource* get_resource( Size index) const = 0;
719
722
728 virtual const IAnnotation_definition* get_annotation_definition( Size index) const = 0;
729
734 virtual const IAnnotation_definition* get_annotation_definition( const char* name) const = 0;
735
737 virtual const IAnnotation_block* get_annotations() const = 0;
738
743 virtual bool is_standard_module() const = 0;
744
746 virtual bool is_mdle_module() const = 0;
747
763 const char* name, const IExpression_list* arguments = 0) const = 0;
764
793 const char* name, const IArray* parameter_types) const = 0;
794
799 virtual bool is_valid( IMdl_execution_context* context) const = 0;
800
812 virtual Sint32 reload( bool recursive, IMdl_execution_context* context) = 0;
813
828 const char* module_source,
829 bool recursive,
830 IMdl_execution_context* context) = 0;
831};
832 // end group mi_neuray_mdl_elements
834
835} // namespace neuraylib
836
837} // namespace mi
838
839#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:575
An annotation definition.
Definition: iexpression.h:411
An ordered collection of expressions identified by name or index.
Definition: iexpression.h:317
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:634
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 IStruct_category_list * get_struct_categories() const =0
Returns the struct categories exported by this module.
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 struct categories identified by name or index.
Definition: itype.h:79
An ordered collection of types identified by name or index.
Definition: itype.h:646
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:28
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