MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::UI::TestEngine::Entry Struct Reference

#include <MRUITestEngine.h>

Public Member Functions

MRVIEWER_API std::string_view getKindName () const
 Returns a string describing the type currently stored in value, which is T::kindName.
 
template<typename T >
Expected< T * > getAs (std::string_view selfName={})
 
template<typename T >
Expected< const T * > getAs (std::string_view selfName={}) const
 

Public Attributes

std::variant< ButtonEntry, ValueEntry, GroupEntryvalue
 
bool visitedOnThisFrame = false
 

Member Function Documentation

◆ getAs() [1/2]

template<typename T >
Expected< T * > MR::UI::TestEngine::Entry::getAs ( std::string_view selfName = {})
inlinenodiscard

Calls std::get<T>(value), returns a user-friendly error on failure. The returned pointer is never null. If selfName is specified, it's added to the error message as the name of this entry.

◆ getAs() [2/2]

template<typename T >
Expected< const T * > MR::UI::TestEngine::Entry::getAs ( std::string_view selfName = {}) const
inlinenodiscard

◆ getKindName()

MRVIEWER_API std::string_view MR::UI::TestEngine::Entry::getKindName ( ) const
nodiscard

Returns a string describing the type currently stored in value, which is T::kindName.

Member Data Documentation

◆ value

std::variant<ButtonEntry, ValueEntry, GroupEntry> MR::UI::TestEngine::Entry::value

◆ visitedOnThisFrame

bool MR::UI::TestEngine::Entry::visitedOnThisFrame = false

Mostly for internal use. If this is false, the entry will be removed on the next frame.


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