MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.expected_size_t_std_string Class Reference
Inheritance diagram for meshlib.expected_size_t_std_string:

Public Member Functions

 expected_size_t_std_string (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 expected_size_t_std_string ()
 expected_size_t_std_string (meshlib.expected_size_t_std_string other)
void assignFromAnother (meshlib.expected_size_t_std_string other)
boolean success ()
java.lang.Long value ()
meshlib.std_string error ()
java.lang.foreign.MemorySegment value_mut ()
meshlib.std_string error_mut ()
long valueOrThrow ()
Public Member Functions inherited from meshlib.CppObject
final java.lang.foreign.MemorySegment rawPointer ()
final boolean isOwned ()
final void close ()
final java.lang.foreign.MemorySegment release ()

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppObject
 CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner)

Detailed Description

Stores either a size_t that represents success or a std::string that represents an error.

Instances created here own their C++ objects, see CppObject.

Constructor & Destructor Documentation

◆ expected_size_t_std_string() [1/3]

meshlib.expected_size_t_std_string.expected_size_t_std_string ( java.lang.foreign.MemorySegment ptr,
boolean owned,
java.lang.Object owner )

Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.

◆ expected_size_t_std_string() [2/3]

meshlib.expected_size_t_std_string.expected_size_t_std_string ( )

Constructs an empty (default-constructed) instance.

Calls MR_expected_size_t_std_string_DefaultConstruct().

◆ expected_size_t_std_string() [3/3]

meshlib.expected_size_t_std_string.expected_size_t_std_string ( meshlib.expected_size_t_std_string other)

Constructs a copy of another instance. The source remains alive. The reference to the parameter other might be preserved in the constructed object.

Calls MR_expected_size_t_std_string_ConstructFromAnother().

Member Function Documentation

◆ assignFromAnother()

void meshlib.expected_size_t_std_string.assignFromAnother ( meshlib.expected_size_t_std_string other)

Assigns the contents from another instance. Both objects remain alive after the call. The reference to the parameter other might be preserved in this object.

Calls MR_expected_size_t_std_string_AssignFromAnother().

◆ error()

meshlib.std_string meshlib.expected_size_t_std_string.error ( )

If this instance represents an error, returns the stored std::string. Otherwise null. The reference to this object might be preserved as the return value.

Calls MR_expected_size_t_std_string_error().

◆ error_mut()

meshlib.std_string meshlib.expected_size_t_std_string.error_mut ( )

If this instance represents an error, returns the stored std::string. Otherwise null. This version returns a mutable pointer. The reference to this object might be preserved as the return value.

Calls MR_expected_size_t_std_string_error_mut().

◆ success()

boolean meshlib.expected_size_t_std_string.success ( )

Returns true if this instance represents success, or false if it represents an error.

Calls MR_expected_size_t_std_string_success().

◆ value()

java.lang.Long meshlib.expected_size_t_std_string.value ( )

If this instance represents success, returns the stored size_t. Otherwise null. The reference to this object might be preserved as the return value.

Calls MR_expected_size_t_std_string_value().

◆ value_mut()

java.lang.foreign.MemorySegment meshlib.expected_size_t_std_string.value_mut ( )

If this instance represents success, returns the stored size_t. Otherwise null. This version returns a mutable pointer. The reference to this object might be preserved as the return value.

Calls MR_expected_size_t_std_string_value_mut(). Some types are raw C types, see the C bindings for the details.

◆ valueOrThrow()

long meshlib.expected_size_t_std_string.valueOrThrow ( )

The value, or throws UnexpectedResultException with the error. The returned reference keeps this object alive. The wrappers of the functions returning this type do this automatically.


The documentation for this class was generated from the following file: