Functions#

void CARB_UNUSED(Args &&… args)

Portable way to mark unused variables as used.

carb::Framework * carb::acquireFramework(const char *appName, Version frameworkVersion=kFrameworkVersion)

Acquire the Carbonite framework for an application.

Framework * carb::acquireFrameworkAndRegisterBuiltins(const OmniCoreStartArgs *args=nullptr)

Main acquisition of the Carbonite Framework for Clients (applications and plugins).

Framework * carb::acquireFrameworkForBindings(const char *scriptLanguage)

Acquires the Carbonite Framework for a script binding.

InterfaceType * carb::acquireInterfaceForBindings(const char *pluginName=nullptr)

A helper function for Framework::tryAcquireInterface() that attempts to load plugins if not found.

InterfaceType * carb::acquireInterfaceFromLibraryForBindings(const char *libraryPath)

Helper for Framework::tryAcquireInterfaceFromLibrary() that throws on error.

void * carb::allocate(size_t size, size_t align=0) noexcept

Allocates a block of memory.

void carb::assert::deregisterAssertForClient() noexcept

Removes the global instance of the IAssert interface.

bool carb::assert::disableDialog(bool disable)

Disables the assertion failure dialog for the process.

uint64_t carb::assert::getFailureCount()

Retrieves the current assertion failure count for the calling process.

void carb::assert::registerAssertForClient() noexcept

Registers the IAssert implementation with the calling module.

bool carb::assert::showToConsole(bool enabled)

Sets whether a message should be printed out to the console on a failed assertion.

bool carb::assert::useBreakpoint(bool enabled)

Sets whether the software breakpoint for a failed assertion should be triggered.

bool carb::assertHandlerFallback(const char *condition, const char *file, const char *func, int32_t line, const char *fmt=nullptr,…)

Assertion handler helper function.

Type carb::assets::getAssetType()

Defines a template for users to specialize their asset type as unique identifiers.

bool carb::assets::operator!=(const carb::assets::ScopedSnapshot< Type > &a, const carb::assets::ScopedSnapshot< Type > &b)

ScopedSnapshot inequality operator

bool carb::assets::operator==(const carb::assets::ScopedSnapshot< Type > &a, const carb::assets::ScopedSnapshot< Type > &b)

ScopedSnapshot equality operator

ObjectPtr< T > carb::borrowObject(T *other)

Helper function to create carb::ObjectPtr from a carb::IObject pointer by "borrowing" the pointer; that is, by increasing the reference count.

const char * carb::carbGetSdkVersion()

Retrieves the Carbonite SDK version string,.

void carb::configureFramework(const StartupFrameworkDesc &params)

Configures the framework given a slew of input parameters.

bool carb::container::detail::operator!=(const RobinHood< LoadFactorMax100_1, Key, ValueType, KeyFromValue, Hasher1, Equals > &lhs, const RobinHood< LoadFactorMax100_2, Key, ValueType, KeyFromValue, Hasher2, Equals > &rhs)

Inequality operator.

bool carb::container::detail::operator==(const RobinHood< LoadFactorMax100_1, Key, ValueType, KeyFromValue, Hasher1, Equals > &lhs, const RobinHood< LoadFactorMax100_2, Key, ValueType, KeyFromValue, Hasher2, Equals > &rhs)

Equality operator.

void carb::container::detail::swap(RobinHood< LoadFactorMax100, Key, ValueType, KeyFromValue, Hasher, Equals > &lhs, RobinHood< LoadFactorMax100, Key, ValueType, KeyFromValue, Hasher, Equals > &rhs)

ADL swap function.

auto carb::cpp::as_bytes(span< T, N > s) noexcept

Obtains a view ot the object representation of the elements of the given span.

auto carb::cpp::as_writable_bytes(span< T, N > s) noexcept

Obtains a writable view to the object representation of the elements of the given span.

To carb::cpp::bit_cast(const From &src) noexcept

Re-interprets the bits src as type To .

constexpr T carb::cpp::bit_ceil(T val) noexcept

Finds the smallest integral power of two not less than the given value.

constexpr T carb::cpp::bit_floor(T val) noexcept

Finds the largest integral power of two not greater than the given value.

int carb::cpp::bit_width(T val) noexcept

Returns the number of bits needed to store val , or 0, if val is 0.

constexpr int carb::cpp::bit_width_constexpr(T val) noexcept

Returns the number of bits needed to store val , or 0, if val is 0.

T * carb::cpp::construct_at(T *place, TArgs &&… args) noexcept

Construct a T in place using the provided args .

int carb::cpp::countl_one(T val) noexcept

Returns the number of consecutive 1 bits in the value of val, starting from the most significant bit ("left").

constexpr int carb::cpp::countl_one_constexpr(T val) noexcept

Returns the number of consecutive 1 bits in the value of val, starting from the most significant bit ("left").

int carb::cpp::countl_zero(T val) noexcept

Returns the number of consecutive 0 bits in the value of val, starting from the most significant bit ("left").

constexpr int carb::cpp::countl_zero_constexpr(T val) noexcept

Returns the number of consecutive 0 bits in the value of val, starting from the most significant bit ("left").

int carb::cpp::countr_one(T val) noexcept

Returns the number of consecutive 1 bits in the value of val, starting from the least significant bit ("right").

constexpr int carb::cpp::countr_one_constexpr(T val) noexcept

Returns the number of consecutive 1 bits in the value of val, starting from the least significant bit ("right").

int carb::cpp::countr_zero(T val) noexcept

Returns the number of consecutive 0 bits in the value of val, starting from the least significant bit ("right").

constexpr int carb::cpp::countr_zero_constexpr(T val) noexcept

Returns the number of consecutive 0 bits in the value of val, starting from the least significant bit ("right").

constexpr auto carb::cpp::data(const C &c) -> decltype(c.data())

Returns a pointer to the block of memory containing the elements of the range.

constexpr auto carb::cpp::data(C &c) -> decltype(c.data())

Returns a pointer to the block of memory containing the elements of the range.

constexpr const E * carb::cpp::data(std::initializer_list< E > il) noexcept

Returns a pointer to the block of memory containing the elements of the range.

constexpr T * carb::cpp::data(T(&array)[N]) noexcept

Returns a pointer to the block of memory containing the elements of the range.

constexpr void carb::cpp::destroy_at(T(*array)[N]) noexcept

Call the destructor of all array elements.

constexpr std::enable_if_t<!std::is_array< T >::value > carb::cpp::destroy_at(T *const p) noexcept(std::is_nothrow_destructible< T >::value)

Call the destructor of p .

constexpr bool carb::cpp::has_single_bit(T val) noexcept

Checks if a given value is an integral power of 2.

constexpr invoke_result_t< Func, TArgs… > carb::cpp::invoke(Func &&f, TArgs &&… args) noexcept(is_nothrow_invocable< Func, TArgs… >::value)

Invoke the function f with the given args pack.

constexpr R carb::cpp::invoke_r(Func &&f, TArgs &&… args) noexcept(is_nothrow_invocable_r< R, Func, TArgs… >::value)

Invoke the function with the given arguments with the explicit return type R . This follows the same rules as carb::cpp::invoke() .

constexpr bool carb::cpp::operator!=(basic_string_view< CharT, Traits > a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator!=(const CharT *a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator!=(basic_string_view< CharT, Traits > a, const CharT *b)

Lexicographically compare two string views.

constexpr wstring_view carb::cpp::operator””_sv(const wchar_t *str, std::size_t len) noexcept

Creates a string view of a character array literal. noexcept

constexpr string_view carb::cpp::operator””_sv(const char *str, std::size_t len) noexcept

Creates a string view of a character array literal.

constexpr u16string_view carb::cpp::operator””_sv(const char16_t *str, std::size_t len) noexcept

Creates a string view of a character array literal. noexcept

constexpr u32string_view carb::cpp::operator””_sv(const char32_t *str, std::size_t len) noexcept

Creates a string view of a character array literal. noexcept

constexpr bool carb::cpp::operator<(basic_string_view< CharT, Traits > a, const CharT *b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator<(const CharT *a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator<(basic_string_view< CharT, Traits > a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator<=(basic_string_view< CharT, Traits > a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator<=(basic_string_view< CharT, Traits > a, const CharT *b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator<=(const CharT *a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator==(basic_string_view< CharT, Traits > a, const CharT *b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator==(const CharT *a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator==(basic_string_view< CharT, Traits > a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator>(const CharT *a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator>(basic_string_view< CharT, Traits > a, const CharT *b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator>(basic_string_view< CharT, Traits > a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator>=(basic_string_view< CharT, Traits > a, const CharT *b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator>=(const CharT *a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

constexpr bool carb::cpp::operator>=(basic_string_view< CharT, Traits > a, basic_string_view< CharT, Traits > b)

Lexicographically compare two string views.

int carb::cpp::popcount(T val) noexcept

Returns the number of 1 bits in the value of x.

constexpr int carb::cpp::popcount_constexpr(T val) noexcept

Returns the number of 1 bits in the value of x.

void carb::cpp::this_thread::sleep_for(const std::chrono::duration< Rep, Period > &delay)

Blocks the execution of the current thread for at least the specified duration.

void carb::cpp::this_thread::sleep_until(const std::chrono::time_point< Clock, Duration > &when)

Blocks the execution of the current thread until at least the specified time.

constexpr auto carb::cpp::to_address(const Ptr &p) noexcept

Fancy pointer overload: returns to_address(p.operator->()) .

constexpr T * carb::cpp::to_address(T *p) noexcept

Obtain the address represented by p without forming a reference to the object pointed to by p . Raw pointer overload: If T is a function type, the program is ill-formed. Otherwise, returns p unmodified.

bool carb::crashreporter::addCrashMetadata(const char *keyName, const char *value)

Adds a metadata value to the crash reporter.

bool carb::crashreporter::addCrashMetadata(const char *keyName, T value)

Adds a metadata value to the crash reporter.

bool carb::crashreporter::addExtraCrashFile(const char *keyName, const char *filename)

Adds an extra file to be uploaded when a crash occurs.

void carb::crashreporter::deregisterCrashReporterForClient()

Deregisters and disables the crash reporter for the calling process.

std::string carb::crashreporter::detail::sanitizeExtraCrashFileKey(const char *keyName)

Sanitizes a string to be usable as a key name in the settings registry.

std::string carb::crashreporter::getCommandLineArgsAsString()

Retrieves the process' command line as a string.

carb::cpp::optional< std::string > carb::crashreporter::getCrashMetadataString(const char *keyName)

Retrieves the value of a crash metadata value (if defined).

const char * carb::crashreporter::getCrashMetadataValue(const char *keyName)

Retrieves the value of a crash metadata value (if defined).

bool carb::crashreporter::isExtraCrashFileKeyUsed(const char *keyName)

Checks whether a key for an extra crash report file has already been used.

void carb::crashreporter::registerCrashReporterForClient()

Registers the crash reporter for this process and sets it up.

std::future< void > carb::crashreporter::sendAndRemoveLeftOverDumpsAsync()

Attempts to upload any crash dump files left by a previously crashed process.

int64_t carb::crashreporter::writeFileBlob(FileHandle file, const void *buffer, size_t bytes)

Writes a blob of data to an open file descriptor in a platform independent manner.

void carb::deallocate(void *p) noexcept

Deallocates a block of memory previously allocated with allocate() .

void carb::deleteHandler(T *ptr)

Default handler for carb::IObject reaching zero references, which calls delete .

auto carb::detail::getCarbErrorApiFunc() -> carb::ErrorApi const *(*)(carb::Version *)

Loads the function which loads the ErrorApi .

void carb::detail::loadPluginsFromConfig(settings::ISettings *settings, const PluginLoadingDesc &pluginLoadingDesc)

Loads plugins based on settings specified in the given settings object.

bool carb::detail::setClientName(const char *clientName)

Sets the client name for the calling module.

void carb::detail::setDefaultPluginsFromConfig(settings::ISettings *settings)

Sets carb::Framework 's "default" plugins from the given settings /defaultPlugins key.

Item * carb::dictionary::createDictionaryFromFile(ISerializer *serializer, const char *filename)

Attempts to read the contents of a file into a dictionary.

std::string carb::dictionary::dumpToString(const dictionary::Item *c, const char *serializerName=nullptr)

Writes a dictionary to a string.

IDictionary * carb::dictionary::getCachedDictionaryInterface()

helper function to retrieve the IDictionary interface.

const Item * carb::dictionary::getChildByIndex(IDictionary *dict, const Item *item, size_t idx)

Specialization for the getChildByIndex() callback that implements a simple retrieval of the requested child item using IDictionary::getItemChildByIndex() .

ItemPtrType * carb::dictionary::getChildByIndex(IDictionary *dict, ItemPtrType *item, size_t idx)

Prototype for a callback function used to walk children in a dictionary.

std::string carb::dictionary::getItemFullPath(dictionary::IDictionary *dict, const carb::dictionary::Item *item, bool includeRoot=true)

Retrieves the full path to dictionary item from its top-most ancestor.

std::vector< std::string > carb::dictionary::getStringArray(const IDictionary *dict, const Item *item)

Attempts to retrieve an array of string values from a given dictionary path.

std::vector< std::string > carb::dictionary::getStringArray(const IDictionary *dict, const Item *baseItem, const char *path)

Attempts to retrieve an array of string values from a given dictionary path.

std::string carb::dictionary::getStringFromItemName(const IDictionary *dict, const Item *baseItem, const char *path=nullptr)

Attempts to retrieve the name of an item from a given path in a dictionary.

std::string carb::dictionary::getStringFromItemValue(const IDictionary *dict, const Item *baseItem, const char *path=nullptr)

Attempts to retrieve the value of an item from a given path in a dictionary.

T carb::dictionary::getValueOrDefault(const Item *baseItem, const char *path, T defaultValue)

Gets a child value from a given Item if present, otherwise returns the given default value.

UpdateAction carb::dictionary::keepOriginal(const Item *dstItem, ItemType dstItemType, const Item *srcItem, ItemType srcItemType, void *userData)

Function that indicates that the merger should retain the existing destination item.

Item * carb::dictionary::makeStringArrayAtPath(Item *baseItem, const char *path, const std::vector< std::string > &arr)

Set a string array at the given path with the given array (creating it if it doesn't yet exist).

UpdateAction carb::dictionary::overwriteOriginal(const Item *dstItem, ItemType dstItemType, const Item *srcItem, ItemType srcItemType, void *userData)

Note that this function does not properly handle overwriting of arrays due to overwriting array being shorter, potentially leaving part of the older array in-place after the merge Use overwriteOriginalWithArrayHandling() if dictionaries are expected to contain array data.

UpdateAction carb::dictionary::overwriteOriginalWithArrayHandling(const Item *dstItem, ItemType dstItemType, const Item *srcItem, ItemType srcItemType, void *dictionaryInterface)

Helper function for IDictionary::update() that ensures arrays are properly overwritten.

void carb::dictionary::saveFileFromDictionary(ISerializer *serializer, const dictionary::Item *dictionary, const char *filename, SerializerOptions serializerOptions)

Writes the contents of a dictionary to a file.

void carb::dictionary::setDictionaryArrayElementFromStringValue(dictionary::IDictionary *dictionaryInterface, dictionary::Item *targetDictionary, const std::string &elementPath, const std::string &elementValue)

Parses a string representation of an array and sets it relative to a dictionary path.

void carb::dictionary::setDictionaryElementAutoType(IDictionary *id, Item *dict, const std::string &path, const std::string &value)

Attempts to set a value in a dictionary with an attempt to detect the value type.

void carb::dictionary::setDictionaryFromCmdLine(IDictionary *id, Item *dict, char **argv, int argc, const char *prefix="--/")

Parses a set of command line arguments for dictionary items arguments and sets them.

void carb::dictionary::setDictionaryFromStringMapping(IDictionary *id, Item *dict, const std::map< std::string, std::string > &mapping)

Sets a series of values in a dictionary based on keys and values in a map object.

void carb::dictionary::setStringArray(IDictionary *dict, Item *item, const std::vector< std::string > &stringArray)

Sets an array of values at a given path relative to a dictionary item.

void carb::dictionary::setStringArray(IDictionary *dict, Item *baseItem, const char *path, const std::vector< std::string > &stringArray)

Sets an array of values at a given path relative to a dictionary item.

ItemType carb::dictionary::toItemType()

Helper function to convert a data type to a corresponding dictionary item type.

ItemType carb::dictionary::toItemType< bool >()

Specialization for an bool item value.

ItemType carb::dictionary::toItemType< char * >()

Specialization for an char* item value.

ItemType carb::dictionary::toItemType< const char * >()

Specialization for an const char* item value.

ItemType carb::dictionary::toItemType< double >()

Specialization for an double item value.

ItemType carb::dictionary::toItemType< float >()

Specialization for an float item value.

ItemType carb::dictionary::toItemType< int32_t >()

Specialization for an int32_t item value.

ItemType carb::dictionary::toItemType< int64_t >()

Specialization for an int64_t item value.

void carb::dictionary::unsubscribeTreeFromAllEvents(IDictionary *dict, Item *item)

Unsubscribes all items in a dictionary tree from change notifications.

void carb::dictionary::walkDictionary(IDictionary *dict, WalkerMode walkerMode, ItemPtrType *root, ElementData rootElementData, OnItemFnType onItemFn, void *userData, GetChildByIndexFuncType getChildByIndexFunc=getChildByIndex< ItemPtrType >)

Walk a dictionary item to enumerate all of its values.

IMessageQueue::ExpectedType carb::eventdispatcher::popAllAndDispatch(IMessageQueue *p) noexcept

Pops all entries from a message queue and dispatches them.

ObjectPtr< ISubscription > carb::events::createSubscriptionToPop(IEventStream *stream, std::function< void(IEvent *)> onEventFn, Order order=kDefaultOrder, const char *subscriptionName=nullptr)

A helper for IEvents::createSubscriptionToPop() that creates a LambdaEventListener .

ObjectPtr< ISubscription > carb::events::createSubscriptionToPopByType(IEventStream *stream, EventType eventType, std::function< void(IEvent *)> onEventFn, Order order=kDefaultOrder, const char *subscriptionName=nullptr)

A helper for IEvents::createSubscriptionToPop() that creates a LambdaEventListener .

ObjectPtr< ISubscription > carb::events::createSubscriptionToPush(IEventStream *stream, std::function< void(IEvent *)> onEventFn, Order order=kDefaultOrder, const char *subscriptionName=nullptr)

A helper for IEvents::createSubscriptionToPush() that creates a LambdaEventListener .

ObjectPtr< ISubscription > carb::events::createSubscriptionToPushByType(IEventStream *stream, EventType eventType, std::function< void(IEvent *)> onEventFn, Order order=kDefaultOrder, const char *subscriptionName=nullptr)

A helper for IEvents::createSubscriptionToPush() that creates a LambdaEventListener .

IEvents * carb::events::getCachedEventsInterface()

Helper for carb::getCachedInterface<IEvents>() .

std::vector< ObjectPtr< ISubscription > > carb::events::getSubscriptionsToPop(IEventStream *stream)

A helper for IEventStream::walkSubscriptionsToPop() that gathers the subscriptions into a vector.

std::vector< ObjectPtr< ISubscription > > carb::events::getSubscriptionsToPush(IEventStream *stream)

A helper for IEventStream::walkSubscriptionsToPush() that gathers the subscriptions into a vector.

bool carb::events::registerEventAlias(EventType eventType, RString pushEvent, RString popEvent)

Registers an alias between an EventType and event name.

EventType carb::events::typeFromString(const char *str)

Run-time conversion of string to carb::events::EventType .

bool carb::events::unregisterEventAlias(EventType eventType, RString pushEvent, RString popEvent)

Unregisters an alias between an EventType and event name.

void carb::extras::adjustWindowsDllSearchPaths()

(Windows only) Sets the default DLL search directories for the application.

int32_t carb::extras::compareStrings(const char *str1, const char *str2)

Compare two strings in a case sensitive manner.

int32_t carb::extras::compareStringsNoCase(const char *str1, const char *str2)

Compare two strings in a case insensitive manner.

std::wstring carb::extras::convertCarboniteToWindowsPath(const std::string &path)

(Windows only) Converts a UTF-8 file path to Windows system file path.

std::string carb::extras::convertErrnoToMessage(ErrnoType errorCode)

Returns a human-readable string for a given errno value.

std::string carb::extras::convertUtf16StringToUtf8(const char16_t *str)

Convert a UTF-16 encoded string to UTF-8.

size_t carb::extras::convertUtf16StringToUtf8(const char16_t *str, char *out, size_t outLen)

Convert a UTF-16 encoded string to UTF-8.

std::string carb::extras::convertUtf16StringToUtf8(std::u16string str)

Convert a UTF-8 encoded string to UTF-32.

size_t carb::extras::convertUtf32StringToUtf8(const char32_t *str, char *out, size_t outLen)

Convert a UTF-32 encoded string to UTF-8.

std::string carb::extras::convertUtf32StringToUtf8(std::u32string str)

Convert a UTF-8 encoded string to UTF-32.

std::string carb::extras::convertUtf32StringToUtf8(const char32_t *str)

Convert a UTF-32 encoded string to UTF-8.

size_t carb::extras::convertUtf8StringToUtf16(const char *str, char16_t *out, size_t outLen) noexcept

Convert a UTF-8 encoded string to UTF-16.

std::u16string carb::extras::convertUtf8StringToUtf16(std::string str)

Convert a UTF-8 encoded string to UTF-16.

std::u16string carb::extras::convertUtf8StringToUtf16(const char *str)

Convert a UTF-8 encoded string to UTF-16.

std::u32string carb::extras::convertUtf8StringToUtf32(std::string str)

Convert a UTF-8 encoded string to UTF-32.

size_t carb::extras::convertUtf8StringToUtf32(const char *str, char32_t *out, size_t outLen) noexcept

Convert a UTF-8 encoded string to UTF-32.

std::u32string carb::extras::convertUtf8StringToUtf32(const char *str)

Convert a UTF-8 encoded string to UTF-32.

size_t carb::extras::convertUtf8StringToWide(const char *str, wchar_t *out, size_t outLen) noexcept

Convert a UTF-8 encoded string to wide string.

std::wstring carb::extras::convertUtf8StringToWide(std::string str)

Convert a UTF-8 encoded string to UTF-16.

std::wstring carb::extras::convertUtf8StringToWide(const char *str)

Convert a UTF-8 encoded string to wide.

std::string carb::extras::convertWideStringToUtf8(std::wstring str)

Convert a UTF-8 encoded string to UTF-16.

size_t carb::extras::convertWideStringToUtf8(const wchar_t *str, char *out, size_t outLen) noexcept

Convert a wide encoded string to UTF-8 string.

std::string carb::extras::convertWideStringToUtf8(const wchar_t *str)

Convert a UTF-8 encoded string to wide.

std::string carb::extras::convertWinApiErrorCodeToMessage(WinApiErrorType errorCode)

(Windows only) Converts a Win32 API error code into a human-readable string.

std::string carb::extras::convertWindowsToCarbonitePath(const std::wstring &pathW)

(Windows only) Converts Windows system file path to a UTF-8 file path.

size_t carb::extras::copyStringSafe(char *dstBuf, size_t dstBufSize, const char *srcString)

Copy a string with optional truncation.

size_t carb::extras::copyStringSafe(char *dstBuf, size_t dstBufSize, const char *srcString, size_t maxCharacterCount)

Copy slice of string with optional truncation.

std::string carb::extras::createLibraryNameForModule(carb::cpp::string_view baseName)

Creates a full library name from a module's base name.

size_t carb::extras::debugBacktrace(size_t skipFrames, void **array, size_t count) noexcept

Attempts to capture the callstack for the current thread.

void carb::extras::debugPrint(const char *fmt,…)

Prints a formatted string to debug output.

void carb::extras::debuggerBreak(void)

Performs a software breakpoint if a debugger is currently attached to this process.

std::wstring carb::extras::fixWindowsPathPrefix(const std::wstring &pathW)

(Windows only) Performs fixup on a Windows file path by adding or removing the long path prefix as necessary.

size_t carb::extras::formatString(char *dstBuf, size_t dstBufSize, const char *fmtString,…)

A snprintf wrapper that clamps the return value.

size_t carb::extras::formatStringV(char *dstBuf, size_t dstBufSize, const char *fmtString, va_list argsList)

A vsnprintf wrapper that clamps the return value.

void carb::extras::getAppPathAndName(const std::map< std::string, std::string > &stringMap, std::string &appPath, std::string &appName)

Determines application path and name.

size_t carb::extras::getCurrentProcessMemoryUsage()

Retrieve the physical memory usage by the current process.

constexpr const char * carb::extras::getDefaultLibraryExtension()

Retrieves the default library file extension for the current platform.

constexpr const char * carb::extras::getDefaultLibraryPrefix()

Retrieves the default library file prefix for the current platform.

const char * carb::extras::getDistroName()

Retrieves the platform distro name.

double carb::extras::getFriendlyMemorySize(size_t bytes, const char **suffix, MemoryScaleType scale=MemoryScaleType::eBinaryScale)

Retrieves a friendly memory size and scale suffix for a given number of bytes.

ErrnoType carb::extras::getLastErrno() noexcept

Returns the last value of errno.

std::string carb::extras::getLastErrnoMessage(ErrnoType *out=nullptr)

Reads the current value of errno and returns a human-readable string for the errno value.

std::string carb::extras::getLastLoadLibraryError()

Retrieves a string explaining the most recent library load failure cause.

WinApiErrorType carb::extras::getLastWinApiErrorCode() noexcept

Platform specific functions ///.

std::string carb::extras::getLastWinApiErrorMessage()

(Windows only) Reads the value of GetLastError() and converts it to a human-readable string.

std::string carb::extras::getLibraryDirectory(void *symbolAddress)

Retrieves the parent directory of the library containing a given address or symbol.

std::string carb::extras::getLibraryDirectoryByHandle(LibraryHandle handle)

Retrieves the parent directory of a library.

std::string carb::extras::getLibraryFilename(const void *symbolAddress)

Retrieves the path for a loaded library from an address or symbol within it.

std::string carb::extras::getLibraryFilenameByHandle(LibraryHandle handle)

Retrieves the path for a loaded library from its handle.

LibraryHandle carb::extras::getLibraryHandle(const void *symbolAddress)

Retrieves the handle for a loaded library from an address or symbol within it.

LibraryHandle carb::extras::getLibraryHandleByFilename(const char *libraryName, LibraryFlags flags=0)

Attempts to retrieve a library's handle by its filename.

T carb::extras::getLibrarySymbol(LibraryHandle libHandle, const char *name)

Attempts to retrieve the address of a symbol from a loaded module.

size_t carb::extras::getMemorySizeMultiplier(const char *str)

Retrieves the memory size multiplier from a value suffix.

size_t carb::extras::getMemoryValueByName(const char *filename, const char *name, size_t nameLen=0)

Retrieves a memory value by its key name in '/proc/meminfo' or other.

Path carb::extras::getPathExtension(std::string path)

Helper function to get a Path object representing the extension part of the provided string representation of a path.

Path carb::extras::getPathParent(std::string path)

Helper function to get a Path object representing parent directory for the provided string representation of a path.

Path carb::extras::getPathRelative(std::string path, std::string base)

Helper function to calculate a relative path from a provided path and a base path.

Path carb::extras::getPathStem(std::string path)

Helper function to get a Path object representing the stem part of the provided string representation of a path.

size_t carb::extras::getPeakProcessMemoryUsage()

Retrieves the peak memory usage information for the calling process.

size_t carb::extras::getPhysicalMemory(MemoryQueryType type)

Retrieve the physical memory available on the system.

std::string carb::extras::getStringFromMapOrEnvVar(const char *stringMapKey, const std::map< std::string, std::string > &stringMap, const char *envVarName)

Helper function that reads string value form the string map or the environment variable, if map doesn't hold such key.

bool carb::extras::getSystemMemoryInfo(SystemMemoryInfo &out)

Retrieves the memory usage information for the system.

std::wstring carb::extras::getWindowsCanonicalPath(const std::wstring &pathW)

(Windows only) Converts Windows path string into a canonical form.

std::wstring carb::extras::getWindowsFullPath(const std::wstring &pathW)

(Windows only) Retrieves the full path and file name of the specified file.

bool carb::extras::isCiEnvironment()

Checks if this process is running under a CI system such as TeamCity or GitLab.

bool carb::extras::isDebuggerAttached(void)

Checks if a debugger is attached to the calling process.

bool carb::extras::isMemoryOverlap(const void *ptr1, size_t size1, const void *ptr2, size_t size2)

Check if two memory regions overlaps.

bool carb::extras::isRunningOnCentos()

Checks whether the calling process is running on CentOS.

bool carb::extras::isRunningOnUbuntu()

Checks whether the calling process is running on Ubuntu.

bool carb::extras::isStringPrefix(const char *str, const char *prefix)

Test if one string is a prefix of the other.

bool carb::extras::isTestEnvironment()

Queries whether the calling process is the Carbonite unit tests.

LibraryHandle carb::extras::loadLibrary(const char *libraryName, LibraryFlags flags=0)

Attempts to load a named library into the calling process.

bool carb::extras::operator!=(std::nullptr_t, const HandleRef< Mapped, Handle, Allocator > &ref)

Tests inequality between HandleRef and nullptr .

bool carb::extras::operator!=(const HandleRef< Mapped, Handle, Allocator > &ref, std::nullptr_t)

Tests inequality between HandleRef and nullptr .

bool carb::extras::operator!=(const std::string &left, const Path &right)

Inequality operator.

bool carb::extras::operator!=(const char *left, const Path &right)

Inequality operator.

Path carb::extras::operator+(const omni::string &left, const Path &right)

Concatenation operator.

Path carb::extras::operator+(const std::string &left, const Path &right)

Concatenation operator.

Path carb::extras::operator+(const Path &left, const std::string &right)

Concatenation operator.

Path carb::extras::operator+(const char *left, const Path &right)

Concatenation operator.

Path carb::extras::operator+(const Path &left, const char *right)

Concatenation operator.

Path carb::extras::operator+(const Path &left, const Path &right)

Concatenation operator.

Path carb::extras::operator+(const Path &left, const omni::string &right)

Concatenation operator.

Path carb::extras::operator/(const Path &left, const Path &right)

Join operator.

bool carb::extras::operator==(const std::string &left, const Path &right)

Equality operator.

bool carb::extras::operator==(const HandleRef< Mapped, Handle, Allocator > &ref, std::nullptr_t)

Tests equality between HandleRef and nullptr .

bool carb::extras::operator==(const char *left, const Path &right)

Equality operator.

bool carb::extras::operator==(std::nullptr_t, const HandleRef< Mapped, Handle, Allocator > &ref)

Tests equality between HandleRef and nullptr .

void carb::extras::registerPathAlias(const char *alias, const char *value)

Registers a new path string alias for replacement with resolvePathAliases() .

std::string carb::extras::resolvePathAliases(const char *srcBuf)

Replaces path alias markers in a path with the full names.

void carb::extras::unloadLibrary(LibraryHandle libraryHandle)

Unloads a loaded library.

void carb::extras::unregisterPathAlias(const char *alias)

Unregisters a path string alias.

void carb::extras::withFormatNV(const char *fmt, va_list ap, Callable &&c) noexcept

Formats as with vsnprintf() and calls a Callable with the result and the size.

void carb::extras::withFormatV(const char *fmt, va_list ap, Callable &&c)

Formats as with vsnprintf() and calls a Callable with the result.

bool carb::filesystem::findFiles(const FindFilesArgs &args)

Finds files in a given list of search paths matching a given list of patterns.

bool carb::findPlugins(const FindPluginsArgs &inArgs) noexcept

Helper function to find plugins in a given list of search paths.

constexpr uint64_t carb::fnv1aHash(const char *str, std::size_t n, uint64_t hash=kFnvBasis)

Compile-time FNV-1a 64-bit hash, use with CARB_HASH_STRING macro.

constexpr Version carb::fromHexVersion(uint32_t hexver) noexcept

Converts a hex-version to a Version struct.

InterfaceT * carb::getCachedInterface()

Retrieves the specified interface as if from Framework::tryAcquireInterface() and caches it for fast retrieval.

InterfaceType * carb::getCachedInterfaceForBindings()

A helper function for carb::getCachedInterface() that throws on error.

Framework * carb::getFramework()

Gets the Carbonite framework.

uint64_t carb::hashBuffer(const void *buffer, size_t length, uint64_t hash=kFnvBasis)

Runtime FNV-1a 64-bit byte hash.

constexpr uint64_t carb::hashCombine(uint64_t hash1, uint64_t hash2) noexcept

Combines two hashes producing better collision avoidance than XOR.

uint64_t carb::hashLowercaseBuffer(const void *buffer, size_t len, uint64_t hash=kFnvBasis)

Runtime FNV-1a 64-bit lower-case byte hash (as if the bytes had been converted using tolower() ).

uint64_t carb::hashLowercaseString(const char *str, uint64_t hash=kFnvBasis)

Runtime FNV-1a 64-bit lower-case string hash (as if the string had been converted using tolower() ).

size_t carb::hashPair(T1 t1, T2 t2)

A helper function for combining two hash values.

constexpr uint64_t carb::hashScalar(const T &type, uint64_t hash=kFnvBasis)

Runtime FNV-1a 64-bit hash of a scalar type.

uint64_t carb::hashString(const char *str, uint64_t hash=kFnvBasis)

Runtime FNV-1a 64-bit string hash.

uint64_t carb::hashUppercaseBuffer(const void *buffer, size_t len, uint64_t hash=kFnvBasis)

Runtime FNV-1a 64-bit upper-case byte hash (as if the bytes had been converted using toupper() ).

uint64_t carb::hashUppercaseString(const char *str, uint64_t hash=kFnvBasis)

Runtime FNV-1a 64-bit upper-case string hash (as if the string had been converted using toupper() ).

void carb::input::filterBufferedEvents(IInput *input, Callable &&callable)

Filter and modify input events in the event buffer.

ActionMappingDesc carb::input::getActionMappingDescFromString(const char *hotkeyString, std::string *deviceId)

Translates a hot-key string to a ActionMappingDesc .

bool carb::input::getDeviceInputFromString(const char *deviceInputString, DeviceType *deviceTypeOut, KeyboardInput *keyboardInputOut, MouseInput *mouseInputOut, GamepadInput *gamepadInputOut, std::string *deviceIdOut=nullptr)

Parses components from a device input string.

std::string carb::input::getDeviceNameString(DeviceType deviceType, const char *deviceId)

Returns a device name.

DeviceType carb::input::getDeviceTypeFromString(const char *deviceTypeString)

Converts a device-type string to a DeviceType .

const char * carb::input::getDeviceTypeString(DeviceType deviceType)

Returns a string representation of the device type.

GamepadInput carb::input::getGamepadInputFromString(const char *inputString)

Converts a gamepad input string to a GamepadInput .

const char * carb::input::getGamepadInputString(GamepadInput key)

Returns a string representation of a gamepad input enum value.

KeyboardInput carb::input::getKeyboardInputFromString(const char *inputString)

Converts a keyboard input string to a KeyboardInput .

const char * carb::input::getKeyboardInputString(KeyboardInput key)

Returns a string representation of the keyboard input.

KeyboardModifierFlags carb::input::getModifierFlagFromString(const char *inputString)

Converts a keyboard modifier flag string to a KeyboardModifierFlags .

const char * carb::input::getModifierFlagString(KeyboardModifierFlags flag)

Returns a string representation of the keyboard modifier flag.

KeyboardModifierFlags carb::input::getModifierFlagsFromString(const char *modString)

Returns KeyboardModifierFlags composed of all the flags from a given string.

std::string carb::input::getModifierFlagsString(KeyboardModifierFlags mod)

Returns a string of all modifier flags present.

MouseInput carb::input::getMouseInputFromString(const char *inputString)

Converts a mouse input string to a MouseInput .

const char * carb::input::getMouseInputString(MouseInput key)

Returns a string representation of a mouse input enum value.

std::string carb::input::getStringFromActionMappingDesc(const ActionMappingDesc &actionMappingDesc, const char *deviceName=nullptr)

Builds a hot-key string from a ActionMappingDesc .

void carb::input::parseDeviceNameString(const char *deviceName, DeviceType *deviceType, std::string *deviceId)

Separates a device name into a device type and device ID.

bool carb::input::setDefaultActionMapping(IInput *input, ActionMappingSetHandle actionMappingSet, const char *actionName, const ActionMappingDesc &desc)

Adds an action mapping if one does not already exist.

SubscriptionId carb::input::subscribeToActionEvents(IInput *input, ActionMappingSetHandle actionMappingSet, const char *actionName, Functor &&functor)

Subscribes to the action event stream for a specified action.

SubscriptionId carb::input::subscribeToGamepadConnectionEvents(IInput *input, Functor &&functor)

Subscribes to the gamepad connection event stream.

SubscriptionId carb::input::subscribeToGamepadEvents(IInput *input, Gamepad *gamepad, Functor &&functor)

Subscribes to the gamepad event stream.

SubscriptionId carb::input::subscribeToKeyboardEvents(IInput *input, Keyboard *keyboard, Functor &&functor)

Subscribes to the keyboard event stream.

SubscriptionId carb::input::subscribeToMouseEvents(IInput *input, Mouse *mouse, Functor &&functor)

Subscribes to the mouse event stream.

ButtonFlags carb::input::toButtonFlags(PreviousButtonState previousButtonState, CurrentButtonState currentButtonState)

Combines the previous and current button states into a Button flags. .

CurrentButtonState carb::input::toCurrentButtonState(bool isDown)

Converts a button state to a CurrentButtonState .

PreviousButtonState carb::input::toPreviousButtonState(bool wasDown)

Converts a button state to a PreviousButtonState .

bool carb::isFrameworkValid()

Returns true if the Carbonite framework has been created and is still alive. Creation happens at the first carb::acquireFramework() call and ends at any carb::releaseFramework() call.

bool carb::isVersionSemanticallyCompatible(const char *name, const Version &minimum, const Version &candidate)

Checks two versions to see if they are semantically compatible.

void carb::l10n::deregisterLocalizationForClient() noexcept

Called during client shutdown to clear out the global state.

const char * carb::l10n::getLocalizedStringFromHashNoPlugin(const LanguageTable *table, StringIdentifier id, const LanguageIdentifier *language) noexcept

A version of getLocalizedStringFromHash() for when the localization plugin is unloaded.

void carb::l10n::registerLocalizationForClient() noexcept

Called during client initialization to obtain the globals needed for localization.

void carb::launcher::restoreParentDeathSignal(KillFlags flags=0)

Restores the parent death signal on set-user-ID and set-group-ID images.

void carb::loadFrameworkConfiguration(const StartupFrameworkDesc &params)

Loads the framework configuration based on a slew of input parameters.

void carb::loadPluginsFromPattern(const char *pluginNamePattern, const char *const *searchPaths=nullptr, size_t searchPathCount=0)

Simple plugin loading function wrapper that loads plugins matching a single pattern.

void carb::loadPluginsFromPatterns(const char *const *pluginNamePatterns, size_t pluginNamePatternCount, const char *const *searchPaths=nullptr, size_t searchPathCount=0)

Simple plugin loading function wrapper that loads plugins matching multiple patterns.

void carb::logging::deregisterLoggingForClient() noexcept

Unregisters the log channels and the logger interface.

ILogging * carb::logging::getLogging()

Accessor for logging interface.

void carb::logging::registerLoggingForClient() noexcept

Acquires the default ILogging interface and registers log channels.

int32_t carb::logging::stringToLevel(carb::cpp::optional< std::string > levelString)

Convert a given string to a log level.

int32_t carb::logging::stringToLevel(const char *levelString)

Convert a given string to a log level.

int carb::math::bitScanForward(const T &val)

Searches an integer value from least significant bit to most significant bit for the first set (1) bit.

int carb::math::bitScanReverse(const T &val)

Searches an integer value from most significant bit to least significant bit for the first set (1) bit.

int64_t carb::math::cast_to_int64_t(const int128_t &val) noexcept

Truncates the signed 128-bit value, returning only the lowest 64-bits.

uint64_t carb::math::cast_to_uint64_t(const uint128_t &val) noexcept

Truncates the unsigned 128-bit value, returning only the lowest 64-bits.

int128_t carb::math::divide_and_modulus(const int128_t &dividend, const int128_t &divisor, int128_t &modulus) noexcept

Performs a division operation with two signed 128-bit integers and provides both the quotient and remainder.

uint128_t carb::math::divide_and_modulus(const uint128_t &dividend, const uint128_t &divisor, uint128_t &modulus) noexcept

Performs a division operation on two unsigned 128-bit integers and provides both the quotient and remainder.

constexpr bool carb::math::isPowerOf2(const T &val)

Returns whether the given integer value is a power of two.

int128_t carb::math::make_int128_t(uint64_t high, uint64_t low) noexcept

Creates a signed 128-bit integer from two unsigned 64-bit integers.

constexpr uint128_t carb::math::make_uint128_t(uint64_t high, uint64_t low) noexcept

Creates an unsigned 128-bit integer from two unsigned 64-bit integers.

cpp::optional< uint64_t > carb::math::mulDiv(uint64_t num, uint64_t multiplier, uint64_t divisor) noexcept

Multiplies two 64-bit unsigned integers and then divides the 128-bit result by a third 64-bit unsigned integer.

cpp::optional< int64_t > carb::math::mulDiv(RoundPolicy round, int64_t num, int64_t multiplier, int64_t divisor) noexcept

Multiplies two 64-bit signed integers and then divides the 128-bit result by a third 64-bit signed integer.

cpp::optional< double > carb::math::mulDiv(double num, double multiplier, double divisor) noexcept

Multiplies two 64-bit floating-point values and then divides the result by a third 64-bit floating-point value.

cpp::optional< uint64_t > carb::math::mulDiv(RoundPolicy round, uint64_t num, uint64_t multiplier, uint64_t divisor) noexcept

Multiplies two 64-bit unsigned integers and then divides the 128-bit result by a third 64-bit unsigned integer.

cpp::optional< double > carb::math::mulDiv(RoundPolicy, double num, double multiplier, double divisor) noexcept

Multiplies two 64-bit floating-point values and then divides the result by a third 64-bit floating-point value.

cpp::optional< int64_t > carb::math::mulDiv(int64_t num, int64_t multiplier, int64_t divisor) noexcept

Multiplies two 64-bit signed integers and then divides the 128-bit result by a third 64-bit signed integer.

int carb::math::numLeadingZeroBits(const T &val)

Returns the number of leading zero bits for an integer value.

inline ::std::ostream & carb::math::operator<<(::std::ostream &os, const ::carb::math::uint128_t &val)

Stream insertion operator for unsigned 128-bit integers.

inline ::std::ostream & carb::math::operator<<(::std::ostream &os, const ::carb::math::int128_t &val)

Stream insertion operator for signed 128-bit integers.

int carb::math::popCount(const T &val)

Returns the number of set (1) bits in an integer value.

std::string carb::math::to_string(const int128_t &val)

Formats a signed 128-bit integer as a string.

std::string carb::math::to_string(const uint128_t &val)

Formats an unsigned 128-bit integer as a string.

bool carb::memory::operator!=(const ArenaAllocator< T, Allocator1 > &lhs, const ArenaAllocator< U, Allocator2 > &rhs)

Inequality operator.

bool carb::memory::operator==(const ArenaAllocator< T, Allocator1 > &lhs, const ArenaAllocator< U, Allocator2 > &rhs)

Equality operator.

bool carb::memory::protectedMemmove(void *dest, const void *source, size_t len)

Copies memory as via memmove, but returns false if a read access violation occurs while reading.

bool carb::memory::protectedStrncpy(char *dest, const char *source, size_t n)

Copies memory as via strncpy, but returns false if an access violation occurs while reading.

bool carb::memory::testReadable(const void *mem)

Tests if a memory word (size_t) can be read from an address without crashing.

bool carb::operator!=(const T *lhs, const ObjectPtr< U > &rhs) noexcept

Checks inequality of an ObjectPtr type and a raw pointer.

constexpr bool carb::operator!=(const Version &lhs, const Version &rhs) noexcept

Inequality operator.

bool carb::operator!=(const ObjectPtr< T > &lhs, const ObjectPtr< U > &rhs) noexcept

Checks inequality of two ObjectPtr types.

bool carb::operator!=(const ObjectPtr< T > &lhs, const U *rhs) noexcept

Checks inequality of an ObjectPtr type and a raw pointer.

constexpr bool carb::operator<(const Version &lhs, const Version &rhs) noexcept

Less-than comparison operator.

::std::basic_ostream< CharT, Traits > & carb::operator<<(::std::basic_ostream< CharT, Traits > &o, const RStringUKey &s)

Global stream output operator for RStringUKey .

::std::basic_ostream< CharT, Traits > & carb::operator<<(::std::basic_ostream< CharT, Traits > &o, const RStringKey &s)

Global stream output operator for RStringKey .

::std::basic_ostream< CharT, Traits > & carb::operator<<(::std::basic_ostream< CharT, Traits > &o, const RString &s)

Global stream output operator for RString .

::std::basic_ostream< CharT, Traits > & carb::operator<<(::std::basic_ostream< CharT, Traits > &o, const RStringU &s)

Global stream output operator for RStringU .

constexpr bool carb::operator<=(const Version &lhs, const Version &rhs) noexcept

Less-than-or-equal comparison operator.

constexpr bool carb::operator==(const Version &lhs, const Version &rhs) noexcept

Equality operator.

bool carb::operator==(const ObjectPtr< T > &lhs, const ObjectPtr< U > &rhs) noexcept

Checks equality of two ObjectPtr types.

bool carb::operator==(const ObjectPtr< T > &lhs, const U *rhs) noexcept

Checks equality of an ObjectPtr type and a raw pointer.

bool carb::operator==(const T *lhs, const ObjectPtr< U > &rhs) noexcept

Checks equality of an ObjectPtr type and a raw pointer.

bool carb::options::parseOptions(const Option *supportedArgs, int argc, char **argv, Options *args)

DEV.

void carb::options::printOptionUsage(const Option *supportedArgs, const char *helpString, FILE *stream)

Prints out the documentation for an option table.

void carb::pluginDeinitialize()

Function called automatically at plugin shutdown to de-initialize utilities within each plugin.

void carb::pluginInitialize()

Function called automatically at plugin startup to initialize utilities within each plugin.

void carb::profiler::deregisterProfilerForClient() noexcept

Clears the g_carbProfiler global variable and unregisters load and release hooks with the Framework .

IProfiler * carb::profiler::getProfiler(std::memory_order order=std::memory_order_seq_cst)

Allows access to the g_carbProfiler global variable previously registered with registerProfilerForClient() .

void carb::profiler::registerProfilerForClient() noexcept

Acquires the default IProfiler interface and assigns it to the g_carbProfiler global variable.

void carb::quickReleaseFrameworkAndTerminate(int exitCode)

Releases the Carbonite framework immediately and exits the process, without running C/C++ atexit() registered functions or static destructors.

void * carb::reallocate(void *p, size_t size, size_t align=0) noexcept

Reallocates a block of memory previously allocated with allocate() .

void carb::releaseFramework()

Releases the Carbonite framework immediately.

void carb::releaseFrameworkAndDeregisterBuiltins()

This function releases the Carbonite Framework .

void carb::releaseFrameworkForBindings()

Releases the Carbonite Framework for a script binding.

void carb::resetCachedInterface()

Resets any previously-cached interface of the given type and allows it to be acquired again.

void carb::settings::appendToStringArray(const char *path, const std::vector< std::string > &values)

Appends a set of string values to the end of a setting key.

T carb::settings::getSettingOrDefault(const char *path, T defaultValue={})

Access a setting key if present, otherwise returning a default value.

std::string carb::settings::getString(const ISettings *settings, const char *path, const std::string &defaultValue="")

Retrieves a std::string from a string-type setting for simplicity.

std::vector< std::string > carb::settings::getStringArray(ISettings *settings, const char *path, const std::string &defaultValue="")

A helper function for reading a setting value that is an array of string values as std::vector<std::string> .

std::vector< std::string > carb::settings::getStringArrayFromItemValues(ISettings *settings, const char *path, const std::string &defaultValue="")

A helper function for reading a setting value that is an array of mixed values as std::vector<std::string> .

std::string carb::settings::getStringAt(const ISettings *settings, const char *path, size_t index, const std::string &defaultValue="")

Retrieves a std::string from an array of string-type setting for simplicity.

cpp::optional< std::string > carb::settings::getStringAtOpt(const ISettings *settings, const char *path, size_t index)

Retrieves a std::string from an array of string-type setting for simplicity.

std::string carb::settings::getStringFromItemValue(const ISettings *settings, const char *path, const std::string &defaultValue="")

Retrieves a std::string from a setting key for simplicity.

std::string carb::settings::getStringFromItemValueAt(const ISettings *settings, const char *path, size_t index, const std::string &defaultValue="")

Retrieves a std::string from an array setting key for simplicity.

cpp::optional< std::string > carb::settings::getStringOpt(const ISettings *settings, const char *path)

Retrieves a std::string from a string-type setting for simplicity.

void carb::settings::loadSettingsFromFile(ISettings *settings, const char *path, dictionary::IDictionary *dictionary, dictionary::ISerializer *serializer, const char *filename)

A helper function to load settings from a file.

void carb::settings::saveFileFromSettings(const ISettings *settings, dictionary::ISerializer *serializer, const char *path, const char *filename, dictionary::SerializerOptions serializerOptions)

A helper function to save settings to a file.

void carb::settings::setBoolArray(ISettings *settings, const char *path, const std::vector< bool > &array)

A helper function for setting a std::vector<bool> as an array of bools.

T carb::settings::setDefaultAndGetSetting(const char *path, T defaultValue={})

Sets a default value for a setting key and returns the current value.

void carb::settings::setFloatArray(ISettings *settings, const char *path, const std::vector< float > &array)

A helper function for setting a std::vector<float> as an array of floats.

void carb::settings::setFloatArray(ISettings *settings, const char *path, const std::vector< double > &array)

A helper function for setting a std::vector<double> as an array of doubles.

void carb::settings::setIntArray(ISettings *settings, const char *path, const std::vector< int64_t > &array)

A helper function for setting a std::vector<int64_t> as an array of 64-bit integers.

void carb::settings::setIntArray(ISettings *settings, const char *path, const std::vector< int > &array)

A helper function for setting a std::vector<int> as an array of integers.

void carb::settings::setStringArray(ISettings *settings, const char *path, const std::vector< std::string > &array)

A helper function for setting a std::vector<bool> as an array of strings.

void carb::settings::walkSettings(carb::dictionary::IDictionary *idict, carb::settings::ISettings *settings, dictionary::WalkerMode walkerMode, const char *rootPath, ElementData rootElementData, OnItemFnType onItemFn, void *userData)

A function for walking all of the settings from a given root.

void carb::shutdownFramework()

Tears down the Carbonite framework.

void carb::startupFramework(const StartupFrameworkDesc &params)

Starts/Configures the framework given a slew of input parameters.

carb::stats::CARB_STRONGTYPE(StatId, size_t)

Base type for the identifier for a single statistic value.

ObjectPtr< T > carb::stealObject(T *other)

Helper function to create carb::ObjectPtr from a carb::IObject pointer by "stealing" the pointer; that is, without increasing the reference count.

TaskingDesc carb::tasking::getDefaultTaskingDesc()

Default TaskingDesc plugin starts with.

inline ::std::enable_if_t< detail::IsRandomAccess_v< RandomAccessIterator > > carb::tasking::parallelSort(ITasking *tasking, RandomAccessIterator first, RandomAccessIterator last)

Performs a parallel sort on the given data.

inline ::std::enable_if_t< detail::IsRandomAccess_v< RandomAccessIterator > > carb::tasking::parallelSort(ITasking *tasking, RandomAccessIterator first, RandomAccessIterator last, const Compare &comp)

Performs a parallel sort on the given data.

process::ProcessId carb::this_process::getId()

Returns the ID of the currently executing process.

process::ProcessId carb::this_process::getIdCached()

Get the ID of the currently executing process.

uint64_t carb::this_process::getUniqueId()

Returns an ID uniquely identifying this process at least for the uptime of the machine.

void carb::this_thread::atomic_fence_seq_cst() noexcept

A replacement function for std::atomic_thread_fence(std::memory_order_seq_cst) that performs better on some older compilers.

thread::NativeHandleType carb::this_thread::get()

Returns the native handle for the current thread.

thread::CpuMaskVector carb::this_thread::getAffinity()

Gets the current CPU Affinity for the current thread.

thread::ThreadId carb::this_thread::getId()

Retrieve the thread ID for the current thread.

std::string carb::this_thread::getName()

Retrieves the name of the current thread.

thread::ProcessId carb::this_thread::getProcessId()

Returns the ID of the currently executing process.

thread::ProcessId carb::this_thread::getProcessIdCached()

Get the ID of the currently executing process.

bool carb::this_thread::setAffinity(const thread::CpuMaskVector &masks)

Sets the CPU Affinity for the current thread.

void carb::this_thread::setAffinity(size_t mask)

Sets the affinity of the current thread.

void carb::this_thread::setName(const char *name)

Sets the name for the current thread.

void carb::this_thread::sleepForUs(uint32_t microseconds) noexcept

A simple sleep for the current thread that does not include the overhead of std::chrono .

void carb::this_thread::sleep_for(const std::chrono::duration< Rep, Period > &delay)

Blocks the execution of the current thread for at least the specified duration.

void carb::this_thread::sleep_until(const std::chrono::time_point< Clock, Duration > &when)

Blocks the execution of the current thread until at least the specified time.

bool carb::this_thread::spinTryWait(Func &&f) noexcept(noexcept(f()))

Calls a predicate until it returns true or a number of attempts have elapsed.

bool carb::this_thread::spinTryWaitWithBackoff(Func &&f) noexcept(noexcept(f()))

Calls a predicate until it returns true or a number of attempts have elapsed, backing off as time passes.

void carb::this_thread::spinWait(Func &&f) noexcept(noexcept(f()))

Calls a predicate repeatedly until it returns true .

void carb::this_thread::spinWaitWithBackoff(Func &&f) noexcept(noexcept(f()))

Calls a predicate until it returns true with progressively increasing delays between calls.

CpuMaskVector carb::thread::getAffinity(NativeHandleType h)

Gets the current CPU Affinity for the thread.

std::string carb::thread::getName(NativeHandleType h)

Retrieves the name of the thread previously set with setName() .

unsigned carb::thread::hardware_concurrency() noexcept

Similar to std::thread::hardware_concurrency() , but pays attention to docker cgroup config and CPU limits.

void carb::thread::setAffinity(NativeHandleType h, size_t mask)

Sets the CPU affinity for the given thread handle.

bool carb::thread::setAffinity(NativeHandleType h, const CpuMaskVector &masks)

Sets the CPU Affinity for the thread.

void carb::thread::setName(NativeHandleType h, const char *name)

Sets the name of the given thread.

char * carb::time::asctime_r(const struct tm *tm, char(&buf)[N]) noexcept

Platform independent version of asctime_r: convert a struct tm into a null-terminated string.

char * carb::time::ctime_r(const time_t *timep, char(&buf)[N]) noexcept

Platform independent version of ctime_r; convert a time_t into a null-terminated string in the user's local time zone.

struct tm * carb::time::gmtime_r(const time_t *timep, struct tm *result) noexcept

Platform independent version of gmtime_r: convert a time_t to UTC component representation.

struct tm * carb::time::localtime_r(const time_t *timep, struct tm *result) noexcept

Platform independent version of localtime_r: convert a time_t to local timezone component representation.

constexpr uint32_t carb::toHexVersion(carb::Version ver) noexcept

Converts a Version struct to a hex-version.

std::string carb::tokens::escapeString(const std::string &str)

A helper function that escapes necessary symbols in the provided string so that they won't be recognized as related to token parsing.

std::string carb::tokens::resolveString(const ITokens *tokens, carb::cpp::string_view str, ResolveFlags resolveFlags=kResolveFlagNone, ResolveResult *resolveResult=nullptr)

Helper for resolving a token string.

constexpr unsigned char carb::tolower(unsigned char c)

A fast table-based implementation of std::tolower for ASCII characters only.

constexpr unsigned char carb::toupper(unsigned char c)

A fast table-based implementation of std::toupper for ASCII characters only.

VariantData carb::variant::translate(Type &&type) noexcept

A helper function to translate a typed value into a VariantData via a Translator .

variant::Variant carb::variant_literals::operator””_v(long double val) noexcept

Literal cast operator for a long double variant value.

variant::Variant carb::variant_literals::operator””_v(unsigned long long val) noexcept

Literal cast operator for an unsigned long long variant value.

variant::Variant carb::variant_literals::operator””_v(const char *str, size_t length) noexcept

Literal cast operator for a string variant value.

auto carb::wrapInterfaceFunction(ReturnType(*InterfaceType::*p)(Args…)) -> std::function< ReturnType(InterfaceType &, Args…)>

Wraps an interface function into a std::function<> .

auto carb::wrapInterfaceFunction(const InterfaceType *c, ReturnType(*InterfaceType::*p)(Args…)) -> std::function< ReturnType(Args…)>

Wraps an interface function into a std::function<> .

carb::ErrorApi const * carbGetErrorApi(carb::Version *version)

Get the instance of the error-handling API.

carb::Version carbGetFrameworkVersion()

An automatically-generated function exported by Carbonite plugins used to check the plugin's Framework compatibility.

void carbGetPluginDeps(struct carb::InterfaceDesc **deps, size_t *count)

An automatically-generated function exported by some Carbonite plugins.

void carbOnPluginPostShutdown()

An automatically-generated function exported by Carbonite plugins.

void carbOnPluginPreStartup()

An automatically-generated function exported by Carbonite plugins.

void carbOnPluginQuickShutdown()

An optional function that a plugin author can export from their plugin to quick-shutdown their plugin.

void carbOnPluginRegister(carb::Framework *framework, carb::PluginRegistryEntry *outEntry)

An automatically-generated function exported by some Carbonite plugins (now deprecated).

void carbOnPluginRegisterEx(carb::PluginFrameworkDesc *frameworkDesc, carb::PluginRegistryEntry *outEntry)

An automatically-generated function exported by some Carbonite plugins (now deprecated).

void carbOnPluginRegisterEx2(carb::PluginFrameworkDesc *frameworkDesc, carb::PluginRegistryEntry2 *outEntry)

An automatically-generated function exported by some Carbonite plugins.

void carbOnPluginShutdown()

An optional function that a plugin author can export from their plugin to shutdown their plugin.

void carbOnPluginStartup()

An optional function that a plugin author can export from their plugin to start their plugin.

bool carbOnPluginStartupEx()

An optional function that a plugin author can export from their plugin to start their plugin.

void carbOnReloadDependency(carb::PluginReloadState reloadState, void *pluginInterface, carb::PluginImplDesc desc)

An optional function that a plugin author can export from their plugin to receive dependency reload notifications.

void * carbReallocate(void *p, size_t size, size_t align)

Internal function used by all other allocation functions.

constexpr const T & carb_max(const T &left, const T &right) noexcept(noexcept(left< right))

Picks the maximum of two values.

constexpr const T & carb_min(const T &left, const T &right) noexcept(noexcept(left< right))

Picks the minimum of two values.

void destroyInterface(Version v, void *buf)

An optional function that a plugin author can provide to destroy an interface.

bool fillInterface(carb::Version *v, void *buf)

A required function that a plugin author must provide to construct a requested version of an interface.

void fillInterface(InterfaceType &iface)

A required function that a plugin author must provide to construct an interface.

ObjectPtr< T > omni::core::borrow(T *ptr) noexcept

Returns an ObjectPtr managing the given pointer. omni::core::IObject::acquire() is called on the pointer.

ObjectPtr< T > omni::core::cast(U *ptr) noexcept

Casts the given pointer to the given interface (e.g. T).

ObjectPtr< T > omni::core::createType(TypeId id, const char *moduleName=nullptr, uint32_t version=0)

Instantiates the given type and casts it to T.

ObjectPtr< T > omni::core::createType(const char *moduleName=nullptr, uint32_t version=0)

Instantiates an implementation of interface T.

Result omni::core::getInterfaceDefaults(TypeId *implId, std::string *moduleName, uint32_t *implVersion)

Given an interface id (i.e. T), returns the preferred implementation (if any) instantiated when calling omni::core::ITypeFactory::createType(), the preferred module (if any) searched when calling omni::core::ITypeFactory::createType(), and the preferred implementation version number (if any) required when calling omni::core::ITypeFactory::createType().

std::string omni::core::getModuleFilename(omni::core::IObject *obj)

Given an object, returns the name of the module (.dll/.exe) which contains the object's code.

const char * omni::core::getTypeIdName(TypeId id)

void omni::core::registerInterfaceImplementations(const InterfaceImplementation *implementations, uint32_t implementationsCount, TypeFactoryLoadFlags flags=0)

Result omni::core::registerInterfaceImplementationsFromModule(const char *moduleName, TypeFactoryLoadFlags flags=0)

const char * omni::core::resultToString(Result result)

Given a Result code, returns a human readable interpretation of the code.

void omni::core::setInterfaceDefaults(TypeId implId, const char *moduleName, uint32_t implVersion)

ObjectPtr< T > omni::core::steal(T *ptr) noexcept

Returns an ObjectPtr managing the given pointer. omni::core::IObject::acquire() is not called on the pointer.

TypeId omni::core::typeId(const char *str)

Returns the type id of the given type name at run time.

Result omni::core::unregisterInterfaceImplementationsFromModule(const char *moduleName)

constexpr bool omni::detail::operator!=(const PointerIterator< TPointer, TContainer > &lhs, const PointerIterator< UPointer, TContainer > &rhs) noexcept

Test for inequality between lhs and rhs .

constexpr PointerIterator< TPointer, TContainer > omni::detail::operator+(typename PointerIterator< TPointer, TContainer >::difference_type dist, const PointerIterator< TPointer, TContainer > &iter) noexcept

Get an iterator dist elements forward from iter .

constexpr auto omni::detail::operator-(const PointerIterator< TPointer, TContainer > &lhs, const PointerIterator< UPointer, TContainer > &rhs) noexcept -> decltype(lhs.operator->() - rhs.operator->())

Get the distance between iterators lhs and rhs . If lhs < rhs , this value will be negative.

constexpr bool omni::detail::operator<(const PointerIterator< TPointer, TContainer > &lhs, const PointerIterator< UPointer, TContainer > &rhs) noexcept

Test that lhs points to something less than rhs .

constexpr bool omni::detail::operator<=(const PointerIterator< TPointer, TContainer > &lhs, const PointerIterator< UPointer, TContainer > &rhs) noexcept

Test that lhs points to something less than or equal to rhs .

constexpr bool omni::detail::operator==(const PointerIterator< TPointer, TContainer > &lhs, const PointerIterator< UPointer, TContainer > &rhs) noexcept

Test for equality between lhs and rhs .

constexpr bool omni::detail::operator>(const PointerIterator< TPointer, TContainer > &lhs, const PointerIterator< UPointer, TContainer > &rhs) noexcept

Test that lhs points to something greater than rhs .

constexpr bool omni::detail::operator>=(const PointerIterator< TPointer, TContainer > &lhs, const PointerIterator< UPointer, TContainer > &rhs) noexcept

Test that lhs points to something greater than or equal to rhs .

constexpr string::size_type omni::erase(string &str, const U &val)

Erases all instances of val from str .

constexpr string::size_type omni::erase_if(string &str, Pred pred)

Erases all elements of str the satisfy pred .

omni::ext::OMNI_DECLARE_INTERFACE(IExtensionData)

Declaration of IExtensionData.

omni::ext::OMNI_DECLARE_INTERFACE(IExtensionHooks)

Declaration of IExtensionHooks.

IHookHolderPtr omni::ext::createExtensionStateChangeHook(IExtensionManagerHooks *hooks, const std::function< void(const char *extId, ExtensionStateChangeType type)> &onStateChange, ExtensionStateChangeType type, const char *extFullName="", const char *extDictPath="", Order order=kDefaultOrder, const char *hookName=nullptr)

Wrapper to pass an invocable object to Extension Manager Hooks.

std::vector< ExtensionInfo > omni::ext::fetchAllExtensionPackages(ExtensionManager *manager)

Helper function to fetch all extension packages and load them into the memory.

const char * omni::ext::getEnabledExtensionId(ExtensionManager *manager, const char *extFullName)

Helper function to find the Extension ID of a given Extension.

std::string omni::ext::getExtensionPath(ExtensionManager *manager, const char *extId)

Helper function to look up the path from an extension dictionary.

bool omni::ext::isExtensionEnabled(ExtensionManager *manager, const char *extFullName)

Helper function to check if an extension is enabled by name.

ExtPathUrl omni::ext::parseExtUrl(const std::string &url)

Simple helper function to parse a given URL into a scheme and a path.

std::pair< IHookHolderPtr, IHookHolderPtr > omni::ext::subscribeToExtensionEnable(ExtensionManager *manager, const std::function< void(const char *extId)> &onEnable, const std::function< void(const char *extId)> &onDisable=nullptr, const char *extFullName="", const char *hookName=nullptr)

A wrapper function to subscribe to extension enable (and optionally disable) events.

bool omni::extras::endsWith(const std::string &str, const std::string &ending)

Checks a string to see if it ends with a given suffix.

omni::core::Result omni::extras::fillOutArray(T *outArray, SizeType *outArrayCount, SizeType requiredCount, Callable &&fillFn)

Fills the array given by outArray by calling fillFn.

std::vector< std::string > omni::extras::getDirectoryItems(const std::string &folder)

Returns a list of all files and sub-folders in the given folder.

std::vector< std::string > omni::extras::getDirectoryItemsOfType(const std::string &folder, carb::filesystem::DirectoryItemType type)

Returns a list of either files or sub-folders in the given folder.

int omni::extras::getDockerCpuLimit() noexcept

Attempts to read the current effective CPU usage quota for processes in a container.

carb::filesystem::IFileSystem * omni::extras::getFileSystem()

Helper function for acquiring and caching the filesystem.

omni::core::Result omni::extras::getOutArray(GetCallable &&getFn, FillCallable &&fillFn, uint32_t stackCount=(4096/sizeof(T)), uint32_t maxRetryCount=(UINT32_MAX - 1))

Retrieves an array of unknown size using getFn and passes it to fillFn .

std::vector< std::string > omni::extras::getSubfolders(const std::vector< std::string > &folders)

Helper function to gather all sub-folders within an array of sub-folders.

std::vector< std::string > omni::extras::getSubfolders(const std::string &folder)

Helper function to gather all sub-folders within a given folder.

bool omni::extras::gitHashFromOmniverseVersion(const extras::SemanticVersion &version, std::string &outHash)

Attempts to parse the Git hash from an Omniverse-specific semantic version.

bool omni::extras::isAnyVersion(const SemanticVersion &v)

Checks if the given SemanticVersion has negative major, minor and patch values.

bool omni::extras::isPathEqual(const std::string &strLeft, const std::string &strRight)

Checks if two given file paths are equal with case sensitivity based on the platform.

bool omni::extras::isRunningInContainer()

Attempts to detect whether this process is running inside a container.

std::string & omni::extras::ltrim(std::string &s, const char *t=kTrimCharsDefault)

Performs an in-place left-trim on a given string.

bool omni::extras::operator<(const SemanticVersion &lhs, const SemanticVersion &rhs)

Less-than operator for two semantic versions.

bool omni::extras::operator==(const SemanticVersion &lhs, const SemanticVersion &rhs)

Equality operator for two semantic versions.

int omni::extras::prereleaseCmp(const char *x, const char *y)

Semantic Version pre-release comparator according to rules at https://semver.org/#spec-item-11 .

int omni::extras::prereleaseCmp(const std::string &x, const std::string &y)

Semantic Version pre-release comparator according to rules at https://semver.org/#spec-item-11 .

std::pair< bool, std::string > omni::extras::readFile(const char *path)

Reads file content into a string.

void omni::extras::replaceAll(std::string &str, const std::string &subStr, const std::string &replaceWith)

Replaces all instances of a substring within a given string with a replacement value.

std::string omni::extras::resolvePath(const std::string &path, const std::string &root={})

Resolves a given path by resolving all Tokens and optionally prepending the given root path.

std::string & omni::extras::rtrim(std::string &s, const char *t=kTrimCharsDefault)

Performs an in-place right-trim on a given string.

std::vector< std::string > omni::extras::split(const std::string &s, char d, size_t count=std::numeric_limits< size_t >::max())

Splits a string based on a delimiter.

bool omni::extras::startsWith(const std::string &str, const std::string &prefix)

Checks a string to see if it begins with a given prefix.

bool omni::extras::stringCompareCaseInsensitive(const std::string &str1, const std::string &str2)

Checks two strings for equality in an ASCII case-insensitive manner.

bool omni::extras::stringToInt2(const std::string &str, carb::Int2 &outResult, const char *delims=kInt2Delimiters)

Converts a string value to an Int2 representation, that is, a two-component vector.

bool omni::extras::stringToInteger(const std::string &str, int32_t &outResult)

Converts a given string to a 32-bit signed integer value.

bool omni::extras::stringToVersion(const std::string &str, SemanticVersion &outVersion)

Parses a given string into a semantic version.

SemanticVersion omni::extras::stringToVersionOrDefault(const std::string &str)

Parses a string to a semantic version, or a default value if parsing fails.

void omni::extras::toLower(std::string &str)

Transforms a string to lowercase in-place.

std::string & omni::extras::trim(std::string &s, const char *t=kTrimCharsDefault)

Performs an in-place trim (from both sides) on a given string.

std::string omni::extras::trimCopy(std::string s, const char *t=kTrimCharsDefault)

Performs a trim (from both sides) on a given string, returning a copy.

int omni::extras::versionsCmp(const VersionT &lhs, const VersionT &rhs)

Less-than comparator for two versions.

std::basic_istream< char, std::char_traits< char > > & omni::getline(std::basic_istream< char, std::char_traits< char > > &&input, string &str)

Reads characters from the input stream input and places them in the string str .

std::basic_istream< char, std::char_traits< char > > & omni::getline(std::basic_istream< char, std::char_traits< char > > &&input, string &str, char delim)

Reads characters from the input stream input and places them in the string str .

void omni::log::addModulesChannels()

Registers known channels with the log returned by omniGetLogWithoutAcquire() .

LogChannelData *& omni::log::getModuleLogChannels() noexcept

Returns a per-module list of channels defined during static initialization via OMNI_LOG_ADD_CHANNEL .

bool & omni::log::hasModuleLogChannelsRegistered() noexcept

Returns a per-module boolean reference that is used to indicate whether log channels have been registered yet.

void omni::log::removeModulesChannels()

Removes channels added by omni::log::addModulesChannels() .

bool omni::operator!=(const vector< T > &lhs, const vector< T > &rhs)

Compares the contents of two vectors for inequality.

bool omni::operator!=(function< TReturn(TArgs…)> const &func, std::nullptr_t) noexcept

Check if func is activated.

constexpr bool omni::operator!=(const char *lhs, const string &rhs)

Compares lhs and rhs .

bool omni::operator!=(const std::string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

bool omni::operator!=(const string &lhs, const std::string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator!=(expected< TValueLhs, TErrorLhs > const &lhs, TValueRhs const &rhs)

Compare the contents of lhs and rhs for inequality.

bool omni::operator!=(std::nullptr_t, function< TReturn(TArgs…)> const &func) noexcept

Check if func is activated.

constexpr bool omni::operator!=(expected< TValueLhs, TErrorLhs > const &lhs, expected< TValueRhs, TErrorRhs > const &rhs)

Compare the contents of lhs and rhs for inequality.

constexpr bool omni::operator!=(const string &lhs, const char *rhs)

Compares lhs and rhs .

constexpr bool omni::operator!=(const string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator!=(expected< TValueLhs, TErrorLhs > const &lhs, unexpected< TErrorRhs > const &rhs)

Compare the contents of lhs and rhs for inequality.

string omni::operator+(string &&lhs, string &&rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const string &lhs, const string &rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(char lhs, const string &rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(string &&lhs, char rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const char *lhs, const string &rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const std::string &lhs, string &&rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const char *lhs, string &&rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(string &&lhs, const char *rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const string &lhs, string &&rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(string &&lhs, const string &rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const string &lhs, const char *rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const string &lhs, const std::string &rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const string &lhs, char rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(const std::string &lhs, const string &rhs)

Creates a new string by concatenating lhs and rhs .

string omni::operator+(char lhs, string &&rhs)

Creates a new string by concatenating lhs and rhs .

constexpr bool omni::operator<(const string &lhs, const char *rhs)

Compares lhs and rhs .

bool omni::operator<(const std::string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

bool omni::operator<(const vector< T > &lhs, const vector< T > &rhs)

Compares the contents of two vectors lexicographically.

bool omni::operator<(const string &lhs, const std::string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator<(const string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator<(const char *lhs, const string &rhs)

Compares lhs and rhs .

std::basic_ostream< char, std::char_traits< char > > & omni::operator<<(std::basic_ostream< char, std::char_traits< char > > &os, const string &str)

Output stream operator overload.

constexpr bool omni::operator<=(const string &lhs, const char *rhs)

Compares lhs and rhs .

bool omni::operator<=(const std::string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

bool omni::operator<=(const string &lhs, const std::string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator<=(const char *lhs, const string &rhs)

Compares lhs and rhs .

bool omni::operator<=(const vector< T > &lhs, const vector< T > &rhs)

Compares the contents of two vectors lexicographically.

constexpr bool omni::operator<=(const string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

bool omni::operator==(function< TReturn(TArgs…)> const &func, std::nullptr_t) noexcept

Check if func is not activated.

bool omni::operator==(const vector< T > &lhs, const vector< T > &rhs)

Compares the contents of two vectors for equality.

bool omni::operator==(std::nullptr_t, function< TReturn(TArgs…)> const &func) noexcept

Check if func is not activated.

bool omni::operator==(const std::string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

bool omni::operator==(const string &lhs, const std::string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator==(const string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator==(const string &lhs, const char *rhs)

Compares lhs and rhs .

constexpr bool omni::operator==(expected< TValueLhs, TErrorLhs > const &lhs, unexpected< TErrorRhs > const &rhs)

Compare the error contents of lhs with rhs .

constexpr bool omni::operator==(expected< TValueLhs, TErrorLhs > const &lhs, expected< TValueRhs, TErrorRhs > const &rhs)

Compare the contents of lhs and rhs for equality.

constexpr bool omni::operator==(expected< TValueLhs, TErrorLhs > const &lhs, TValueRhs const &rhs)

Compare the contents of lhs with the non expected type rhs .

constexpr bool omni::operator==(const char *lhs, const string &rhs)

Compares lhs and rhs .

bool omni::operator>(const string &lhs, const std::string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator>(const string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator>(const char *lhs, const string &rhs)

Compares lhs and rhs .

constexpr bool omni::operator>(const string &lhs, const char *rhs)

Compares lhs and rhs .

bool omni::operator>(const vector< T > &lhs, const vector< T > &rhs)

Compares the contents of two vectors lexicographically.

bool omni::operator>(const std::string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator>=(const char *lhs, const string &rhs)

Compares lhs and rhs .

constexpr bool omni::operator>=(const string &lhs, const char *rhs)

Compares lhs and rhs .

bool omni::operator>=(const std::string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

bool omni::operator>=(const vector< T > &lhs, const vector< T > &rhs)

Compares the contents of two vectors lexicographically.

bool omni::operator>=(const string &lhs, const std::string &rhs) noexcept

Compares lhs and rhs .

constexpr bool omni::operator>=(const string &lhs, const string &rhs) noexcept

Compares lhs and rhs .

std::basic_istream< char, std::char_traits< char > > & omni::operator>>(std::basic_istream< char, std::char_traits< char > > &is, string &str)

Input stream operator overload.

double omni::stod(const string &str, std::size_t *pos=nullptr)

Interprets the string str as a floating point value.

float omni::stof(const string &str, std::size_t *pos=nullptr)

Interprets the string str as a floating point value.

int omni::stoi(const string &str, std::size_t *pos=nullptr, int base=10)

Interprets the string str as a signed integer value.

long omni::stol(const string &str, std::size_t *pos=nullptr, int base=10)

Interprets the string str as a signed integer value.

long double omni::stold(const string &str, std::size_t *pos=nullptr)

Interprets the string str as a floating point value.

long long omni::stoll(const string &str, std::size_t *pos=nullptr, int base=10)

Interprets the string str as a signed integer value.

unsigned long omni::stoul(const string &str, std::size_t *pos=nullptr, int base=10)

Interprets the string str as a unsigned integer value.

unsigned long long omni::stoull(const string &str, std::size_t *pos=nullptr, int base=10)

Interprets the string str as a unsigned integer value.

bool omni::str::isWildcardPattern(const char *pattern)

Tests whether a string is potentially a wildcard pattern.

bool omni::str::matchWildcard(const char *str, const char *pattern)

Checks if a string matches a wildcard pattern.

const char * omni::str::matchWildcards(const char *str, const char *const *patterns, size_t patternsCount)

Attempts to match a string to a set of wildcard patterns.

void omni::structuredlog::addModulesSchemas() noexcept

A function that registers all schemas within a module.

void omni::structuredlog::clearJsonTree(JsonNode *node, Allocator *alloc)

Free any memory allocated to a JsonNode and clear it out to an empty node.

bool omni::structuredlog::compareJsonTrees(const JsonNode *a, const JsonNode *b, JsonTreeCompareFuzz fuzz=JsonTreeCompareFuzz::eStrict)

Perform a deep comparison of two nodes.

void omni::structuredlog::configureStructuredLogging(carb::settings::ISettings *settings)

Checks the settings registry for structured log settings and makes them active.

constexpr const char * omni::structuredlog::getSchemaResultName(SchemaResult result)

Retrieves a string containing the name of a SchemaResult value.

void omni::structuredlog::ignoreJsonTreeSerializerValidationError(const char *s)

Default value for the onValidationError template parameter.

bool omni::structuredlog::serializeArray(JsonSerializerType *serial, const JsonNodeType *root, const T *constVal, BlobReaderType *reader)

Serialize an array type from a JSON tree.

bool omni::structuredlog::serializeEnum(JsonSerializerType *serial, const JsonNodeType *root, T *enumChoices, BlobReaderType *reader)

bool omni::structuredlog::serializeJsonTree(JsonSerializerType *serial, const JsonNodeType *root, BlobReaderType *reader)

Serialize JSON using a JsonNode as the schema and a binary blob to read data.

bool omni::structuredlog::serializeJsonTree(JsonSerializerType *serial, const JsonNodeType *root, const void *blob, size_t blobSize)

Serialize JSON using a JsonNode as the schema and a binary blob to read data.

bool omni::structuredlog::serializeScalar(JsonSerializerType *serial, const JsonNodeType *root, T constVal, BlobReaderType *reader)

Serialize a scalar type from a JSON tree.

bool omni::structuredlog::setStructuredLogLoggingEnabled(bool enabled=true)

Enables or disables the structured logging log message redirection.

void omni::swap(string &lhs, string &rhs) noexcept

Swaps lhs and rhs via lhs.swap(rhs) .

void omni::swap(function< TReturn(TArgs…)> &a, function< TReturn(TArgs…)> &b) noexcept

Swap a and b by function::swap .

extras::UniqueApp omni::telemetry::createGuard()

Create a guard with the standard name and path for the transmitter.

std::string omni::telemetry::getTransmitterLogPath()

Determine the directory where the logs of a launched transmitter process should go.

bool omni::telemetry::launchTransmitter(const char *transmitterPath, const std::vector< std::string > extraArgs={})

Launch the telemetry transmitter process.

string omni::to_string(long long value)

Converts the numerical value value to a string.

string omni::to_string(unsigned long long value)

Converts the numerical value value to a string.

string omni::to_string(double value)

Converts the numerical value value to a string.

string omni::to_string(unsigned long value)

Converts the numerical value value to a string.

string omni::to_string(float value)

Converts the numerical value value to a string.

string omni::to_string(long double value)

Converts the numerical value value to a string.

string omni::to_string(unsigned value)

Converts the numerical value value to a string.

string omni::to_string(int value)

Converts the numerical value value to a string.

string omni::to_string(long value)

Converts the numerical value value to a string.

omni::unexpected() -> unexpected< void >

An empty unexpected() constructor call implies TError = void .

omni::unexpected(T) -> unexpected< T >

Allow deduction of TError from the unexpected(t) expression.

void omniCoreStart(const OmniCoreStartArgs *args)

Initializes the omni core library's internal data structures.

void omniCoreStop()

Tears down the omni core library's internal data structures.

void omniCoreStopForBindings()

Tears down the omni core library's internal data structures for script bindings.

omni::log::ILog * omniCreateLog()

Instantiates a default implementation of omni::log::ILog . omni::core::IObject::acquire() is called on the returned pointer.

omni::core::ITypeFactory * omniCreateTypeFactory(const omni::core::TypeFactoryArgs *args=nullptr)

Creates a default implementation of ITypeFactory.

void * omniGetBuiltInWithoutAcquire(OmniBuiltIn)

Returns a built-in interface based on the given parameter.

omni::log::ILog * omniGetLogWithoutAcquire()

Returns the global log. omni::core::IObject::acquire() is not called on the returned pointer.

const char * omniGetModuleDirectory()

Returns the module's directory name (e.g. "c:/foo" for "c:/foo/omni-glfw.dll"). The pointer returned is valid for the lifetime of the module.

const char * omniGetModuleFilename()

Returns the module's name (e.g. "c:/foo/omni-glfw.dll"). The pointer returned is valid for the lifetime of the module.

omni::structuredlog::IStructuredLog * omniGetStructuredLogWithoutAcquire()

Retrieves the module's structured log object.

omni::core::ITypeFactory * omniGetTypeFactoryWithoutAcquire()

Returns the global ITypeFactory. omni::core::IObject::acquire() is not called on the returned pointer.

omni::core::Result omniModuleGetExports(omni::core::ModuleExports *out)

Main entry point into a module. Returns the list of capabilities and requirements for the module.

void omniReleaseStructuredLog()

Releases the structured log pointer.

bool rtx::enableAbiskoMode()

Caches and returns whether the value of "/rtx/rendermode" is "abisko".

bool rtx::enableAperture()

Dummy function.

bool rtx::enableMDLDistilledMtls()

Caches and returns the value of "/rtx/mdltranslator/distillMaterial".

uint32_t rtx::getRayTypeCount()

Returns how many ray types the renderer will use based on settings.

bool rtx::setDefaultBoolEx(carb::settings::ISettings *settings, const char *path, bool value)

A helper function that atomically sets the setting value at path if and only if it doesn't exist.