neuray API Programmer's Manual

idatabase.h File Reference

Description

API component that provides access to the database.

Code Example

idatabase.h

‎/***************************************************************************************************
 * Copyright 2023 NVIDIA Corporation. All rights reserved.
 **************************************************************************************************/

#ifndef MI_NEURAYLIB_IDATABASE_H
#define MI_NEURAYLIB_IDATABASE_H

#include <mi/base/interface_declare.h>

namespace mi {

namespace neuraylib {

class IScope;







class IDatabase : public
    mi::base::Interface_declare<0x814ae637,0xde35,0x4870,0x8e,0x5b,0x7e,0x28,0x9d,0x30,0xfb,0x82>
{
public:
    virtual IScope* get_global_scope() const = 0;

    virtual IScope* create_scope( IScope* parent, Uint8 privacy_level = 0, bool temp = false) = 0;

    virtual IScope* get_scope( const char* id) const = 0;

    virtual Sint32 
               remove_scope( const char* id) const = 0;

    virtual void lock( Uint32 lock_id) = 0;

    virtual Sint32 
               unlock( Uint32 lock_id) = 0;

    virtual IScope* create_or_get_named_scope(
        const char* name, IScope* parent = 0,  Uint8 privacy_level = 0) = 0;

    virtual IScope* get_named_scope( const char* name) const = 0;

    enum Garbage_collection_priority {

        PRIORITY_LOW = 0,

        PRIORITY_MEDIUM = 1,

        PRIORITY_HIGH = 2,

        //  Undocumented, for alignment only.
        PRIORITY_FORCE_32_BIT = 0xffffffffU
    };

    virtual void garbage_collection( Garbage_collection_priority priority = PRIORITY_MEDIUM) = 0;
};

mi_static_assert( sizeof( IDatabase::Garbage_collection_priority) == sizeof( Uint32));
 // end group mi_neuray_database_access

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_IDATABASE_H

Namespaces

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

Classes

class 
This interface is used to interact with the distributed database. More...