carb::extras¶
Common namespace for extra helper functions and classes.
Classes¶
carb::extras::HandleRef: A smart-reference class for a Handle associated with a carb::extras::HandleDatabase.
carb::extras::SystemMemoryInfo: Stores information about memory in the system.
carb::extras::Base64: Encoder and decoder helper for carb::extras::Base64 data.
carb::extras::CpuInfo: Helper class for gathering and querying CPU information for x86 and x64 CPUs.
carb::extras::EnvironmentVariable: Defines an environment variable class that allows one to get, set, and restore value on destruction.
carb::extras::EnvironmentVariableParser: Parses enviroment variables into program options or environment variables.
carb::extras::HandleDatabase: Provides an OS-style mapping of a Handle to a Resource.
carb::extras::SharedMemory: A utility helper class to provide shared memory access to one or more processes.
carb::extras::Utf8Iterator: A simple iterator class for walking a UTF-8 string.
carb::extras::Utf8Parser: Static helper class to allow for the processing of UTF-8 strings.
carb::extras::Uuid: UUIDv4 Unique Identifier (RFC 4122)
Enums¶
carb::extras::MemoryQueryType: The type of memory to query.
carb::extras::MemoryScaleType: Names for the different types of common memory scales.
Functions¶
carb::extras::compareStrings: Compare two strings in a case sensitive manner.
carb::extras::compareStringsNoCase: Compare two strings in a case insensitive manner.
carb::extras::convertUtf16StringToUtf8: Convert a UTF-16 encoded string to UTF-8.
carb::extras::convertUtf16StringToUtf8: Convert a UTF-16 encoded string to UTF-8.
carb::extras::convertUtf16StringToUtf8: Convert a UTF-8 encoded string to UTF-32.
carb::extras::convertUtf32StringToUtf8: Convert a UTF-32 encoded string to UTF-8.
carb::extras::convertUtf32StringToUtf8: Convert a UTF-32 encoded string to UTF-8.
carb::extras::convertUtf32StringToUtf8: Convert a UTF-8 encoded string to UTF-32.
carb::extras::convertUtf8StringToUtf16: Convert a UTF-8 encoded string to UTF-16.
carb::extras::convertUtf8StringToUtf16: Convert a UTF-8 encoded string to UTF-16.
carb::extras::convertUtf8StringToUtf16: Convert a UTF-8 encoded string to UTF-16.
carb::extras::convertUtf8StringToUtf32: Convert a UTF-8 encoded string to UTF-32.
carb::extras::convertUtf8StringToUtf32: Convert a UTF-8 encoded string to UTF-32.
carb::extras::convertUtf8StringToUtf32: Convert a UTF-8 encoded string to UTF-32.
carb::extras::convertUtf8StringToWide: Convert a UTF-8 encoded string to wide string.
carb::extras::convertUtf8StringToWide: Convert a UTF-8 encoded string to wide.
carb::extras::convertUtf8StringToWide: Convert a UTF-8 encoded string to UTF-16.
carb::extras::convertWideStringToUtf8: Convert a wide encoded string to UTF-8 string.
carb::extras::convertWideStringToUtf8: Convert a UTF-8 encoded string to wide.
carb::extras::convertWideStringToUtf8: Convert a UTF-8 encoded string to UTF-16.
carb::extras::copyStringSafe: Copy a string with optional truncation.
carb::extras::copyStringSafe: Copy slice of string with optional truncation.
carb::extras::createLibraryNameForModule: Creates a full library name from a module’s base name.
carb::extras::debugBacktrace: Attempts to capture the callstack for the current thread.
carb::extras::debuggerBreak: Performs a software breakpoint if a debugger is currently attached to this process.
carb::extras::debugPrint: Prints a formatted string to debug output.
carb::extras::formatString: A snprintf wrapper that clamps the return value.
carb::extras::formatStringV: A vsnprintf wrapper that clamps the return value.
carb::extras::getAppPathAndName: Determines application path and name.
carb::extras::getCurrentProcessMemoryUsage: Retrieve the physical memory usage by the current process.
carb::extras::getDefaultLibraryExtension: Retrieves the default library file extension for the current platform.
carb::extras::getDefaultLibraryPrefix: Retrieves the default library file prefix for the current platform.
carb::extras::getDistroName: Retrieves the platform distro name.
carb::extras::getFriendlyMemorySize: Retrieves a friendly memory size and scale suffix for a given number of bytes.
carb::extras::getLastLoadLibraryError: Retrieves a string explaining the most recent library load failure cause.
carb::extras::getLibraryDirectory: Retrieves the parent directory of the library containing a given address or symbol.
carb::extras::getLibraryDirectoryByHandle: Retrieves the parent directory of a library.
carb::extras::getLibraryFilename: Retrieves the path for a loaded library from an address or symbol within it.
carb::extras::getLibraryFilenameByHandle: Retrieves the path for a loaded library from its handle.
carb::extras::getLibraryHandleByFilename: Attempts to retrieve a library’s handle by its filename.
carb::extras::getLibrarySymbol: Attempts to retrieve the address of a symbol from a loaded module.
carb::extras::getMemorySizeMultiplier: Retrieves the memory size multiplier from a value suffix.
carb::extras::getMemoryValueByName: Retrieves a memory value by its key name in ‘/proc/meminfo’ or other.
carb::extras::getPhysicalMemory: Retrieve the physical memory available on the system.
carb::extras::getStringFromMapOrEnvVar: Helper function that reads string value form the string map or the environment variable, if map doesn’t hold such key.
carb::extras::getSystemMemoryInfo: Retrieves the memory usage information for the system.
carb::extras::isDebuggerAttached: Checks if a debugger is attached to the calling process.
carb::extras::isMemoryOverlap: Check if two memory regions overlaps.
carb::extras::isRunningOnCentos: Checks whether the calling process is running on CentOS.
carb::extras::isRunningOnUbuntu: Checks whether the calling process is running on Ubuntu.
carb::extras::isStringPrefix: Test if one string is a prefix of the other.
carb::extras::isTestEnvironment: Queries whether the calling process is the Carbonite unit tests.
carb::extras::loadLibrary: Attempts to load a named library into the calling process.
carb::extras::operator!=: Tests inequality between carb::extras::HandleRef and
nullptr
.carb::extras::operator!=: Tests inequality between carb::extras::HandleRef and
nullptr
.carb::extras::operator==: Tests equality between carb::extras::HandleRef and
nullptr
.carb::extras::operator==: Tests equality between carb::extras::HandleRef and
nullptr
.carb::extras::registerPathAlias: Registers a new path string alias for replacement with carb::extras::resolvePathAliases.
carb::extras::resolvePathAliases: Replaces path alias markers in a path with the full names.
carb::extras::unloadLibrary: Unloads a loaded library.
carb::extras::unregisterPathAlias: Unregisters a path string alias.
Typedefs¶
carb::extras::LibraryFlags: Base type for the flags to control how libraries are loaded.
carb::extras::LibraryHandle: Handle to a loaded library.
carb::extras::ScopedHandleRef: Deprecated: Use carb::extras::HandleRef instead.
Variables¶
carb::extras::fLibFlagMakeFullLibName: Flag to indicate that only the module’s base name was given and that the full name should be constructed using carb::extras::createLibraryNameForModule before attempting to load the library.