neuray API Programmer's Manual

imdl_function_call.h File Reference

Description

Scene element IMdl_function_call.

Code Example

imdl_function_call.h

‎//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
//*****************************************************************************
//*****************************************************************************

#ifndef MI_NEURAYLIB_IMDL_FUNCTION_CALL_H
#define MI_NEURAYLIB_IMDL_FUNCTION_CALL_H

#include <mi/neuraylib/iattachable.h>
#include <mi/neuraylib/iscene_element.h>
#include <mi/neuraylib/version.h>

namespace mi {

namespace neuraylib {

class IAttribute_container;

class IMdl_function_call : public
    mi::base::Interface_declare<0x308bcfb7,0x6abc,0x44cd,0xb2,0xdc,0x0c,0x88,0x44,0x0f,0x9e,0x32,
                                neuraylib::IScene_element>
{
public:
    virtual const char* get_function_definition() const = 0;

    virtual const char* get_name() const = 0;

    virtual const char* get_return_type() const = 0;

    virtual bool is_return_type_varying() const = 0;

    virtual Uint32 
               get_parameter_count() const = 0;

    virtual const char* get_parameter_name( Uint32 index) const = 0;

    virtual Sint32 
               get_parameter_index( const char* name) const = 0;

    virtual const char* get_parameter_type( Uint32 index) const = 0;

    virtual const char* get_parameter_type( const char* name) const = 0;

    virtual bool is_parameter_type_uniform( Uint32 index) const = 0;

    virtual bool is_parameter_type_uniform( const char* name) const = 0;

    virtual const char* get_argument_type( Uint32 index) const = 0;

    virtual const char* get_argument_type( const char* name) const = 0;

    virtual const IAttachable* get_argument( Uint32 index) const = 0;

    template<class T>
    const T* get_argument( Uint32 index) const
    {
        const IAttachable* ptr_idata = get_argument( index);
        if ( !ptr_idata)
            return 0;
        const T* ptr_T = static_cast<const T*>( ptr_idata->get_interface( typename T::IID()));
        ptr_idata->release();
        return ptr_T;
    }

    virtual const IAttachable* get_argument( const char* name) const = 0;

    template<class T>
    const T* get_argument( const char* name) const
    {
        const IAttachable* ptr_idata = get_argument( name);
        if ( !ptr_idata)
            return 0;
        const T* ptr_T = static_cast<const T*>( ptr_idata->get_interface( typename T::IID()));
        ptr_idata->release();
        return ptr_T;
    }

    virtual Sint32 
               set_argument( Uint32 index, const IAttachable* value) = 0;

    virtual Sint32 
               set_argument( const char* name, const IAttachable* value) = 0;

    virtual const IAttribute_container* access_arguments() const = 0;

    virtual Sint32 
               set_arguments( const IAttribute_container* arguments) = 0;
};
 // end group mi_neuray_materials

} // namespace neuraylib

#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
using neuraylib::IAttribute_container;
using neuraylib::IMdl_function_call;
using neuraylib::IScene_element;
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION

} // namespace mi

#endif // MI_NEURAYLIB_IMDL_FUNCTION_CALL

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...

Classes

class 
This interface represents a function call. More...