7#ifndef MI_NEURAYLIB_ANNOTATION_WRAPPER_H
8#define MI_NEURAYLIB_ANNOTATION_WRAPPER_H
68 const char* anno_name,
105 const char* anno_name,
mi::Size param_index )
const;
131 const char* anno_name,
mi::Size param_index, T& value )
const;
156 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
164 return anno->get_name();
168 const char* anno_name,
171 if (!anno_name || !m_anno_block)
176 if (s && strcmp(anno_name, s) == 0)
185 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
197 return expr_list->get_size();
203 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
215 if (expr_list->get_size() <= param_index)
218 return expr_list->get_name(param_index);
224 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
236 if (expr_list->get_size() <= param_index)
243 return expr->get_type();
249 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
261 if (expr_list->get_size() <= param_index)
273 return c->get_value();
277 const char* anno_name,
mi::Size param_index)
const
280 if (anno_index ==
static_cast<mi::Size>(-1))
291 anno_index, param_index));
300 const char* anno_name,
mi::Size param_index, T& value)
const
303 anno_name, param_index));
A wrapper around the interfaces for MDL annotations.
Definition: annotation_wrapper.h:37
mi::Size get_annotation_count() const
Get the number of the annotations.
Definition: annotation_wrapper.h:146
mi::Size get_annotation_index(const char *anno_name, mi::Size offset=0) const
Get the index of an annotation based on its name for one of the annotations.
Definition: annotation_wrapper.h:167
const char * get_annotation_param_name(mi::Size anno_index, mi::Size param_index) const
Get the name of one of the parameters of one of the annotations.
Definition: annotation_wrapper.h:200
const IType * get_annotation_param_type(mi::Size anno_index, mi::Size param_index) const
Get the type of one of the parameters of one of the annotations.
Definition: annotation_wrapper.h:221
mi::Size get_annotation_param_count(mi::Size anno_index) const
Get the number of parameters of an annotation.
Definition: annotation_wrapper.h:183
Annotation_wrapper(const mi::neuraylib::IAnnotation_block *anno_block)
Constructs a helper that provides convenience methods for annotations.
Definition: annotation_wrapper.h:139
const char * get_annotation_name(mi::Size anno_index) const
Get the name of the annotation for one of the annotations.
Definition: annotation_wrapper.h:154
const IValue * get_annotation_param_value_by_name(const char *anno_name, mi::Size param_index) const
Get the value of one of the parameters of one of the annotations.
Definition: annotation_wrapper.h:276
const IValue * get_annotation_param_value(mi::Size anno_index, mi::Size param_index) const
Get the value of one of the parameters of one of the annotations.
Definition: annotation_wrapper.h:246
An annotation block is an array of annotations.
Definition: iexpression.h:576
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.
A constant expression.
Definition: iexpression.h:95
The interface to MDL types.
Definition: itype.h:153
The interface to MDL values.
Definition: ivalue.h:34
Handle<Interface> make_handle_dup(Interface *iptr)
Converts passed-in interface pointer to a handle, without taking interface over.
Definition: handle.h:434
Handle<New_interface> get_interface() const
Returns a new handle for a possibly different interface type, similar to a dynamic cast,...
Definition: handle.h:348
Interface * get() const
Access to the interface. Returns nullptr for an invalid interface.
Definition: handle.h:289
int Sint32
32-bit signed integer.
Definition: types.h:46
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:103
mi::Sint32 get_value(const mi::neuraylib::IValue *value, T &v)
Simplifies reading the value of mi::neuraylib::IValue into the corresponding classes from the base an...
Definition: ivalue.h:1253
Smart-pointer handle class for interfaces, const and non-const version.
Expressions of the MDL type system.
Scene element Function_call.
Scene element Material_instance.
API component that gives access to some MDL functionality.
Types of the MDL type system.
Values of the MDL type system.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Assertions and compile-time assertions.