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)
183 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
195 return expr_list->get_size();
201 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
213 if (expr_list->get_size() <= param_index)
216 return expr_list->get_name(param_index);
222 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
234 if (expr_list->get_size() <= param_index)
241 return expr->get_type();
247 if (!m_anno_block || m_anno_block->
get_size() <= anno_index)
259 if (expr_list->get_size() <= param_index)
271 return c->get_value();
275 const char* anno_name,
mi::Size param_index)
const
278 if (anno_index ==
static_cast<mi::Size>(-1))
289 anno_index, param_index));
298 const char* anno_name,
mi::Size param_index, T& value)
const
301 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:198
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:219
mi::Size get_annotation_param_count(mi::Size anno_index) const
Get the number of parameters of an annotation.
Definition: annotation_wrapper.h:181
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:274
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:244
An annotation block is an array of annotations.
Definition: iexpression.h:575
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.
A constant expression.
Definition: iexpression.h:96
The interface to MDL types.
Definition: itype.h:151
The interface to MDL values.
Definition: ivalue.h:33
Handle<Interface> make_handle_dup(Interface *iptr)
Converts passed-in interface pointer to a handle, without taking interface over.
Definition: handle.h:439
Handle<New_interface> get_interface() const
Returns a new handle for a possibly different interface type, similar to a dynamic cast,...
Definition: handle.h:353
Interface * get() const
Access to the interface. Returns 0 for an invalid interface.
Definition: handle.h:294
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
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:1254
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.