![]() |
Murl Engine API
Version 2025.1
|
Forward to C-runtime library functions. More...
Typedefs | |
| using | Murl::System::CLib::CompareFunctionType = SInt32(*)(const void *source1, const void *source2) |
| Definition of the compare function. More... | |
Functions | |
| String | Murl::System::CLib::PrintToString (const Char *format,...) |
| Print formatted variadic arguments into string. More... | |
| String | Murl::System::CLib::PrintToStringArg (const Char *format, void *vaListPtr) |
| Print formatted variadic arguments into string. More... | |
| SInt32 | Murl::System::CLib::PrintToDebug (const Char *format,...) |
| Print formatted variadic arguments to the system specific debug output. More... | |
| SInt32 | Murl::System::CLib::PrintToError (const Char *format,...) |
| Print formatted variadic arguments to the system specific error output. More... | |
| SInt32 | Murl::System::CLib::PrintToWarning (const Char *format,...) |
| Print formatted variadic arguments to the system specific warning output. More... | |
| SInt32 | Murl::System::CLib::PrintToCString (Char *targetString, UInt32 targetLength, const Char *format,...) |
| Print formatted variadic arguments into a C-string. More... | |
| SInt32 | Murl::System::CLib::PrintToFile (const Char *fileName, const Char *format,...) |
| Print formatted variadic arguments to file. More... | |
| SInt32 | Murl::System::CLib::PrintToStdOut (const Char *format,...) |
| Print formatted variadic arguments to stdout. More... | |
| SInt32 | Murl::System::CLib::ScanString (const Char *stringToScan, const Char *format,...) |
| Scan formatted string into variadic arguments. More... | |
| void * | Murl::System::CLib::Alloc (UInt64 byteSize) |
| Allocate heap memory. More... | |
| void | Murl::System::CLib::Free (void *data) |
| Free allocated heap memory. More... | |
| void * | Murl::System::CLib::MemSet (void *destination, UInt32 value, UInt64 byteSize) |
| Fill memory with a value. More... | |
| void * | Murl::System::CLib::MemCopy (void *destination, const void *source, UInt64 byteSize) |
| Copy non-overlapping memory. More... | |
| void * | Murl::System::CLib::MemMove (void *destination, const void *source, UInt64 byteSize) |
| Copy overlapping memory. More... | |
| SInt32 | Murl::System::CLib::MemCompare (const void *source1, const void *source2, UInt64 byteSize) |
| Compare memory. More... | |
| void | Murl::System::CLib::QuickSort (void *items, UInt32 numberOfItems, UInt32 itemByteSize, CompareFunctionType compareFunction) |
| Quick sort items. More... | |
| void * | Murl::System::CLib::BinarySearch (const void *key, const void *items, UInt32 numberOfItems, UInt32 itemByteSize, CompareFunctionType compareFunction) |
| Binary search an item. More... | |
| void | Murl::System::CLib::SRand (UInt32 seed) |
| Seed the C-runtime library random number generator. More... | |
| SInt32 | Murl::System::CLib::Rand () |
| Get a random number form the C-runtime library random number generator. More... | |
| SInt32 | Murl::System::CLib::StrCmp (const Char *string1, const Char *string2) |
| Compare C-strings. More... | |
| UInt32 | Murl::System::CLib::StrLen (const Char *string) |
| Get the length of C-string. More... | |
| Bool | Murl::System::CLib::IsDigit (SInt32 characterCode) |
| Check if a character is a numeric character. More... | |
| Bool | Murl::System::CLib::IsAlpha (SInt32 characterCode) |
| Check if a character is an alphabetic character. More... | |
| Bool | Murl::System::CLib::IsAlphaNumeric (SInt32 characterCode) |
| Check if a character is an alphanumeric character. More... | |
| Bool | Murl::System::CLib::IsPunctuation (SInt32 characterCode) |
| Check if a character is a punctuation character. More... | |
| Bool | Murl::System::CLib::IsSpace (SInt32 characterCode) |
| Check if a character is a spacing character. More... | |
| Bool | Murl::System::CLib::IsHexDigit (SInt32 characterCode) |
| Check if a character is a hexadecimal character. More... | |
| Bool | Murl::System::CLib::IsControl (SInt32 characterCode) |
| Check if a character is a control character. More... | |
| String | Murl::System::CLib::GetNormalizedFileSystemPath (const Char *nativePath) |
| Get a normalized (UTF8) representation of a native file system path. More... | |
| String | Murl::System::CLib::GetNativeFileSystemPath (const Char *normalizedPath) |
| Get a native representation of a normalized (UTF8) file system path. More... | |
| Bool | Murl::System::CLib::FileExists (const Char *path) |
| Check if a file exists. More... | |
| Bool | Murl::System::CLib::DeleteFile (const Char *path) |
| Delete a file. More... | |
| Bool | Murl::System::CLib::MoveFile (const Char *oldPath, const Char *newPath) |
| Move/rename a file. More... | |
| Bool | Murl::System::CLib::FolderExists (const Char *path) |
| Check if a folder exists. More... | |
| Bool | Murl::System::CLib::CreateFolder (const Char *path) |
| Create a folder. More... | |
| Bool | Murl::System::CLib::DeleteFolder (const Char *path, Bool recursively) |
| Delete a folder. More... | |
| Bool | Murl::System::CLib::MoveFolder (const Char *oldPath, const Char *newPath) |
| Move/rename a folder. More... | |
| Bool | Murl::System::CLib::GetItemCreationTime (const Char *path, UInt64 &seconds, UInt64 &nanoSeconds) |
| Get the creation time of a file or folder. More... | |
| Bool | Murl::System::CLib::GetItemModificationTime (const Char *path, UInt64 &seconds, UInt64 &nanoSeconds) |
| Get the time a file or folder was most recently modified. More... | |
| SInt32 | Murl::System::CLib::LaunchShellCommand (const Char *commandLine) |
| Launch a shell command if supported by the platform. More... | |
| void | Murl::System::CLib::Abort () |
| Call the C-runtime abort function. | |
| void | Murl::System::CLib::Exit (SInt32 exitCode) |
| Call the C-runtime exit function. More... | |
Forward to C-runtime library functions.
| using Murl::System::CLib::CompareFunctionType = typedef SInt32(*)(const void* source1, const void* source2) |
Definition of the compare function.
| source1 | Pointer to the 1st source. |
| source2 | Pointer to the 2nd source. |
Print formatted variadic arguments into string.
| format | The format string. |
| ... | The variadic arguments. |
Print formatted variadic arguments into string.
| format | The format string. |
| vaListPtr | Pointer to the variadic arguments. |
Print formatted variadic arguments to the system specific debug output.
| format | The format string. |
| ... | The variadic arguments. |
Print formatted variadic arguments to the system specific error output.
| format | The format string. |
| ... | The variadic arguments. |
Print formatted variadic arguments to the system specific warning output.
| format | The format string. |
| ... | The variadic arguments. |
| SInt32 Murl::System::CLib::PrintToCString | ( | Char * | targetString, |
| UInt32 | targetLength, | ||
| const Char * | format, | ||
| ... | |||
| ) |
Print formatted variadic arguments into a C-string.
| targetString | The C-string to print into. |
| targetLength | The byte length of the C-string to print into. |
| format | The format string. |
| ... | The variadic arguments. |
Print formatted variadic arguments to file.
The printed string is appended to the file.
| fileName | The file name to print into. |
| format | The format string. |
| ... | The variadic arguments. |
Print formatted variadic arguments to stdout.
| format | The format string. |
| ... | The variadic arguments. |
Scan formatted string into variadic arguments.
| stringToScan | The string to scan. |
| format | The format string. |
| ... | The variadic arguments. |
| void* Murl::System::CLib::Alloc | ( | UInt64 | byteSize | ) |
Allocate heap memory.
| byteSize | The number of bytes to allocate. |
| void Murl::System::CLib::Free | ( | void * | data | ) |
Free allocated heap memory.
| data | The pointer to the allocated memory. |
Fill memory with a value.
| destination | Pointer to the destination memory. |
| value | The byte-value to fill the memory. |
| byteSize | The number of bytes to fill. |
| void* Murl::System::CLib::MemCopy | ( | void * | destination, |
| const void * | source, | ||
| UInt64 | byteSize | ||
| ) |
Copy non-overlapping memory.
Use MemMove if the memory areas do overlap.
| destination | Pointer to the destination memory. |
| source | Pointer to the source memory. |
| byteSize | The number of bytes to copy. |
| void* Murl::System::CLib::MemMove | ( | void * | destination, |
| const void * | source, | ||
| UInt64 | byteSize | ||
| ) |
Copy overlapping memory.
| destination | Pointer to the destination memory. |
| source | Pointer to the source memory. |
| byteSize | The number of bytes to copy. |
| SInt32 Murl::System::CLib::MemCompare | ( | const void * | source1, |
| const void * | source2, | ||
| UInt64 | byteSize | ||
| ) |
Compare memory.
| source1 | Pointer to the 1st source memory. |
| source2 | Pointer to the 2nd source memory. |
| byteSize | The number of bytes to compare. |
| void Murl::System::CLib::QuickSort | ( | void * | items, |
| UInt32 | numberOfItems, | ||
| UInt32 | itemByteSize, | ||
| CompareFunctionType | compareFunction | ||
| ) |
Quick sort items.
| items | Pointer to the items to sort. |
| numberOfItems | Number of items to sort. |
| itemByteSize | Bytesize of an item. |
| compareFunction | The CompareFunctionType for the item. |
| void* Murl::System::CLib::BinarySearch | ( | const void * | key, |
| const void * | items, | ||
| UInt32 | numberOfItems, | ||
| UInt32 | itemByteSize, | ||
| CompareFunctionType | compareFunction | ||
| ) |
Binary search an item.
The items to search for are required to be sorted.
| key | Pointer to the item to find. |
| items | Pointer to the items to search for. |
| numberOfItems | Number of items to search for. |
| itemByteSize | Bytesize of an item. |
| compareFunction | The CompareFunctionType for the item. |
| void Murl::System::CLib::SRand | ( | UInt32 | seed | ) |
Seed the C-runtime library random number generator.
| seed | The seed for the random number generator. |
| SInt32 Murl::System::CLib::Rand | ( | ) |
Get a random number form the C-runtime library random number generator.
Compare C-strings.
| string1 | Pointer to the 1st C-string. |
| string2 | Pointer to the 2nd C-string. |
Get the length of C-string.
| string | Pointer to the C-string. |
Check if a character is a numeric character.
| characterCode | The character to check. |
Check if a character is an alphabetic character.
| characterCode | The character to check. |
Check if a character is an alphanumeric character.
| characterCode | The character to check. |
Check if a character is a punctuation character.
| characterCode | The character to check. |
Check if a character is a spacing character.
| characterCode | The character to check. |
Check if a character is a hexadecimal character.
| characterCode | The character to check. |
Check if a character is a control character.
| characterCode | The character to check. |
Get a normalized (UTF8) representation of a native file system path.
| nativePath | The file system path in its native representation. |
Get a native representation of a normalized (UTF8) file system path.
| normalizedPath | The file system path in its normalized representation. |
Check if a file exists.
| path | The path and the filename. |
Delete a file.
| path | The path to the file to delete. |
Move/rename a file.
| oldPath | The current path to the file to move. |
| newPath | The new path of the file. |
Check if a folder exists.
| path | The path and the folder. |
Create a folder.
| path | The path and the folder to create. |
Delete a folder.
| path | The path and the folder to delete. |
| recursively | If true, the folder and all contents are deleted. If false, the function fails when the folder is not empty. |
Move/rename a folder.
| oldPath | The current path to the folder to move. |
| newPath | The new path of the folder. |
| Bool Murl::System::CLib::GetItemCreationTime | ( | const Char * | path, |
| UInt64 & | seconds, | ||
| UInt64 & | nanoSeconds | ||
| ) |
Get the creation time of a file or folder.
Note: explicit item creation time is not available on all platforms, e.g. Android, Linux or emscripten. In this case, false is returned.
| path | The path to the file or folder to query. |
| seconds | A reference to an UInt64 value to receive the seconds part. |
| nanoSeconds | A reference to an UInt64 value to receive the nanoseconds part. |
| Bool Murl::System::CLib::GetItemModificationTime | ( | const Char * | path, |
| UInt64 & | seconds, | ||
| UInt64 & | nanoSeconds | ||
| ) |
Get the time a file or folder was most recently modified.
| path | The path to the file or folder to query. |
| seconds | A reference to an UInt64 value to receive the seconds part. |
| nanoSeconds | A reference to an UInt64 value to receive the nanoseconds part. |
Launch a shell command if supported by the platform.
Internally, this calls the CLib std::system function.
| commandLine | The shell command line, including any parameters. |
| void Murl::System::CLib::Exit | ( | SInt32 | exitCode | ) |
Call the C-runtime exit function.
On iOS this function does nothing.
| exitCode | The exit code. |