neuray API Programmer's Manual

mi::neuraylib::IAnnotation_definition Class Reference

[MDL type system]

Description

An annotation definition.

Public Enumerations

enum Semantics{ AS_UNKNOWN = 0, AS_INTRINSIC_ANNOTATION = 0x0100, AS_ANNOTATION_FIRST = AS_INTRINSIC_ANNOTATION, AS_THROWS_ANNOTATION, AS_SINCE_ANNOTATION, AS_REMOVED_ANNOTATION, AS_CONST_EXPR_ANNOTATION, AS_DERIVABLE_ANNOTATION, AS_NATIVE_ANNOTATION, AS_UNUSED_ANNOTATION, AS_NOINLINE_ANNOTATION, AS_SOFT_RANGE_ANNOTATION, AS_HARD_RANGE_ANNOTATION, AS_HIDDEN_ANNOTATION, AS_DEPRECATED_ANNOTATION, AS_VERSION_NUMBER_ANNOTATION, AS_VERSION_ANNOTATION, AS_DEPENDENCY_ANNOTATION, AS_UI_ORDER_ANNOTATION, AS_USAGE_ANNOTATION, AS_ENABLE_IF_ANNOTATION, AS_THUMBNAIL_ANNOTATION, AS_DISPLAY_NAME_ANNOTATION, AS_IN_GROUP_ANNOTATION, AS_DESCRIPTION_ANNOTATION, AS_AUTHOR_ANNOTATION, AS_CONTRIBUTOR_ANNOTATION, AS_COPYRIGHT_NOTICE_ANNOTATION, AS_CREATED_ANNOTATION, AS_MODIFIED_ANNOTATION, AS_KEYWORDS_ANNOTATION, AS_ORIGIN_ANNOTATION, AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION, AS_ANNOTATION_LAST = AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION, AS_FORCE_32_BIT = 0xffffffffU}
All known semantics of annotation definitions. More...

Public Member Functions

virtual const IAnnotationcreate_annotation( const IExpression_list* arguments) const =0
Creates an annotation. More...
virtual const IAnnotation_blockget_annotations() const =0
Returns the annotations of this definition or NULL if no annotations exist.
virtual const IExpression_listget_defaults() const =0
Returns the parameter defaults of the annotation definition.
virtual const char* get_mdl_module_name() const =0
Returns the MDL name of the module containing this annotation definition.
virtual const char* get_mdl_parameter_type_name( Size index) const =0
Returns the type name of the parameter at index. More...
virtual const char* get_mdl_simple_name() const =0
Returns the simple MDL name of the annotation definition. More...
virtual void get_mdl_version( Mdl_version& since, Mdl_version& removed) const =0
Returns the MDL version when this annotation definition was added and removed. More...
virtual const char* get_module() const =0
Returns the DB name of the module containing this annotation definition. More...
virtual const char* get_name() const =0
Returns the MDL name of the annotation definition.
virtual Size get_parameter_count() const =0
Returns the parameter count of the annotation definition.
virtual Size get_parameter_index( const char* name) const =0
Returns the parameter index of the given name. More...
virtual const char* get_parameter_name( Size index) const =0
Returns the parameter name of the given index. More...
virtual const IType_listget_parameter_types() const =0
Returns the parameter types of the annotation definition.
virtual Semantics get_semantic() const =0
Returns the semantic of this annotation definition.
virtual bool  is_exported() const =0
Indicates whether the annotation definition is exported by its module.

Enums

enum mi::​neuraylib::​IAnnotation_definition::Semantics

All known semantics of annotation definitions.

Note:

Do not rely on the numeric values of the enumerators since they may change without further notice.

Enumerator:

AS_UNKNOWN = 0
Unknown semantics.
AS_INTRINSIC_ANNOTATION = 0x0100
This is the internal intrinsic() annotation.
AS_ANNOTATION_FIRST = AS_INTRINSIC_ANNOTATION
AS_THROWS_ANNOTATION
This is the internal throws() annotation.
AS_SINCE_ANNOTATION
This is the internal since() annotation.
AS_REMOVED_ANNOTATION
This is the internal removed() annotation.
AS_CONST_EXPR_ANNOTATION
This is the internal const_expr() annotation.
AS_DERIVABLE_ANNOTATION
This is the internal derivable() annotation.
AS_NATIVE_ANNOTATION
This is the internal native() annotation.
AS_UNUSED_ANNOTATION
This is the unused() annotation.
AS_NOINLINE_ANNOTATION
This is the noinline() annotation.
AS_SOFT_RANGE_ANNOTATION
This is the soft_range() annotation.
AS_HARD_RANGE_ANNOTATION
This is the hard_range() annotation.
AS_HIDDEN_ANNOTATION
This is the hidden() annotation.
AS_DEPRECATED_ANNOTATION
This is the deprecated() annotation.
AS_VERSION_NUMBER_ANNOTATION
This is the (old) version_number() annotation.
AS_VERSION_ANNOTATION
This is the version() annotation.
AS_DEPENDENCY_ANNOTATION
This is the dependency() annotation.
AS_UI_ORDER_ANNOTATION
This is the ui_order() annotation.
AS_USAGE_ANNOTATION
This is the usage() annotation.
AS_ENABLE_IF_ANNOTATION
This is the enable_if() annotation.
AS_THUMBNAIL_ANNOTATION
This is the thumbnail() annotation.
AS_DISPLAY_NAME_ANNOTATION
This is the display_name() annotation.
AS_IN_GROUP_ANNOTATION
This is the in_group() annotation.
AS_DESCRIPTION_ANNOTATION
This is the description() annotation.
AS_AUTHOR_ANNOTATION
This is the author() annotation.
AS_CONTRIBUTOR_ANNOTATION
This is the contributor() annotation.
AS_COPYRIGHT_NOTICE_ANNOTATION
This is the copyright_notice() annotation.
AS_CREATED_ANNOTATION
This is the created() annotation.
AS_MODIFIED_ANNOTATION
This is the modified() annotation.
AS_KEYWORDS_ANNOTATION
This is the key_words() annotation.
AS_ORIGIN_ANNOTATION
This is the origin() annotation.
AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION
This is the node_output_port_default() annotation.
AS_ANNOTATION_LAST = AS_NODE_OUTPUT_PORT_DEFAULT_ANNOTATION
AS_FORCE_32_BIT = 0xffffffffU

Member Functions

virtual const IAnnotation* mi::​neuraylib::​IAnnotation_definition::create_annotation( const IExpression_list* arguments) const [pure virtual]

Creates an annotation.

Parameters

arguments
The arguments for new annotation.

Returns

The created annotation or NULL if one of the arguments does not correspond to an actual parameter of the annotation or is not a constant expression.

virtual const IAnnotation_block* mi::​neuraylib::​IAnnotation_definition::get_annotations() const [pure virtual]

Returns the annotations of this definition or NULL if no annotations exist.

virtual const IExpression_list* mi::​neuraylib::​IAnnotation_definition::get_defaults() const [pure virtual]

Returns the parameter defaults of the annotation definition.

virtual const char* mi::​neuraylib::​IAnnotation_definition::get_mdl_module_name() const [pure virtual]

Returns the MDL name of the module containing this annotation definition.

virtual const char* mi::​neuraylib::​IAnnotation_definition::get_mdl_parameter_type_name( Size index) const [pure virtual]

Returns the type name of the parameter at index.

Note:

The type names provided here are substrings of the MDL name returned by get_name(). They are provided here such that parsing of the MDL name is not necessary. However, for most use cases it is strongly recommended to use get_parameter_types() instead.

Parameters

index
The index of the parameter.

Returns

The type name of the parameter, or NULL if index is out of range.

virtual const char* mi::​neuraylib::​IAnnotation_definition::get_mdl_simple_name() const [pure virtual]

Returns the simple MDL name of the annotation definition. The simple name is the last component of the MDL name, i.e., without any packages and scope qualifiers, and without the parameter type names.

Returns

The simple MDL name of the annotation definition.

virtual void mi::​neuraylib::​IAnnotation_definition::get_mdl_version( Mdl_version& since, Mdl_version& removed) const [pure virtual]

Returns the MDL version when this annotation definition was added and removed.

Parameters

since
The MDL version in which this annotation definition was added. If the annotation definition does not belong to the standard library, the MDL version of the corresponding module is returned.
removed
The MDL version in which this annotation definition was removed, or mi::neuraylib::MDL_VERSION_INVALID if the annotation has not been removed so far or does not belong to the standard library.
virtual const char* mi::​neuraylib::​IAnnotation_definition::get_module() const [pure virtual]

Returns the DB name of the module containing this annotation definition. The type of the module is mi::neuraylib::IModule.

virtual const char* mi::​neuraylib::​IAnnotation_definition::get_name() const [pure virtual]

Returns the MDL name of the annotation definition.

virtual Size mi::​neuraylib::​IAnnotation_definition::get_parameter_count() const [pure virtual]

Returns the parameter count of the annotation definition.

virtual Size mi::​neuraylib::​IAnnotation_definition::get_parameter_index( const char* name) const [pure virtual]

Returns the parameter index of the given name.

Parameters

name
The parameter name.

Returns

The index of the parameter or -1 if there is no parameter of that name .

virtual const char* mi::​neuraylib::​IAnnotation_definition::get_parameter_name( Size index) const [pure virtual]

Returns the parameter name of the given index.

Parameters

index
The parameter index.

Returns

The name of the parameter or NULL if index is out of range.

virtual const IType_list* mi::​neuraylib::​IAnnotation_definition::get_parameter_types() const [pure virtual]

Returns the parameter types of the annotation definition.

virtual Semantics mi::​neuraylib::​IAnnotation_definition::get_semantic() const [pure virtual]

Returns the semantic of this annotation definition.

virtual bool mi::​neuraylib::​IAnnotation_definition::is_exported() const [pure virtual]

Indicates whether the annotation definition is exported by its module.