Crate cpp_utils

source ·
Expand description

Various C++-related types and functions needed for the cpp_to_rust project.

Modules

This module contains NewUninitialized trait. It’s an implementation detail of cpp_to_rust and should not be used directly.

Structs

A C++ pointer wrapper to manage deletion of objects.

Traits

Indicates that the type can be put into a CppBox.
Provides access to C++ dynamic_cast conversion.
Provides access to C++ static_cast conversion from derived class to base class.
Provides access to C++ static_cast conversion from base class to derived class.

Functions

Converts type of a const pointer using DynamicCast implementation of the type. ptr must be either a null pointer or a valid pointer to an instance of T class or a class derived from T. Returns null pointer if ptr does not point to an instance of R or an instance of a class derived from R. If ptr is null, this function does nothing and returns null pointer.
Converts type of a mutable pointer using DynamicCast implementation of the type. ptr must be either a null pointer or a valid pointer to an instance of T class or a class derived from T. Returns null pointer if ptr does not point to an instance of R. If ptr is null, this function does nothing and returns null pointer.
Converts type of a const pointer using StaticCast implementation of the type. If ptr is null, this function does nothing and returns null pointer.
Converts type of a mutable pointer using StaticCast implementation of the type. If ptr is null, this function does nothing and returns null pointer.
Converts type of a const pointer using UnsafeStaticCast implementation of the type. ptr must be either a null pointer or a valid pointer to an instance of R class or a class derived from R. If ptr is null, this function does nothing and returns null pointer.
Converts type of a mutable pointer using UnsafeStaticCast implementation of the type. ptr must be either a null pointer or a valid pointer to an instance of R class or a class derived from R. If ptr is null, this function does nothing and returns null pointer.

Type Definitions

Deleter function type.