Primordial Machine's Core Library
Primordial Machine's Core Library is a C library. The library has the following four objectives:
- protect developers from compilation and execution environment idiosyncracies and enables cross-platform development
- provide developers with a framework (code and patterns) for object-oriented programming and concurrent programming as well as error handling and resolution in order to create maintainable, re-usable, efficient, and safe programs in the C language.
- provide developers implement functionality on top of the aforementioned framework that is dearly missed when writing programs in the C language. This functionality includes (but is not restricted to) UTF-8 string representations and operations, code annotations, memory management, data structures (array lists, hash maps, etc.), mathematics, safe arithmetic.
The library emphasizes error-safety for embedding programs: that is, when used as intended, it will never never simply terminate upon an failure and always either resolve or propagate errors.
Core_ApplicationMessage
Signature
typedef struct Core_ApplicationMessage Core_ApplicationMessage;
Extends
Description
A message pertaining to an Application.
Core_ApplicationMessage_create
Signature
Core_Result Core_ApplicationMessage_create(Core_ApplicationMessage** RETURN, Core_ApplicationMessageKind kind);
Description
Create a Core_ApplicationMessage
object.
Parameters
RETURN | Core_ApplicationMessage** | A pointer to a Core_ApplicationMessage* variable. |
kind | Core_ApplicationMessageKind | The kind of this application message. |
Success
*RETURN
was assigned a pointer to the Core_ApplicationMessage
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_ApplicationMessageKind
Signature
typedef enum Core_ApplicationMessageKind <implementation> Core_ApplicationMessageKind;
Description
An enumeration of kinds of application messages.
Elements
Core_ApplicationMessageKind_QuitRequested | Kind of canvas state changed message. |
Core_Assets_Ref
Signature
typedef struct Core_Assets_Ref Core_Assets_Ref;
Extends
Description
A reference to an asset definition.
Core_AudialsBackend
Signature
#define Core_AudialsBackend <implementation>
Description
Symbolic constant denoting the audials backend this library was compiled for.It is always defined as one of the Core_AudialsBackend_*
constants.
Core_AudialsBackend_OpenAl
Signature
#define Core_Visuals_OpenAl <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of all other Core_AudialsBackend_*
symbolic constants.The symbolic constant denotes the OPENAL audials backend.
Core_Boolean
Signature
typedef <implementation> Core_Boolean;
Description
A type with two values Core_True
and Core_False
indicating logically true and logically value, respectively.
Core_ceil
Signature
Core_Result Core_ceil<Suffix>(<Type>* RETURN, <Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Description
Computes the smallest integer value not less than x
.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
x | <Type> | A value. |
Success
*RETURN
was assigned the smallest integer value not less than x
.
±∞
and ±0
are returned unmodified.
NaN
is returned if a value is NaN
.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_clearBits
Signature
Core_Result Core_clearBits<Suffix>(<Type>* RETURN, Core_Size i, Core_Size n);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
Description
Clear bits.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
v | <Type> | The value. |
i | Core_Size | The index of the Bit in the range [i, i + n). |
n | Core_Size | The number of Bits in the range [i, i + n). |
Success
*RETURN
was assigned the value x
with the Bits [i, i + n)
all 0
.
Errors
| RETURN is a null pointer. |
| i is greater than the width of the type minus one. |
| i + n is greater than the width of the type. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_combineHashes
Signature
Core_Result Core_combineHashes(Core_Size* RETURN, Core_Size x, Core_Size x);
Description
Combine hash values.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
x | Core_Size | The first hash value. |
y | Core_Size | The second hash value. |
Success
*RETURN
was assigned the combination of the hash value x
and the hash values y
.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Compiler_C
Signature
#define Core_Compiler_C <implementation>
Description
Symbolic constant denoting the C compiler used for compiling this library.Is defined to one of the Core_Compiler_C_*
constants.
Core_Compiler_C_Clang
Signature
#define Core_Compiler_C_Clang <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_C_*
symbolic constants.The symbolic constant denotes the CLANG C compiler.
Core_Compiler_C_Gcc
Signature
#define Core_Compiler_C_Gcc <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_C_*
symbolic constants.The symbolic constant denotes the GCC C compiler.
Core_Compiler_C_Msvc
Signature
#define Core_Failure <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_C_*
symbolic constants.The symbolic constant denotes the MSVC C compiler.
Core_Compiler_Cpp
Signature
#define Core_Compiler_Cpp <implementation>
Description
Symbolic constant denoting the C++ compiler used for compiling this library.Is defined to one of the Core_Compiler_Cpp_*
constants.
Core_Compiler_Cpp_Clang
Signature
#define Core_Compiler_Cpp_Clang <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_Cpp_*
symbolic constants.The symbolic constant denotes the CLANG C++ compiler.
Core_Compiler_Cpp_Gcc
Signature
#define Core_Compiler_Cpp_Gcc <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_Cpp_*
symbolic constants.The symbolic constant denotes the GCC C++ compiler.
Core_Compiler_Cpp_Msvc
Signature
#define Core_Compiler_Cpp_Msvc <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_Cpp_*
symbolic constants.The symbolic constant denotes the MSVC C++ compiler.
Core_convertStringTo
Signature
Core_Result Core_convertStringTo<Suffix>(<Type>* RETURN, Core_Natural8 const* p, Core_Size n);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
I8 | Core_Integer8 |
I16 | Core_Integer16 |
I32 | Core_Integer32 |
I64 | Core_Integer64 |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
Sz | Core_Size |
R32 | Core_Real32 |
R64 | Core_Real64 |
B | Core_Boolean |
Description
Convert a UTF-8 Byte sequence into a value.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
p | Core_Natural8 const* | A pointer to a valid UTF-8 Byte sequence. |
n | Core_Size | The number of Bytes in the UTF-8 Byte sequence pointed to by p . |
Success
*RETURN
was assigned the value represented by the UTF-8 Byte sequence.
Errors
| RETURN is a null pointer. |
| p is a null pointer. |
| The Byte sequence pointed to by p is not a UTF-8 Byte sequence. |
| The UTF-8 Byte sequence does not represent a value of the specified type. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_cos
Signature
Core_Result Core_cos<Suffix>(<Type>* RETURN, <Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Description
Computes the cosine value of the value x
.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable |
Success
*RETURN
was assigned the cosine value of the value x
.
Errors
| RETURN is a null pointer |
| x is ±∞ or NaN |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_countLeadingZeroes
Signature
Core_Result Core_countLeadingZeroes<Suffix>(Core_Size* RETURN, <&Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8n |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
Sz | Core_Size |
Description
Compute the number of leading zeroes in the binary representation of the specified value.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
x | <Type> | The value. |
Success
*RETURN
was assigned the number of leading zeroes in the binary representation of the value x
.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_createDirectoryFile
Signature
Core_Result Core_createDirectoryFile(Core_String* path);
Description
Delete a directory file.The path to the ancestor directory must exist for this function to succeed.
Parameters
path | Core_String* | The path of the directory file. |
Success
The directory file was created.
Errors
| path is a null pointer. |
| The directory file was not found. |
| Deleting the directory file failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_deleteDirectoryFile
Signature
Core_Result Core_deleteDirectoryFile(Core_String* path);
Description
Delete a directory file.The directory must be empty for this function to succeed.
Parameters
path | Core_String* | The path of the directory file. |
Success
The directory file was deleted.
Errors
| path is a null pointer. |
| The directory file was not found. |
| Deleting the directory file failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_deleteRegularFile
Signature
Core_Result Core_deleteRegularFile(Core_String* path);
Description
Delete a regular file.
Parameters
path | Core_String* | The path of the regular file. |
Success
The regular file was deleted.
Errors
| path is a null pointer. |
| The regular file was not found. |
| Deleting the regular file failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_EmitMessage
Signature
typedef struct Core_EmitMessage Core_EmitMessage;
Extends
Description
A message that emits text to the Default Emission Channel.
Core_EmitMessage_create
Signature
Core_Result Core_EmitMessage_create(Core_EmitMessage** RETURN, Core_ApplicationMessageKind kind);
Description
Create a Core_EmitMessage
object.
Parameters
RETURN | Core_EmitMessage** | A pointer to a Core_EmitMessage* variable. |
message | Core_String* | The message to emit. |
Success
*RETURN
was assigned a pointer to the Core_EmitMessage
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | message is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Error
Signature
typedef <implementation> Core_Error;
Description
Integer type of error values.
Core_Error_AllocationFailed
Signature
#define Core_Error_AllocationFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an allocation failed. The value is guaranteed to be a non-zero value.
Core_Error_ArgumentInvalid
Signature
#define Core_Error_ArgumentInvalid <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an argument is invalid. The value is guaranteed to be a non-zero value.
Core_Error_ConversionFailed
Signature
#define Core_Error_ConversionFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that a conversion failed. The value is guaranteed to be a non-zero value.
Core_Error_DecodingFailed
Signature
#define Core_Error_DecodingFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that a decoding failed. The value is guaranteed to be a non-zero value.
Core_Error_Empty
Signature
#define Core_Error_Empty <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was empty (but should not have been empty). The value is guaranteed to be a non-zero value.
Core_Error_EncodingFailed
Signature
#define Core_Error_EncodingFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an encoding failed. The value is guaranteed to be a non-zero value.
Core_Error_EnvironmentFailed
Signature
#define Core_Error_EnvironmentFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that the executing environment failed. The value is guaranteed to be a non-zero value.
Core_Error_Exists
Signature
#define Core_Error_Exists <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something existed (but should not have existed). The value is guaranteed to be a non-zero value.
Core_Error_Found
Signature
#define Core_Error_Found <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates a failure because something was found (but should not have been found). The value is guaranteed to be a non-zero value.
Core_Error_Initialized
Signature
#define Core_Error_Initialized <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was initialized (but should not have been initialized). The value is guaranteed to be a non-zero value.
Core_Error_LexicalAnalysisFailed
Signature
#define Core_Error_LexicalAnalysisFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that a lexical analysis failed. The value is guaranteed to be a non-zero value.
Core_Error_NoError
Signature
#define Core_Error_NoError <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that no error occurred. The value is guaranteed to be a zero value.
Core_Error_NotEmpty
Signature
#define Core_Error_NotEmpty <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was not empty (but should have been empty). The value is guaranteed to be a non-zero value.
Core_Error_NotExists
Signature
#define Core_Error_NotExists <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something did not exist (but should have existed). The value is guaranteed to be a non-zero value.
Core_Error_NotFound
Signature
#define Core_Error_NotFound <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates a failure because something was not found (but should have been found). The value is guaranteed to be a non-zero value.
Core_Error_NotImplemented
Signature
#define Core_Error_NotImplemented <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates a failure because something was not implemented. The value is guaranteed to be a non-zero value.
Core_Error_NotInitialized
Signature
#define Core_Error_NotInitialized <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was not initialized (but should have been initialized). The value is guaranteed to be a non-zero value.
Core_Error_NumericOverflow
Signature
#define Core_Error_NumericOverflow <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates a failure because of a numeric overflow. The value is guaranteed to be a non-zero value.
Core_Error_OperationInvalid
Signature
#define Core_Error_OperationInvalid <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an operation is invalid. The value is guaranteed to be a non-zero value.
Core_Error_SemanticalAnalysisFailed
Signature
#define Core_Error_SemanticalError <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that a semantical analysis failed. The value is guaranteed to be a non-zero value.
Core_Error_SyntacticalAnalysisFailed
Signature
#define Core_Error_SyntacticalAnalysisFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that a syntactical analysis failed. The value is guaranteed to be a non-zero value.
Core_Error_TestFailed
Signature
#define Core_Error_TestFailed <implementation>
Description
Symbolic constant for a Core_Error value. That value indicates that an an error occurred because a test failed. The value is guaranteed to be a non-zero value.
Core_ExistingFilePolicy
Signature
typedef enum Core_ExistingFilePolicy <implementation> Core_ExistingFilePolicy;
Description
An enumeration of policies for opening a file in case of that the file exists.The enumeration elements cannot be combined.
Elements
Core_ExistingFilePolicy_Retain | Retain the file contents. |
Core_ExistingFilePolicy_Truncate | Truncate the file contants. |
Core_Failure
Signature
#define Core_Failure <implementation>
Description
Symbolic constant for a non-zero value of type Core_Result indicating failure.
Core_False
Signature
#define Core_False <implementation>
Description
One of the two values of the type Core_Boolean indicating logically false.
Core_FileAccessMode
Signature
typedef enum Core_FileAccessMode <implementation> Core_FileAccessMode;
Description
An enumeration of file access modes.The enumeration elements can be combined.
Elements
Core_FileAccessMode_Read | Read access. Can be combined with Core_FileAccessMode_Write . |
Core_FileAccessMode_Write | Write access. Can be combined with Core_FileAccessMode_Read . |
Core_FileAccessMode_ReadWrite | Read and write access. Alias for Core_FileAccessMode_Read|Core_FileAccessMode_Write and for Core_FileAccessMode_WriteRead . |
Core_FileAccessMode_WriteRead | Write and read access. Alias for Core_FileAccessMode_Write|Core_FileAccessMode_Read and for Core_FileAccessMode_ReadWrite . |
Core_FileType
Signature
typedef enum Core_FileType <implementation> Core_FileType;
Description
An enumeration of file types.The enumeration elements cannot be combined.
Elements
Core_FileType_Directory | A file is a directory file. |
Core_FileType_Regular | A file is a regular file. |
Core_floor
Signature
Core_Result Core_floor<Suffix>(<Type>* RETURN, <Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Description
Computes the greatest integer value not greater than x
.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
x | <Type> | A value. |
Success
*RETURN
was greatest integer value not greater than x
.
±∞
and ±0
are returned unmodified.
NaN
is returned if a value is NaN
.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_getError
Signature
Core_Error Core_getError();
Description
Get the value of the by-thread error variable.
Success
This function cannot fail.
Return
The value of the by-thread error variable.
Remarks
The initial value is Core_Error_NoError
.
Core_getFileContents
Signature
Core_Result Core_getFileContents(Core_String* path, void **bytes, Core_Size *numberOfBytes);
Description
Get the contents of a file.
Parameters
path | Core_String* | The path of the file. |
bytes | Core_Natural8** | A pointer to a Core_Natural* variable. |
numberOfBytes | Core_Size* | A pointer to a Core_Size variable. |
Success
*bytes
was assigned an array of Core_Natural8
values representing the contents of the file.
*numberOfBytes
was assigned the length of that array.
Errors
| path is a null pointer. |
| bytes is a null pointer. |
| numberOfBytes is a null pointer. |
| The environment failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_getFileType
Signature
Core_Result Core_getFileType(Core_FileType* RETURN, Core_String* path);
Description
Get the file type of a file.
Parameters
RETURN | Core_FileType | A pointer to a Core_FileType variable. |
path | Core_String* | The path of the file. |
Success
*RETURN
was assigned the file type of the file.
Errors
| RETURN is a null pointer. |
| path is a null pointer. |
| path is not a valid path. |
| The environment failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_getNow
Signature
Core_Result Core_getNow(Core_Natural64* RETURN);
Description
Retrieves the number of milliseconds that have elapsed since the system was started.
Parameters
RETURN | Core_Natural64* | A pointer to a Core_Natural64 variable. |
Success
*RETURN
was assigned the number of milliseconds that have elapsed since the system was started.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_getNumberOfCores
Signature
Core_Result Core_getNumbeOfCores(Core_Size* RETURN);
Description
Get the number of CPU cores of the executing target environment.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable |
Success
*RETURN
was assigned the number of CPU cores.
Errors
| RETURN is a null pointer |
| the executing target environment failed |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_getPageSize
Signature
Core_Result Core_getPageSize(Core_Size* RETURN);
Description
Get the memory page size of the executing target environment.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable |
Success
*RETURN
was assigned the *RETURN
was assigned the memory page size.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer |
Core_Error_EnvironmentFailed | the executing target environment failed |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_hash
Signature
Core_Result Core_hash<Suffix>(Core_Size* RETURN, <Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
B | Core_Boolean |
R32 | Core_Real32 |
R64 | Core_Real64 |
Sz | Core_Size |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
I8 | Core_Integer8 |
I16 | Core_Integer16 |
I32 | Core_Integer32 |
I64 | Core_Integer64 |
Description
Computes the hash value of the value x
.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable |
x | <Type> | The value to be hashed. |
Success
*RETURN
was assigned the hash value of the value x
.
The positive zero and the negative zero both hash to the same value.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_hashBytes
Signature
Core_Result Core_hashBytes(Core_Size* RETURN, void *p, Core_Size n);
Description
Computes the hash value of the value x
.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
p | void* | A pointer to an array of n Bytes. |
n | Core_Size | The length, in Bytes, of the array pointed to by p . May be 0 . |
Success
*RETURN
was assigned the hash value of the value x
.
Errors
| RETURN is a null pointer |
| p is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_hashPointer
Signature
Core_Result Core_hashPointer(Core_Size* RETURN, void const*x);
Description
Computes the hash value of the value x
.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
x | void const* | The pointer to be hashed. May be the null pointer. |
Success
*RETURN
was assigned the hash value of the value x
.
Errors
| RETURN is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayDeque
Signature
typedef struct Core_InlineArrayDeque<Suffix> Core_InlineArrayDeque<Suffix>;
where <Suffix>
and <Suffix>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
A dynamic deque with elements of type <Type>
. An array-like data structure is used underneath.
Core_InlineArrayDeque_AddedCallback
Signature
typedef void (Core_InlineArrayDeque<Suffix>_AddedCallback)(Core_InlineArrayDeque<Suffix>_Element* element);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
Callback invoked when an object was added to a Core_InlineArrayDeque<Suffix>
object.
Core_InlineArrayDeque_clear
Signature
Core_Result Core_InlineArrayDeque<Suffix>_clear(Core_InlineArrayDeque<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Remove all elements.
Parameters
SELF | Core_InlineArrayDeque<Suffix>* | A pointer to a Core_InlineArrayDeque<Suffix> object. |
Success
All elements were removed from this Core_InlineArrayDeque<Suffix>
object.
Consequently, the size of the Core_InlineArrayDeque<Suffix>
object is zero.
If a Core_InlineArrayDeque<Suffix>_ElementRemovedCallback
function is associated with this Core_InlineArrayDeque<Suffix>
object,
the function was invoked on each removed element exactly once.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayDeque_Element
Signature
typedef <implementation> Core_InlineArrayDeque<Suffix>_Element;
where <Suffix>
and <Suffix>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
The type of an element of a dynamic deque Core_InlineArrayDeque<Suffix>
.
Core_InlineArrayDeque_ensureFreeCapacity
Signature
Core_Result Core_InlineArrayDeque<Suffix>_ensureFreeCapacity(Core_InlineArrayDeque<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Ensure the free capacity is greater than or equal to a specified value.
Parameters
SELF | Core_InlineArrayDeque<Suffix>* | A pointer to a Core_InlineArrayDeque<Suffix> object. |
required | Core_Size | The required free capacity in elements. |
Success
The free capacity is at least required
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayDeque_getCapacity
Signature
Core_Result Core_InlineArrayDeque<Suffix>_getCapacity(Core_Size* RETURN, Core_InlineArrayDeque<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Get the capacity, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineArrayDeque<Suffix>* | A pointer to a Core_InlineArray<Suffix> object. |
Success
*RETURN
was assigned the capacity, in elements, of this Core_InlineArrayDeque<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
or RETURN
is a null pointer.
Core_InlineArrayDeque_getFreeCapacity
Signature
Core_Result Core_InlineArrayDeque<Suffix>_getFreeCapacity(Core_Size* RETURN, Core_InlineArrayDeque<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Get the free capacity, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineArrayDeque<Suffix>* | A pointer to a Core_InlineArrayDeque<Suffix> object. |
Success
*RETURN
was assigned the free capacity, in elements, of this Core_InlineArrayDeque<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
or RETURN
is a null pointer.
Core_InlineArrayDeque_getSize
Signature
Core_Result Core_InlineArrayDeque<Suffix>_getSize(Core_Size* RETURN, Core_InlineArrayDeque<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Get the size, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineArrayDeque<Suffix>* | A pointer to a Core_InlineArrayDeque<Suffix> object. |
Success
*RETURN
was assigned the size, in elements, of this Core_InlineArrayDeque<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayDeque_increaseCapacity
Signature
Core_Result Core_InlineArrayDeque<Suffix>_increaseCapacity(Core_InlineArrayDeque<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Increase the capacity by a specified value.
Parameters
SELF | Core_InlineArrayDeque<Suffix>* | A pointer to a Core_InlineArrayDeque<Suffix> object. |
additional | Core_Size | The amount to increase the capacity by in elements. |
Success
The capacity was increased by at least additional
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayDeque_RemovedCallback
Signature
typedef void (Core_InlineArrayDeque<Suffix>_RemovedCallback)(Core_InlineArrayDeque<Suffix>_Element* element);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
Callback invoked when an object was removed from a Core_InlineArrayDeque<Suffix>
object.
Core_InlineArrayDeque_uninitialize
Signature
Core_Result Core_InlineArrayDeque<Suffix>_create(Core_InlineArrayDeque<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
Uninitialize a Core_InlineArrayDeque<Suffix>
object.
Parameters
SELF | Core_InlineArrayDeque<Suffix>* | A pointer to a Core_InlineArrayDeque<Suffix> object. |
Success
The Core_InlineArrayDeque<Suffix>
object was uninitialized.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
is a null pointer.The behavior is undefined if SELF
is not a null pointer but does not point to an initialized Core_InlineArrayDeque<Suffix>
object.
Core_InlineArrayList
Signature
typedef struct Core_InlineArrayList<Suffix> Core_InlineArrayList<Suffix>;
where <Suffix>
and <Suffix>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
A dynamic array with elements of type <Type>
.
Core_InlineArrayList_AddedCallback
Signature
typedef void (Core_InlineArrayList<Suffix>_AddedCallback)(Core_InlineArrayList<Suffix>_Element* element);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
Callback invoked when an object was added to a Core_InlineArrayList<Suffix>
object.
Core_InlineArrayList_append
Signature
Core_Result Core_InlineArrayList<Suffix>_append(Core_InlineArrayList<Suffix>* SELF, <Type> element);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Append an element.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
element | <Type> | The element to append. |
Success
The element was appended to this this Core_InlineArrayList<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_appendMany
Signature
Core_Result Core_InlineArrayList<Suffix>_appendMany(Core_InlineArrayList<Suffix>* SELF, <Type> const* elements, Core_Size numberOfElements);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Append elements.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
elements | <Type> const* | A pointer to an array of numberOfElements elements. |
numberOfElements | Core_InlineArrayList<Suffix>* | The number of elements to append. |
Success
The numberOfElements
elements in the array elements
were appended to this Core_InlineArrayList<Suffix;>
object.
The elements were appended in the order of their appearance in the array elements
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | elements is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_clear
Signature
Core_Result Core_InlineArrayList<Suffix>_clear(Core_InlineArrayList<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Remove all elements.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
Success
All elements were removed from this Core_InlineArrayList<Suffix>
object.
Consequently, the size of the Core_InlineArrayList<Suffix>
object is zero.
If a Core_InlineArrayList<Suffix>_ElementRemovedCallback
function is associated with this Core_InlineArrayList<Suffix>
object,
the function was invoked on each removed element exactly once.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayList_Configuration
Signature
typedef struct Core_InlineArrayList<Suffix>_Configuration Core_InlineArrayList<Suffix>_Configuration;
where <Suffix>
and <Suffix>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
A configuration for a Core_InlineArrayList<Suffix>
object.
Members
keyAddedCallback | Core_InlineArrayList<Suffix>_KeyAddedCallback* | A null pointer or a pointer to a Core_InlineArrayList<Suffix>_KeyAddedCallback function. |
valueRemovedCallback | Core_InlineArrayList<Suffix>_ValueRemovedCallback* | A null pointer or a pointer to a Core_InlineHa<Suffix>_KeyRemovedCallback function. |
Core_InlineArrayList_Element
Signature
typedef <implementation> Core_InlineArrayList<Suffix>_Element;
where <Suffix>
and <Suffix>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
The type of an element of a dynamic array Core_InlineArrayList<Suffix>
.
Core_InlineArrayList_ensureFreeCapacity
Signature
Core_Result Core_InlineArrayList<Suffix>_ensureFreeCapacity(Core_InlineArrayList<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Ensure the free capacity is greater than or equal to a specified value.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
required | Core_Size | The required free capacity in elements. |
Success
The free capacity is at least required
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_get
Signature
Core_Result Core_InlineArrayList<Suffix>_get(<Type;>* RETURN, Core_InlineArrayList<Suffix>* SELF, Core_Size index);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Get the element at an index.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
index | Core_Size | The index of the element. |
Success
*RETURN
was assigned the element at the specified index index
in this Core_InlineArrayList<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | index is greater than or equal to the size of this Core_InlineArrayList<Suffix> object. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayList_getCapacity
Signature
Core_Result Core_InlineArrayList<Suffix>_getCapacity(Core_Size* RETURN, Core_InlineArrayList<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Get the capacity, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
Success
*RETURN
was assigned the capacity, in elements, of this Core_InlineArrayList<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
or RETURN
is a null pointer.
Core_InlineArrayList_getFreeCapacity
Signature
Core_Result Core_InlineArrayList<Suffix>_getFreeCapacity(Core_Size* RETURN, Core_InlineArrayList<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Get the free capacity, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
Success
*RETURN
was assigned the free capacity, in elements, of this Core_InlineArrayList<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
or RETURN
is a null pointer.
Core_InlineArrayList_getSize
Signature
Core_Result Core_InlineArrayList<Suffix>_getSize(Core_Size* RETURN, Core_InlineArrayList<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Get the size, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
Success
*RETURN
was assigned the size, in elements, of this Core_InlineArrayList<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayList_increaseCapacity
Signature
Core_Result Core_InlineArrayList<Suffix>_increaseCapacity(Core_InlineArrayList<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Increase the capacity by a specified value.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
additional | Core_Size | The amount to increase the capacity by in elements. |
Success
The capacity was increased by at least additional
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_initialize
Signature
Core_Result Core_InlineArrayList<Suffix>_create(Core_InlineArrayList<Suffix>* SELF, Core_Size initialCapacity, Core_InlineArrayList<Suffix>_Configuration const* configuration);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
Initialize a Core_InlineArrayList<Suffix>
object.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
initialCapacity | Core_Size | The initial capacity of the array. Can be 0 . |
configuration | Core_InlineArrayList<Suffix>_Configuration const* | A pointer to a Core_InlineArrayList<Suffix>_Configuration object. Can be NULL . |
Success
The Core_InlineArrayList<Suffix>
object was initialized.
The object was initialized using the specified capacity and configuration.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_insert
Signature
Core_Result Core_InlineArrayList<Suffix>_insert(Core_InlineArrayList<Suffix>* SELF, Core_Size index, <Type> element);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Insert an element.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
index | Core_Size | The index at which to insert the element. |
element | <Type> | The element to append. |
Success
The element was inserted to this this Core_InlineArrayList<Suffix>
object at the specified index.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | index is greater than the size of this Core_InlineArrayList<Suffix> object . |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_insertMany
Signature
Core_Result Core_InlineArrayList<Suffix>_insertMany(Core_InlineArrayList<Suffix>* SELF, Core_Size index, <Type> const* elements, Core_Size numberOfElements);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Insert elements into this Core_InlineArrayList<Suffix>
object.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
index | Core_Size | The index at which to insert the element. |
elements | <Type> const* | A pointer to an array of numberOfElements elements. |
numberOfElements | Core_InlineArrayList<Suffix>* | The number of elements to append. |
Success
The numberOfElements
elements in the array elements
were appended to this Core_InlineArrayList<Suffix;>
object.
The elements were inserted in the order of their appearance in the array elements
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | elements is a null pointer. |
Core_Error_ArgumentInvalid | index is greater than the size of this Core_InlineArrayList<Suffix> object . |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_prepend
Signature
Core_Result Core_InlineArrayList<Suffix>_prepend(Core_InlineArrayList<Suffix>* SELF, <Type> element);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Prepend an element.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
element | <Type> | The element to prepend. |
Success
The element was prepended to this this Core_Inline_ArrayList<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_prependMany
Signature
Core_Result Core_InlineArray<Suffix>_prependMany(Core_InlineArrayList<Suffix>* SELF, <Type> const* elements, Core_Size numberOfElements);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Prepend elements.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
elements | <Type> const* | A pointer to an array of numberOfElements elements. |
numberOfElements | Core_InlineArrayList<Suffix>* | The number of elements to append. |
Success
The numberOfElements
elements in the array elements
were prepended to this Core_InlineArrayList<Suffix;>
object.
The elements were prepended in the order of their appearance in the array elements
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | elements is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineArrayList_RemovedCallback
Signature
typedef void (Core_InlineArrayList<Suffix>_RemovedCallback)(Core_InlineArrayList<Suffix>_Element* element);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
Callback invoked when an object was removed from a Core_InlineArrayList<Suffix>
object.
Core_InlineArrayList_removeMany
Signature
Core_Result Core_InlineArrayList<Suffix>_removeMany(Core_InlineArrayList<Suffix>* SELF, Core_Size start, Core_Size length);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Remove a range of elements.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
start | Core_Size | The starting index of the sequence of elements to remove. |
length | Core_Size | The length of the sequence of elements to remove. |
Success
The sequence of elements [start, length)
was from this Core_InlineArrayList<Suffix>
object.
Consequently, the size of the Core_InlineArrayList<Suffix>
object is reduced by length
.
If a Core_InlineArrayList<Suffix>_ElementRemovedCallback
function is associated with this Core_InlineArrayList<Suffix>
object,
the function was invoked on each removed element exactly once.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | index + length is greater than the size of this Core_InlineArrayList<Suffix> object. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayList_removeManyBack
Signature
Core_Result Core_InlineArrayList<Suffix>_removeManyBack(Core_InlineArrayList<Suffix>* SELF, Core_Size length);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Remove a range of elements from the back.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
length | Core_Size | The length of the sequence of elements to remove. |
Success
The sequence of elements [size, size - length)
was removed from this Core_InlineArrayList<Suffix>
object (where size
is the size of this Core_InlineArrayList<Suffix>
object).
Consequently, the size of the Core_InlineArrayList<Suffix>
object is reduced by length
.
If a Core_InlineArrayList<Suffix>_ElementRemovedCallback
function is associated with this Core_InlineArrayList<Suffix>
object,
the function was invoked on each removed element exactly once.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | length is greater than the size of this Core_InlineArrayList<Suffix> object. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayList_removeManyFront
Signature
Core_Result Core_InlineArrayList<Suffix>_removeManyFront(Core_InlineArrayList<Suffix>* SELF, Core_Size length);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
P | void* |
Description
Remove a range of elements from the front.
Parameters
SELF | Core_InlineArrayList<Suffix>* | A pointer to a Core_InlineArrayList<Suffix> object. |
length | Core_Size | The length of the sequence of elements to remove. |
Success
The sequence of elements [0, length)
was removed from this Core_InlineArrayList<Suffix>
object.
Consequently, the size of the Core_InlineArrayList<Suffix>
object is reduced by length
.
If a Core_InlineArrayList<Suffix>_ElementRemovedCallback
function is associated with this Core_InlineArrayList<Suffix>
object,
the function was invoked on each removed element exactly once.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | length is greater than the size of this Core_InlineArrayList<Suffix> object. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineArrayList_uninitialize
Signature
Core_Result Core_InlineArrayList<Suffix>_create(Core_InlineArrayList<Suffix>* SELF);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
Description
Uninitialize a Core_InlineArrayList<Suffix>
object.
Parameters
SELF | Core_InlineArray<Suffix>* | A pointer to a Core_InlineArray<Suffix> object. |
Success
The Core_InlineArray<Suffix>
object was uninitialized.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
is a null pointer.The behavior is undefined if SELF
is not a null pointer but does not point to an initialized Core_InlineArrayList<Suffix>
object.
Core_InlineHashMap
Signature
typedef struct Core_InlineHashMap<Suffix> Core_InlineHashMap<Suffix>;
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of an inline hashmap.
Core_InlineHashMap_clear
Signature
Core_Result Core_InlineHashMap<Suffix>_clear(Core_InlineHashMap<Suffix>* SELF);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
Remove all elements.
Parameters
SELF | Core_InlineHashMap<Suffix>* | A pointer to a Core_InlineHashMap<Suffix> object. |
Success
All elements were removed from this Core_InlineHashMap<Suffix>
object.
Consequently, the size of the Core_InlineHashMap<Suffix>
object is zero.
If a Core_InlineHashMap<Suffix>_ElementRemovedCallback
function is associated with this Core_InlineHashMap<Suffix>
object,
the function was invoked on each removed element exactly once.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineHashMap_CompareKeysCallback
Signature
typedef Core_Result (Core_InlineHashMap<Suffix>_CompareKeysCallback)(Core_Boolean*, Core_InlineHashMap<Suffix>_Key*, Core_InlineHashMap<Suffix>_Key*);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a callback invoked to compare two keys.
Parameters
RETURN | Core_Boolean* | A pointer to a Core_Boolean variable. |
x | Core_InlineHashMap<Suffix>_Key* | A pointer to a Core_InlineHashMap<Suffix>_Key value. |
y | Core_InlineHashMap<Suffix>_Key* | A pointer to a Core_InlineHashMap<Suffix>_Key value. |
Success
*RETURN
was assigned Core_True
if the keys are equal and Core_False
otherwise.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | x is a null pointer. |
Core_Error_ArgumentInvalid | y is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineHashMap_Configuration
Signature
typedef struct Core_InlineHashMapSuffix>_Configuration Core_InlineHashMapSuffix>_Configuration;
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
A configuration for a Core_InlineHashMap<Suffix>
object.
Members
keyAddedCallback | Core_InlineHashMapSuffix>_KeyAddedCallback* | A null pointer or a pointer to a Core_InlineHashMapSuffix>_KeyAddedCallback function. |
keyRemovedCallback | Core_InlineHashMap<Suffix>_KeyRemovedCallback* | A null pointer or a pointer to a Core_InlineHashMap<Suffix>_KeyRemovedCallback function. |
valueAddedCallback | Core_InlineHashMapSuffix>_ValueAddedCallback* | A null pointer or a pointer to a Core_InlineHashMapSuffix>_ValueAddedCallback function. |
valueRemovedCallback | Core_InlineHashMapSuffix>_ValueRemovedCallback* | A null pointer or a pointer to a Core_InlineHashMapSuffix>_ValueRemovedCallback function. |
hashKeyCallback | Core_InlineHashMap<Suffix>_HashKeyCallback* | A pointer to a Core_InlineHashMap<Suffix>_HashKeyCallback function. |
compareKeysCallback | Core_InlineHashMap<Suffix>_CompareKeysCallback* | A pointer to a Core_InlineHashMap<Suffix>_CompareKeysCallback function. |
Core_InlineHashMap_get
Signature
Core_Result Core_InlineHashMap<Suffix>_get(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
Get the value of an entry.
Parameters
RETURN | Core_InlineHashMap<Suffix>_Value* | A pointer to a Core_InlineHashMap<Suffix>_Value variable. |
SELF | Core_InlineHashMap<Suffix>* | A pointer to a Core_InlineHashMap<Suffix> object. |
key | Core_InlineHashMap<Suffix>_Key* | The key. |
Success
*RETURN
was assigned value.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_NotFound | The entry does not exist. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineHashMap_getCapacity
Signature
Core_Result Core_InlineHashMap<Suffix>_getCapacity(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
Get the capacity, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineHashMap<Suffix>* | A pointer to a Core_InlineHashMap<Suffix> object. |
Success
*RETURN
was assigned the capacity, in elements, of this Core_InlineHashMap<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
or RETURN
is a null pointer.
Core_InlineHashMap_getFreeCapacity
Signature
Core_Result Core_InlineHashMap<Suffix>_getFreeCapacity(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
Get the free capacity, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineHashMap<Suffix>* | A pointer to a Core_InlineHashMap<Suffix> object. |
Success
*RETURN
was assigned the free capacity, in elements, of this Core_InlineHashMap<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
or RETURN
is a null pointer.
Core_InlineHashMap_getSize
Signature
Core_Result Core_InlineHashMap<Suffix>_getSize(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);
where <KeySuffix>
<ValueSuffix>
of P
.
Description
Get the size, in elements.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_InlineHashMap<Suffix>* | A pointer to a Core_InlineHashMap<Suffix> object. |
Success
*RETURN
was assigned the size, in elements, of this Core_InlineHashMap<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineHashMap_HashKeyCallback
Signature
typedef Core_Result (Core_InlineHashMap<Suffix>_KeyAddedCallback)(Core_Size* RETURN, Core_InlineHashMap<Suffix>_Key* x);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a callback invoked to get the hash value for a key.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
x | Core_InlineHashMap<Suffix>_Key* | A pointer to a Core_InlineHashMap<Suffix>_Key value. |
Success
*RETURN
was assigned the hash value of the key.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | x is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InlineHashMap_Key
Signature
typedef /*Implementation*/ Core_InlineMap<Suffix>_Key;
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a key stored in a Core_InlineHashMap
.
Core_InlineHashMap_KeyAddedCallback
Signature
typedef void (Core_InlineHashMap<Suffix>_KeyAddedCallback)(Core_InlineHashMap<Suffix>_Key*);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a callback invoked if a key is added to an inline pointer hash map.
Parameters
key | Core_InlineHashMap<Suffix>_Key* | A pointer to a Core_InlineHashMap<Suffix>_Key value. |
Core_InlineHashMap_KeyRemovedCallback
Signature
typedef void (Core_InlineHashMap<Suffix>_KeyRemovedCallback)(Core_InlineHashMap<Suffix>_Key* key);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a callback invoked if a key is removed from an inline pointer hash map.
Parameters
key | Core_InlineHashMap<Suffix>_Key* | A pointer to a Core_InlineHashMap<Suffix>_Key value. |
Core_InlineHashMap_set
Signature
Core_Result Core_InlineHashMap<Suffix>_set(Core_InlineHashMap<Suffix>* SELF, Core_InlineHashMap<Suffix>_Key key, Core_InlineHashMap<Suffix>_Value value);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
Add or update an entry in this hash map.
Parameters
SELF | Core_InlineHashMap<Suffix>* | A pointer to a Core_InlineHashMap<Suffix> object. |
key | Core_InlineHashMap_Key<Suffix> | The key. |
value | Core_InlineHashMap_Value<Suffix> | The value. |
Success
*RETURN
was assigned the size, in elements, of this Core_InlineHashMap<Suffix>
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allcation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_InlineHashMap_uninitialize
Signature
Core_Result Core_InlineHashMap<Suffix>_create(Core_InlineHashMap<Suffix>* SELF);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
Uninitialize a Core_InlineHashMap<Suffix>
object.
Parameters
SELF | Core_InlineHashMap<Suffix>* | A pointer to a Core_InlineHashMap<Suffix> object. |
Success
The Core_InlineHashMap<Suffix>
object was uninitialized.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only if SELF
is a null pointer.The behavior is undefined if SELF
is not a null pointer but does not point to an initialized Core_InlineHashMap<Suffix>
object.
Core_InlineHashMap_Value
Signature
typedef /*Implementation*/ Core_InlineHashMap<Suffix>_Key;
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a value stored in a Core_InlineHashMap<Suffix>
.
Core_InlineHashMap_ValueAddedCallback
Signature
typedef void (Core_InlineHashMap<Suffix>_ValueAddedCallback)(Core_InlineHashMap<Suffix>_Value* value);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a callback invoked if a value is added to an inline pointer hash map.
Parameters
value | Core_InlineHashMap<Suffix>_Value* | A pointer to a Core_InlineHashMap<Suffix>_Value value. |
Core_InlineHashMap_ValueRemovedCallback
Signature
typedef void (Core_InlineHashMap<Suffix>_ValueRemovedCallback)(Core_InlineHashMap<Suffix>_Value* value);
where <KeySuffix>
<ValueSuffix>
can assume the value of P
.
Description
The type of a callback invoked if a value is removed from an inline pointer hash map.
Parameters
value | Core_InlineHashMap<Suffix>_Value* | A pointer to a Core_InlineHashMap<Suffix>_Value value. |
Core_InputMessage
Signature
typedef struct Core_InputMessage Core_InputMessage;
Extends
Description
An input message.
Core_InputMessage_construct
Signature
Core_Result Core_InputMessage_construct(Core_InputMessage* SELF, Core_InputMessageKind kind, Core_ModifiersKey modifierKeys);
Description
Construct a Core_InputMessage
object.
Parameters
SELF | Core_InputMessage* | A pointer to this Core_InputMessage object. |
kind | Core_InputMessageKind | The kind of this input message object. |
modifierKeys | Core_ModifierKeys | The modifier keys of this input message object. |
Success
This Core_InputMessage
object was constructed.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InputMessage_getKind
Signature
Core_Result Core_InputMessage_getKind(Core_InputMessageKind* RETURN, Core_InputMessage* SELF);
Description
Get the kind of this input message.
Parameters
RETURN | Core_InputMessageKind* | A pointer to a Core_InputMessageKind variable. |
SELF | Core_InputMessage* | A pointer to this Core_InputMessage object. |
Success
*RETURN
was assigned the kind of this input message.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InputMessage_getModifierKeys
Signature
Core_Result Core_InputMessage_getModifierKeys(Core_ModifierKeys* RETURN, Core_InputMessage* SELF);
Description
Get the modifier keys of this input message.
Parameters
RETURN | Core_ModifiereKeys* | A pointer to a Core_ModifiereKeys variable. |
SELF | Core_InputMessage* | A pointer to this Core_InputMessage object. |
Success
*RETURN
was assigned the modifier keys of this input message.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_InputMessageKind
Signature
typedef enum Core_InputMessageKind <implementation> Core_InputMessageKind;
Description
An enumeration of kinds of canvas messages.
Elements
Core_InputMessageKind_KeyboardKey | Kind of keyboard key message. |
Core_InputMessageKind_MouseButton | Kind of a mouse button message. |
Core_InputMessageKind_MousePointer | Kind of a mouse pointer message. |
Core_Integer16
Signature
typedef <implementation> Core_Integer16;
Description
A two's complement integer of a width of 16 Bits. This usually is an alias of int16_t
.
Core_Integer16_Greatest
Signature
#define Core_Integer16_Greatest <implementation>
Description
The greatest value of type Core_Integer16
.
Core_Integer16_Least
Signature
#define Core_Integer16_Least <implementation>
Description
The least value of type Core_Integer16
.
Core_Integer32
Signature
typedef <implementation> Core_Integer32;
Description
A two's complement integer of a width of 32 Bits. This usually is an alias of int32_t
.
Core_Integer32_Greatest
Signature
#define Core_Integer32_Greatest <implementation>
Description
The greatest value of type Core_Integer32
.
Core_Integer32_Least
Signature
#define Core_Integer32_Least <implementation>
Description
The least value of type Core_Integer32
.
Core_Integer64
Signature
typedef <implementation> Core_Integer64;
Description
A two's complement integer of a width of 64 Bits. This usually is an alias of int64_t
.
Core_Integer64_Greatest
Signature
#define Core_Integer64_Greatest <implementation>
Description
The greatest value of type Core_Integer64
.
Core_Integer64_Least
Signature
#define Core_Integer64_Least <implementation>
Description
The least value of type Core_Integer64
.
Core_Integer8
Signature
typedef <implementation> Core_Integer8;
Description
A two's complement integer of a width of 8 Bits. This is an alias of int8_t
.
Core_Integer8_Greatest
Signature
#define Core_Integer8_Greatest <implementation>
Description
The greatest value of type Core_Integer8
.
Core_Integer8_Least
Signature
#define Core_Integer8_Least <implementation>
Description
The least value of type Code_Integer8
.
Core_isInfinity
Signature
Core_Result Core_isInfinity<Suffix>(Core_Boolean* RETURN, <Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Description
Get if a value is ±∞
.
Parameters
RETURN | Core_Boolean* | A pointer to a Core_Boolean variable |
Success
*RETURN
was assigned Core_True
if the value x
is ±∞
and was assigned Core_False
otherwise.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_isNoNumber
Signature
Core_Result Core_isNoNumber<Suffix>(Core_Boolean* RETURN, <Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Description
Get if a value is no number
.
Parameters
RETURN | Core_Boolean* | A pointer to a Core_Boolean variable |
Success
*RETURN
was assigned Core_True
if the value x
is no number
and was assigned Core_False
otherwise.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_KeyboardKey
Signature
typedef enum Core_KeyboardKey <implementation> Core_KeyboardKey;
Description
An enumeration of keyboard keys.The numeric values of the digit keys form a consecutive range with Core_KeyboardKey_D0 being the lowest of value and Core_KeyboardKey_D9 being the highest of value.Furthermore, the digit key constant of a lower number has a lower value than the digit key constant of a higher number.The numeric values of the letter keys form a consecutive range with Core_KeyboardKey_A being the lowest value and Core_KeyboardKey_Z being the highest of value.Furthermore, the letter key constant of a letter lower in the alphabet has a lower value than the letter key constant of a letter higher in the alphabet.The numeric values of the numpad digit keys form a consecutive range with Core_KeyboardKey_NumPad0 being the lowest of value and Core_KeyboardKey_NumPad9 being the highest of value.Furthermore, the numpad digit key constant of a lower digit has a lower value than the numpad digit key constant of a higher number.
Elements
Core_KeyboardKey_A | The A key. |
Core_KeyboardKey_Accept | The IME Accept key. |
Core_KeyboardKey_Add | The Add key. |
Core_KeyboardKey_Applications | The Applications key (on Microsoft Natural Keyboard). |
Core_KeyboardKey_B | The B key. |
Core_KeyboardKey_Backspace | The Backspace key. |
Core_KeyboardKey_BrowserBack | The Browser Back key. |
Core_KeyboardKey_BrowserFavorites | The Browser Favorites key. |
Core_KeyboardKey_BrowserForward | The Browser Forward key. |
Core_KeyboardKey_BrowserHome | The Browser Home key. |
Core_KeyboardKey_BrowserRefresh | The Browser Refresh key. |
Core_KeyboardKey_BrowserSearch | The Browser Search key. |
Core_KeyboardKey_BrowserStop | The Browser Stop key. |
Core_KeyboardKey_C | The C key. |
Core_KeyboardKey_Capital | The Capital key. |
Core_KeyboardKey_CapsLock | The Caps Lock key. |
Core_KeyboardKey_Clear | The Clear key. |
Core_KeyboardKey_Comma | The Comma key. |
Core_KeyboardKey_Convert | The IME Convert key. |
Core_KeyboardKey_D | The D key. |
Core_KeyboardKey_D0 | The 0 key. |
Core_KeyboardKey_D1 | The 1 key. |
Core_KeyboardKey_D2 | The 2 key. |
Core_KeyboardKey_D3 | The 3 key. |
Core_KeyboardKey_D4 | The 4 key. |
Core_KeyboardKey_D5 | The 5 key. |
Core_KeyboardKey_D6 | The 6 key. |
Core_KeyboardKey_D7 | The 7 key. |
Core_KeyboardKey_D8 | The 8 key. |
Core_KeyboardKey_D9 | The 9 key. |
Core_KeyboardKey_Decimal | The Decimal Separator key (on number pad). |
Core_KeyboardKey_Delete | The Delete key. |
Core_KeyboardKey_Down | The Down Arrow key. |
Core_KeyboardKey_DownArrow | The Down Arrow key. |
Core_KeyboardKey_E | The E key. |
Core_KeyboardKey_End | The End key. |
Core_KeyboardKey_Escape | The Escape key. |
Core_KeyboardKey_F | The F key. |
Core_KeyboardKey_F1 | The F1 key. |
Core_KeyboardKey_F10 | The F10 key. |
Core_KeyboardKey_F11 | The F11 key. |
Core_KeyboardKey_F12 | The F12 key. |
Core_KeyboardKey_F13 | The F13 key. |
Core_KeyboardKey_F14 | The F14 key. |
Core_KeyboardKey_F15 | The F15 key. |
Core_KeyboardKey_F16 | The F16 key. |
Core_KeyboardKey_F17 | The F17 key. |
Core_KeyboardKey_F18 | The F18 key. |
Core_KeyboardKey_F19 | The F19 key. |
Core_KeyboardKey_F2 | The F2 key. |
Core_KeyboardKey_F20 | The F20 key. |
Core_KeyboardKey_F21 | The F21 key. |
Core_KeyboardKey_F22 | The F22 key. |
Core_KeyboardKey_F23 | The F23 key. |
Core_KeyboardKey_F24 | The F24 key. |
Core_KeyboardKey_F3 | The F3 key. |
Core_KeyboardKey_F4 | The F4 key. |
Core_KeyboardKey_F5 | The F5 key. |
Core_KeyboardKey_F6 | The F6 key. |
Core_KeyboardKey_F7 | The F7 key. |
Core_KeyboardKey_F8 | The F8 key. |
Core_KeyboardKey_F9 | The F9 key. |
Core_KeyboardKey_FinalMode | The IME Final Mode key. |
Core_KeyboardKey_G | The G key. |
Core_KeyboardKey_H | The H key. |
Core_KeyboardKey_HangulMode | The IME Hangul Mode key. |
Core_KeyboardKey_HanjaMode | The IME Hanja Mode key. |
Core_KeyboardKey_Home | The Home key. |
Core_KeyboardKey_I | The I key. |
Core_KeyboardKey_Insert | The Insert key. |
Core_KeyboardKey_J | The J key. |
Core_KeyboardKey_JunjaMode | The IME Junja mode key. |
Core_KeyboardKey_K | The K key. |
Core_KeyboardKey_KanaMode | The IME Kana Mode key. |
Core_KeyboardKey_KanjiMode | The IME Kanji Mode key. |
Core_KeyboardKey_L | The L key. |
Core_KeyboardKey_LeftControl | The Left Control key. |
Core_KeyboardKey_LeftMenu | The Left Menu key. |
Core_KeyboardKey_LeftShift | The Left Shift key. |
Core_KeyboardKey_LeftWindows | The Left Windows key (on Microsoft Natural Keyboard). |
Core_KeyboardKey_M | The M key. |
Core_KeyboardKey_Minus | The Minus key. |
Core_KeyboardKey_ModeChange | The IME Mode Change key. |
Core_KeyboardKey_Multiply | The Multiply Change key. |
Core_KeyboardKey_N | The N key. |
Core_KeyboardKey_NonConvert | The IME Non Convert key. |
Core_KeyboardKey_NumberSign | The Number Sign key. |
Core_KeyboardKey_NumPad0 | The 0 key on the numeric keypad. |
Core_KeyboardKey_NumPad1 | The 1 key on the numeric keypad. |
Core_KeyboardKey_NumPad2 | The 2 key on the numeric keypad. |
Core_KeyboardKey_NumPad3 | The 3 key on the numeric keypad. |
Core_KeyboardKey_NumPad4 | The 4 key on the numeric keypad. |
Core_KeyboardKey_NumPad5 | The 5 key on the numeric keypad. |
Core_KeyboardKey_NumPad6 | The 6 key on the numeric keypad. |
Core_KeyboardKey_NumPad7 | The 7 key on the numeric keypad. |
Core_KeyboardKey_NumPad8 | The 8 key on the numeric keypad. |
Core_KeyboardKey_NumPad9 | The 9 key on the numeric keypad. |
Core_KeyboardKey_O | The O key. |
Core_KeyboardKey_P | The P key. |
Core_KeyboardKey_PageDown | The Page Down key. |
Core_KeyboardKey_PageUp | The Page Up key. |
Core_KeyboardKey_Pause | The Pause key. |
Core_KeyboardKey_Period | The Period key. |
Core_KeyboardKey_Print | The Print key. |
Core_KeyboardKey_Plus | The Plus key. |
Core_KeyboardKey_Q | The Q key. |
Core_KeyboardKey_R | The R key. |
Core_KeyboardKey_Return | The Return key. |
Core_KeyboardKey_Right | The Right Arrow key. |
Core_KeyboardKey_RightArrow | The Right Arrow key. |
Core_KeyboardKey_RightControl | The Right Control key. |
Core_KeyboardKey_RightMenu | The Right Menu key. |
Core_KeyboardKey_RightShift | The Right Shift key. |
Core_KeyboardKey_RightShift | The Right Windows key. |
Core_KeyboardKey_S | The S key. |
Core_KeyboardKey_ScrollLock | The Scroll Lock key. |
Core_KeyboardKey_Sleep | The Sleep key. |
Core_KeyboardKey_Space | The Space key. |
Core_KeyboardKey_Subtract | The Subtract key. |
Core_KeyboardKey_T | The T key. |
Core_KeyboardKey_Tabulator | The Tabulator key. |
Core_KeyboardKey_U | The U key. |
Core_KeyboardKey_Up | The Up Arrow key. |
Core_KeyboardKey_UpArrow | The Up Arrow key. |
Core_KeyboardKey_V | The V key. |
Core_KeyboardKey_W | The W key. |
Core_KeyboardKey_X | The X key. |
Core_KeyboardKey_Y | The Y key. |
Core_KeyboardKey_Z | The Z key. |
Core_KeyboardKeyAction
Signature
typedef enum Core_KeyboardKeyAction <implementation> Core_KeyboardKeyAction;
Description
An enumeration of keyboard key actions.
Elements
Core_KeyboardKeyAction_Pressed | A keyboard key was pressed. |
Core_KeyboardKeyAction_Released | A keyboard key was released. |
Core_KeyboardKeyMessage
Signature
typedef struct Core_KeyboardKeyMessage Core_KeyboardKeyMessage;
Extends
Description
A keyboard key message.
Core_KeyboardKeyMessage_construct
Signature
Core_Result Core_KeyboardKeyMessage_construct(Core_KeyboardKeyMessage* SELF, Core_KeyboardKeyAction action, Core_KeyboardKey key, Core_ModifiersKey modifierKeys);
Description
Construct a Core_KeyboardKeyMessage
object.
Parameters
SELF | Core_KeyboardKeyMessage* | A pointer to this Core_KeyboardKeyMessage object. |
action | Core_KeyboardKeyAction | The action of the key. |
key | Core_KeyboardKey | The keyboard key. |
modifierKeys | Core_ModifierKeys | The modifier keys by the time the key was operated. |
Success
This Core_KeyboardKeyMessage
object was constructed.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_KeyboardKeyMessage_create
Signature
Core_Result Core_KeyboardKeyMessage_create(Core_KeyboardKeyMessage** RETURN, Core_KeyboardKeyAction action, Core_KeyboardKey key, Core_ModifiersKey modifierKeys);
Description
Create a Core_KeyboardKeyMessage
object.
Parameters
RETURN | Core_KeyboardKeyMessage** | A pointer to a Core_KeyboardKeyMessage* variable. |
action | Core_KeyboardKeyAction | The action of the key. |
key | Core_KeyboardKey | The keyboard key. |
modifierKeys | Core_ModifierKeys | The modifier keys by the time the key was operated. |
Success
*RETURN
was assigned a pointer to the Core_KeyboardKeyMessage
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_KeyboardKeyMessage_getAction
Signature
Core_Result Core_KeyboardKeyMessage_getAction(Core_KeyboardKeyAction* RETURN, Core_KeyboardKeyMessage* SELF);
Description
Get the keyboard key action.
Parameters
RETURN | Core_KeyboardKeyAction* | A pointer to a Core_KeyboardKeyAction variable. |
SELF | Core_KeyboardKeyMessage* | A pointer to this Core_KeyboardKeyMessage object. |
Success
*RETURN
was assigned the keyboard key action.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_KeyboardKeyMessage_getKey
Signature
Core_Result Core_KeyboardKeyMessage_getKey(Core_KeyboardKey* RETURN, Core_KeyboardKeyMessage* SELF);
Description
Get the keyboard key.
Parameters
RETURN | Core_KeyboardKey* | A pointer to a Core_KeyboardKey variable. |
SELF | Core_KeyboardKeyMessage* | A pointer to this Core_KeyboardKeyMessage object. |
Success
*RETURN
was assigned the keyboard key.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_KeyboardKey_toString
Signature
Core_Result Core_KeyboardKey_toString(Core_String** RETURN, Core_KeyboardKey SELF);
Description
Get a human-readable description of this Core_KeyboardKey
value.
Parameters
RETURN | Core_String** | A pointer to a Core_String* variable. |
SELF | Core_KeyboardKey | This Core_KeyboardKey value. |
Success
This *RETURN
was assigned a pointer to a Core_String
object which is a human-readable description of the specified keyboard key.
The caller acquired a reference to that object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Likely
Signature
#define Core_Likely() <implementation>
Description
Expression annotation aiding branch prediction by indicating an expression is likely to evaluate to logically true.In the following example, we use this function annotation to indicate that a call to malloc
is likely to succeed.void* p = malloc(sizeof(char));if (Core_Likely(NULL != p)) }
Core_makeBitMask
Signature
Core_Result Core_makeBitMask<Suffix>(<Type>* RETURN, Core_Size i, Core_Size n);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
Description
Create a Bit mask.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
i | Core_Size | The index of the Bit in the range [i, i + n). |
n | Core_Size | The number of Bits in the range [i, i + n). |
Success
*RETURN
was assigned the Bit mask.
Errors
| RETURN is a null pointer. |
| i is greater than the width of the type minus one. |
| i + n is greater than the width of the type. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_max
Signature
Core_Result Core_max<Suffix>(<Type>* RETURN, <Type> x, <Type> y);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Sz | Core_Size |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
I8 | Core_Integer8 |
I16 | Core_Integer16 |
I32 | Core_Integer32 |
I64 | Core_Integer64 |
Description
Computes the maximum of two values x
and y
.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
x | <Type> | The first value. |
y | <Type> | The second value. |
Success
*RETURN
was assigned the maximum of the two values x
and y
.
+∞
is returned if a value is +∞
.
NaN
is returned if a value is NaN
.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Memory_allocate
Signature
Core_Result Core_Memory_allocate(void **RETURN, Core_Size n);
Description
Allocate a memory block.
Parameters
RETURN | void** | A pointer to a void* variable. |
n | Core_Size | The size, in Bytes, of the memory block to allocate. Can be 0 . |
Success
*RETURN
was assigned a pointer to a new memory block of size n
.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer |
Core_Error_AllocationFailed | the allocation failed |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Memory_compare
Signature
Core_Result Core_Memory_compare(Core_Natural8* RETURN, void const* p, void const* q, Core_Size n);
Description
Compare the Bytes of memory blocks.
Parameters
p | void* | A pointer to a memory block. |
p | void* | A pointer to a memory block. |
n | Core_Size | The number of Bytes to compare. |
Success
This function compares the Byte values of the memory blocks pointed to by p
and q
from the Byte.
If all Byte values are equal, *RETURN
was assigned 0
.
If there are Byte values that are not equal, then the first mismatching Byte values are compared:
*RETURN
is assigned -1
if the Byte value in p
is smaller than the Byte value in q
.
*RETURN
is assigned +1
if the Byte value in p
is greater than the Byte value in q
.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | p is a null pointer. |
Core_Error_ArgumentInvalid | q is a null pointer. |
Core_Memory_copy
Signature
Core_Result Core_Memory_copy(void *p, void const* q, Core_Size n);
Description
Assign each Byte of a memory block the specified value. The memory blocks must not overlap.
Parameters
p | void* | A pointer to the target memory block. |
q | void const* | A pointer to the source memory block. |
n | Core_Size | The number of Bytes to copy. |
Errors
Core_Error_ArgumentInvalid | p is a null pointer |
Core_Error_ArgumentInvalid | q is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Memory_deallocate
Signature
Core_Result Core_Memory_deallocate(void* p);
Description
Deallocate a memory block.
Parameters
p | void* | A pointer to a memory block previously allocated by a call to Core_Memory_allocate . |
Success
The memory block pointed to by p
was deallocated.
Errors
Core_Error_ArgumentInvalid | p is a null pointer. |
Core_Memory_fill
Signature
Core_Result Core_Memory_fill(void *p, Core_Size n, Core_Natural8 v);
Description
Assign each Byte of a memory block the specified value.
Parameters
p | void* | A pointer to a memory block of size n |
n | Core_Size | The size of the memory block pointed to by p |
v | Core_Natural8 | The value to assign to each Byte of the memory block |
Errors
Core_Error_ArgumentInvalid | p is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Memory_move
Signature
Core_Result Core_Memory_move(void *p, void const* q, Core_Size n);
Description
Assign the values of a source memory block to a target memory block. The memory blocks may overlap.
Parameters
p | void* | A pointer to the target memory block. |
q | void const* | A pointer to the source memory block. |
n | Core_Size | The number of Bytes to copy. |
Errors
Core_Error_ArgumentInvalid | p is a null pointer |
Core_Error_ArgumentInvalid | q is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Memory_reallocate
Signature
Core_Result Core_Memory_reallocate(void **RETURN, void* p, Core_Size n);
Description
Reallocate a memory block.
Parameters
RETURN | void** | A pointer to a void* variable. |
p | void* | A pointer to a memory block previously allocated by a call to Core_Memory_allocate* . |
n | Core_Size | The size, in Bytes, to reallocate the memory block pointed to by p to. Can be 0 . |
Success
*RETURN
was assigned a pointer to a new memory block of size n
.
The old memory block was deallocated.
A new memory block of size n
was allocated by a call to Core_Memory_allocate
.
The first min(x,y)
Bytes of the new memory block and the old memory block are equal where
x
is the size of the new memory block and y
is the size of the old memory block.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | p is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Memory_zero
Signature
Core_Result Core_Memory_zero(void *p, Core_Size n);
Description
Assign each Byte of a memory block the value zero.
Parameters
p | void* | A pointer to a memory block of size n . |
n | Core_Size | The size of the memory block pointed to by p . |
Errors
Core_Error_ArgumentInvalid | p is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
The callCore_Memory_zero(p,n)
is possibly faster but other than that equivalent to the callCore_Memory_fill(p, n, 0)
This function sets the by-thread error variable on failure.
Core_Message
Signature
typedef struct Core_Message Core_Message;
Extends
Description
A message.
Core_min
Signature
Core_Result Core_min<Suffix>(<Type>* RETURN, <Type> x, <Type> y);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Sz | Core_Size |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
I8 | Core_Integer8 |
I16 | Core_Integer16 |
I32 | Core_Integer32 |
I64 | Core_Integer64 |
Description
Computes the minimum of two values x
and y
.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable. |
x | <Type> | The first value. |
y | <Type> | The second value. |
Success
*RETURN
was assigned the minimum of the two values x
and y
.
-∞
is returned if a value is -∞
.
NaN
is returned if a value is NaN
.
Errors
| RETURN is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_ModifierKeys
Signature
typedef enum Core_ModifierKeys <implementation> Core_ModifierKeys;
Description
An enumeration flags of modifier keys.
Elements
Core_ModifierKeys_LeftControl | The "Left control" modifier key. |
Core_ModifierKeys_LeftMenu | The "Left menu" modifier key. |
Core_ModifierKeys_LeftShift | The "Left shift" modifier key. |
Core_ModifierKeys_RightControl | The "Right control" modifier key. |
Core_ModifierKeys_RightMenu | The "Right menu" modifier key. |
Core_ModifierKeys_RightShift | The "Right shift" modifier key. |
Core_MouseButton
Signature
typedef enum Core_MouseButton <implementation> Core_MouseButton;
Description
An enumeration of mouse buttons.
Elements
Core_MouseButton_Button0 | The zeroeth mouse button. |
Core_MouseButton_Button1 | The first mouse button. |
Core_MouseButton_Button2 | The second mouse button. |
Core_MouseButton_Button3 | The third mouse button. |
Core_MouseButton_Button4 | The fourth mouse button. |
Core_MouseButton_Button5 | The fifth mouse button. |
Core_MouseButton_Button6 | The sixth mouse button. |
Core_MouseButton_Button7 | The seventh mouse button. |
Core_MouseButtonAction
Signature
typedef enum Core_MouseButtonAction <implementation> Core_MouseButtonAction;
Description
An enumeration of mouse button actions.
Elements
Core_MouseButtonAction_Pressed | A mouse button was pressed. |
Core_MouseButtonAction_Released | A mouse button was released. |
Core_MouseButtonMessage
Signature
typedef struct Core_MouseButtonMessage Core_MouseButtonMessage;
Extends
Description
An mouse button message.
Core_MouseButtonMessage_construct
Signature
Core_Result Core_MouseButtonMessage_construct(Core_MouseButtonMessage* SELF, Core_MouseButtonAction action, Core_MouseButton button, Core_ModifiersKey modifierKeys, Core_Real32 x, Core_Real32 y);
Description
Construct a Core_MouseButtonMessage
object.
Parameters
SELF | Core_MouseButtonMessage* | A pointer to this Core_MouseButtonMessage object. |
action | Core_MouseButtonAction | The action of the button. |
button | Core_MouseButton | The mouse button. |
modifierKeys | Core_ModifierKeys | The modifier keys by the time the button was operated. |
x | Core_Real32 | The position of the mouse pointer, in canvas coordinates, by the time the button was operated. |
y | Core_Real32 | The position of the mouse pointer, in canvas coordinates, by the time the button was operated. |
Success
This Core_MouseButtonMessage
object was constructed.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.
Core_MouseButtonMessage_create
Signature
Core_Result Core_MouseButtonMessage_create(Core_MouseButtonMessage** RETURN, Core_MouseButtonAction action, Core_MouseButton button, Core_ModifiersKey modifierKeys, Core_Real32 x, Core_Real32 y);
Description
Create a Core_MouseButtonMessage
object.
Parameters
RETURN | Core_MouseButtonMessage** | A pointer to a Core_MouseButtonMessage* variable. |
action | Core_MouseButtonAction | The action of the button. |
button | Core_MouseButton | The mouse button. |
modifierKeys | Core_ModifierKeys | The modifier keys by the time the button was operated. |
x | Core_Real32 | The position of the mouse pointer, in canvas coordinates, by the time the button was operated. |
y | Core_Real32 | The position of the mouse pointer, in canvas coordinates, by the time the button was operated. |
Success
*RETURN
was assigned a pointer to the Core_MouseButtonMessage
.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.
Core_MouseButtonMessage_getAction
Signature
Core_Result Core_MouseButtonMessage_getAction(Core_MouseButtonAction* RETURN, Core_MouseButtonMessage* SELF);
Description
Get the mouse button action.
Parameters
RETURN | Core_MouseButtonAction* | A pointer to a Core_MouseButtonAction variable. |
SELF | Core_MouseButtonMessage* | A pointer to this Core_MouseButtonMessage object. |
Success
*RETURN
was assigned the mouse button action.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_MouseButtonMessage_getButton
Signature
Core_Result Core_MouseButtonMessage_getButton(Core_MouseButton* RETURN, Core_MouseButtonMessage* SELF);
Description
Get the mouse button.
Parameters
RETURN | Core_MouseButton* | A pointer to a Core_MouseButton variable. |
SELF | Core_MouseButtonMessage* | A pointer to this Core_MouseButtonMessage object. |
Success
*RETURN
was assigned the mouse button.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_MouseButtonMessage_getX
Signature
Core_Result Core_MouseButtonMessage_getX(Core_Real32* RETURN, Core_MouseButtonMessage* SELF);
Description
Get the position of the mouse pointer along the x-axis in canvas coordinates.
Parameters
RETURN | Core_Real32* | A pointer to a Core_Real32 variable. |
SELF | Core_MouseButtonMessage* | A pointer to this Core_MouseButtonMessage object. |
Success
*RETURN
was assigned the position of the mouse pointer along the x-axis in canvas coordinates.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_MouseButtonMessage_getY
Signature
Core_Result Core_MouseButtonMessage_getY(Core_Real32* RETURN, Core_MouseButtonMessage* SELF);
Description
Get the position of the mouse pointer along the y-axis in canvas coordinates.
Parameters
RETURN | Core_Real32* | A pointer to a Core_Real32 variable. |
SELF | Core_MouseButtonMessage* | A pointer to this Core_MouseButtonMessage object. |
Success
*RETURN
was assigned the position of the mouse pointer along the y-axis in canvas coordinates.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_MouseButton_toString
Signature
Core_Result Core_MouseButton_toString(Core_String** RETURN, Core_MouseButton SELF);
Description
Get a human-readable description of this Core_MouseButton
value.
Parameters
RETURN | Core_String** | A pointer to a Core_String* variable. |
SELF | Core_MouseButton | This Core_MouseButton value. |
Success
This *RETURN
was assigned a pointer to a Core_String
object which is a human-readable description of the specified mouse button.
The caller acquired a reference to that object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_MousePointerAction
Signature
typedef enum Core_MousePointerAction <implementation> Core_MousePointerAction;
Description
An enumeration of mouse pointer actions.
Elements
Core_MousePointerAction_Entered | A mouse pointer entered a canvas. |
Core_MousePointerAction_Exited | A mouse pointer exited a canvas. |
Core_MousePointerAction_Moved | A mouse pointer moved. |
Core_MousePointerMessage
Signature
typedef struct Core_MousePointerMessage Core_MousePointerMessage;
Extends
Description
A mouse pointer message.
Core_MousePointerMessage_construct
Signature
Core_Result Core_MousePointerMessage_construct(Core_MousePointerMessage* SELF, Core_MousePointerAction action, Core_Real32 x, Core_Real32 y, Core_ModifiersKey modifierKeys);
Description
Construct a Core_MousePointerMessage
object.
Parameters
SELF | Core_MousePointerMessage* | A pointer to this Core_MousePointerMessage object. |
action | Core_MouseButtonAction | The action of the button. |
x | Core_Real32 | The position of the mouse pointer, in canvas coordinates. |
y | Core_Real32 | The position of the mouse pointer, in canvas coordinates. |
modifierKeys | Core_ModifierKeys | The modifier keys by the time the button was operated. |
Success
This Core_MousePointerMessage
object was constructed.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.
Core_MousePointerMessage_create
Signature
Core_Result Core_MousePointerMessage_create(Core_MousePointerMessage** RETURN, Core_MousePointerAction action, Core_Real32 x, Core_Real32 y, Core_ModifiersKey modifierKeys);
Description
Create a Core_MousePointerMessage
object.
Parameters
RETURN | Core_MousePointerMessage** | A pointer to a Core_MousePointerMessage* variable. |
action | Core_MouseButtonAction | The action of the button. |
x | Core_Real32 | The position of the mouse pointer, in canvas coordinates. |
y | Core_Real32 | The position of the mouse pointer, in canvas coordinates. |
modifierKeys | Core_ModifierKeys | The modifier keys by the time the button was operated. |
Success
*RETURN
was assigned a pointer to the Core_MousPointerMessage
.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.
Core_MousePointerMessage_getAction
Signature
Core_Result Core_MousePointerMessage_getAction(Core_MousePointerAction* RETURN, Core_MousePointerMessage* SELF);
Description
Get the mouse pointer action.
Parameters
RETURN | Core_MousePointerAction* | A pointer to a Core_MousePointerAction variable. |
SELF | Core_MousePointerMessage* | A pointer to this Core_MousePointerMessage object. |
Success
*RETURN
was assigned the mouse pointer action.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_MousePointerMessage_getX
Signature
Core_Result Core_MousePointerMessage_getX(Core_Real32* RETURN, Core_MousePointerMessage* SELF);
Description
Get the position of the mouse pointer along the x-axis in canvas coordinates.
Parameters
RETURN | Core_Real32* | A pointer to a Core_Real32 variable. |
SELF | Core_MousePointerMessage* | A pointer to this Core_MousePointerMessage object. |
Success
*RETURN
was assigned the position of the mouse pointer along the x-axis in canvas coordinates.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_MousePointerMessage_getY
Signature
Core_Result Core_MousePointerMessage_getY(Core_Real32* RETURN, Core_MousePointerMessage* SELF);
Description
Get the position of the mouse pointer along the y-axis in canvas coordinates.
Parameters
RETURN | Core_Real32* | A pointer to a Core_Real32 variable. |
SELF | Core_MousePointerMessage* | A pointer to this Core_MousePointerMessage object. |
Success
*RETURN
was assigned the position of the mouse pointer along the y-axis in canvas coordinates.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Natural16
Signature
typedef <implementation> Core_Natural16;
Description
An unsigned integer of a width of 16 Bits. This usually is an alias of uint16_t
.
Core_Natural16_Greatest
Signature
#define Core_Natural16_Greatest <implementation>
Description
The greatest value of type Core_Natural16
.
Core_Natural16_Least
Signature
#define Core_Natural16_Least <implementation>
Description
The least value of type Core_Natural16
. This usually is an alias of 0u16
.
Core_Natural32
Signature
typedef <implementation> Core_Natural32;
Description
An unsigned integer of a width of 32 Bits. This usually is an alias of uint32_t
.
Core_Natural32_Greatest
Signature
#define Core_Natural32_Greatest <implementation>
Description
The greatest value of type Core_Natural32
.
Core_Natural32_Least
Signature
#define Core_Natural32_Least <implementation>
Description
The least value of type Core_Natural32
. This usually is an alias of 0u32
.
Core_Natural64
Signature
typedef <implementation> Core_Natural64;
Description
An unsigned integer of a width of 64 Bits. This usually is an alias of uint64_t
.
Core_Natural64_Greatest
Signature
#define Core_Natural64_Greatest <implementation>
Description
The greatest value of type Core_Natural64
.
Core_Natural64_Least
Signature
#define Core_Natural64_Least <implementation>
Description
The least value of type Core_Natural64
. This usually is an alias of 0u64
.
Core_Natural8
Signature
typedef <implementation> Core_Natural8;
Description
An unsigned integer of a width of 8 Bits. This usually is an alias of uint8_t
.
Core_Natural8_Greatest
Signature
#define Core_Natural8_Greatest <implementation>
Description
The greatest value of type Core_Natural8
.
Core_Natural8_Least
Signature
#define Core_Natural8_Least <implementation>
Description
The least value of type Core_Natural8
. This is usually an alias of 0u8
.
Core_NonExistingFilePolicy
Signature
typedef enum Core_NonExistingFilePolicy <implementation> Core_NonExistingFilePolicy;
Description
An enumeration of policies for opening a file in case of that the file does not exist.The enumeration elements cannot be combined.
Elements
Core_NonExistingFilePolicy_Fail | Fail if the file does not exist. |
Core_NonExistingFilePolicy_Create | Create the file if it does not exist. |
Core_NoReturn
Signature
#define Core_NoReturn() <implementation>
Description
Function annotation indicating that a function never returns.
Core_Object
Signature
typedef struct Core_Object Core_Object;
Description
The base of all Objects.
Core_Object_construct
Signature
Core_Result Core_Object_construct(Core_Object* SELF);
Description
Construct a Core_Object
object.
Parameters
SELF | Core_Object* | A pointer to this Core_Object object. |
Success
This Core_Object
object was constructed.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_OperatingSystem
Signature
#define Core_OperatingSystem <implementation>
Description
Symbolic constant denoting the operating system this library was compiled for.It is always defined as one of the Core_OperatingSystem_*
constants.
Core_OperatingSystem_Cygwin
Signature
#define Core_OperatingSystem_Cygwin <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants.The symbolic constant denotes a CYGWIN operating system.
Core_OperatingSystem_Ios
Signature
#define Core_OperatingSystem_Ios <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants.The symbolic constant denotes an IOS operating system.
Core_OperatingSystem_IosEmulator
Signature
#define Core_OperatingSystem_IosEmulator <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants.The symbolic constant denotes an IOS EMULATOR operating system.
Core_OperatingSystem_Linux
Signature
#define Core_OperatingSystem_Linux <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants.The symbolic constant denotes a LINUX operating system.
Core_OperatingSystem_Macos
Signature
#define Core_OperatingSystem_Macos <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants.The symbolic constant denotes a MACOS operating system.
Core_OperatingSystem_Mingw
Signature
#define Core_OperatingSystem_Mingw <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants).The symbolic constant denotes a MINGW operating system.
Core_OperatingSystem_Msys
Signature
#define Core_OperatingSystem_Msys <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants.The symbolic constant denotes an MSYS operating system.
Core_OperatingSystem_Unix
Signature
#define Core_OperatingSystem_Unix <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants).The symbolic constant denotes an UNIX operating system.
Core_OperatingSystem_Windows
Signature
#define Core_OperatingSystem_Windows <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_*
symbolic constants.The symbolic constant denotes a WINDOWS operating system.
Core_Real32
Signature
typedef <implementation> Core_Real32;
Description
An IEEE 754 32 bit floating point value. This usually is an alias of float
.
Core_Real32_Greatest
Signature
#define Core_Real32_Greatest <implementation>
Description
The greatest value of type Core_Real32
. This usually is an alias of +FLT_MAX
.
Core_Real32_GreatestBaseTenExponent
Signature
#define Core_Real32_GreatestBaseTenExponent <implementation>
Description
The greatest integer such that ten raised to the power of that value minus one is a normalized Core_Real32
value. This usually is an alias of FLT_MAX_10_EXP
.
Core_Real32_GreatestBaseTwoExponent
Signature
#define Core_Real32_GreatestBaseTwoExponent <implementation>
Description
The greatest integer such that two raised to the power of that value minus one is a normalized Core_Real32
value. This usually is an alias of FLT_MAX_EXP
.
Core_Real32_Least
Signature
#define Core_Real32_Least <implementation>
Description
The least value of type Core_Real32
. This usually is an alias of -FLT_MAX
.
Core_Real32_LeastBaseTenExponent
Signature
#define Core_Real32_LeastBaseTenExponent <implementation>
Description
The least integer such that ten raised to the power of that value minus one is a normalized Core_Real32
value. This usually is an alias of FLT_MIN_10_EXP
.
Core_Real32_LeastBaseTwoExponent
Signature
#define Core_Real32_LeastBaseTwoExponent <implementation>
Description
The least integer such that two raised to the power of that value minus one is a normalized Core_Real32
value. This usually is an alias of FLT_MIN_EXP
.
Core_Real32_NegativeInfinity
Signature
#define Core_Real32_NegativeInfinity <implementation>
Description
The negative infinity value of type Core_Real32
. This usually is an alias of -INFINITY
.
Core_Real32_NoNumber
Signature
#define Core_Real32_NoNumber <implementation>
Description
The no number value of type Core_Real32
. This usually is an alias of NAN
.
Core_Real32_PositiveInfinity
Signature
#define Core_Real32_PositiveInfinity <implementation>
Description
The positive infinity value of type Core_Real32
. This usually is an alias of +INFINITY
.
Core_Real64
Signature
typedef <implementation> Core_Real64;
Description
An IEEE 754 64 bit floating point value. This usually is an alias of double
.
Core_Real64_Greatest
Signature
#define Core_Real64_Greatest <implementation>
Description
The greatest value of type Core_Real64
. This usually is an alias of +DBL_MAX
.
Core_Real64_GreatestBaseTenExponent
Signature
#define Core_Real64_GreatestBaseTenExponent <implementation>
Description
The greatest integer such that ten raised to the power of that value minus one is a normalized Core_Real64
value. This usually is an alias of DBL_MAX_10_EXP
.
Core_Real64_GreatestBaseTwoExponent
Signature
#define Core_Real64_GreatestBaseTwoExponent <implementation>
Description
The greatest integer such that two raised to the power of that value minus one is a normalized Core_Real64
value. This usually is an alias of DBL_MAX_EXP
.
Core_Real64_Least
Signature
#define Core_Real64_Least <implementation>
Description
The least value of type Core_Real64
. This usually is an alias of -DBL_MAX
.
Core_Real64_LeastBaseTenExponent
Signature
#define Core_Real64_LeastBaseTenExponent <implementation>
Description
The least integer such that ten raised to the power of that value minus one is a normalized Core_Real64
value. This usually is an alias of DBL_MIN_10_EXP
.
Core_Real64_LeastBaseTwoExponent
Signature
#define Core_Real64_LeastBaseTwoExponent <implementation>
Description
The least integer such that two raised to the power of that value minus one is a normalized Core_Real64
value. This usually is an alias of DBL_MIN_EXP
.
Core_Real64_NegativeInfinity
Signature
#define Core_Real64_NegativeInfinity <implementation>
Description
The negative infinity value of type Core_Real64
. This usually is an alias of -INFINITY
.
Core_Real64_NoNumber
Signature
#define Core_Real64_NoNumber <implementation>
Description
The no number value of type Core_Real64
. This usually is an alias of NAN
.
Core_Real64_PositiveInfinity
Signature
#define Core_Real64_PositiveInfinity <implementation>
Description
The positive infinity value of type Core_Real64
. This usually is an alias of +INFINITY
.
Core_reference
Signature
void Core_reference(Core_Object* SELF);
Description
Increment the reference count of an object.
Parameters
object | Core_Object* | A pointer to a Core_Object object. |
Success
This reference count of the object was incremented by 1
.
Core_Result
Signature
typedef <implementation> Core_Result;
Description
An integer type. The only two values of this type are Core_Success
and Core_Failure
.
Core_safeAdd
Signature
Core_Result Core_safeAdd<Suffix>(<Type>* RETURN, <Type> x, <Type> y, <Type>* overflow);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
Description
Computes the sum of two <Type>
values. The computation is conceptually performed using arbitrary precision arithmetic.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable |
x | <Type> | The augend/first summand. |
y | <Type> | The addend/second summand. |
overflow | <Type>* | A pointer to a <Type> variable. |
Success
The values x
and y
are extended to twice their previous number of Bits and added.
The lower half of the Bits of the result are assigned to *RETURN
. The upper half of the Bits of the result are assigned to *overflow
.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer |
Core_Error_ArgumentInvalid | overflow is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_safeMul
Signature
Core_Result Core_safeMul<Suffix>(<Type>* RETURN, <Type> x, <Type> y, <Type>* overflow);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
I8 | Core_Integer8 |
I16 | Core_Integer16 |
I32 | Core_Integer32 |
I64 | Core_Integer64 |
N8 | Core_Natural8 |
N16 | Core_Natural16 |
N32 | Core_Natural32 |
N64 | Core_Natural64 |
Description
Computes the product of two <Type>
values. The computation is conceptually performed using arbitrary precision arithmetic.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable |
x | <Type> | The multiplier/first factor. |
y | <Type> | The multiplicand/second factor. |
overflow | <Type>* | A pointer to a <Type> variable. |
Success
If <Type> is Core_Natural(8|16|32|64)
:
The values x
and y
are extended to twice their previous number of bits and multiplied.
The lower half of the Bits of the result are assigned to *RETURN
. The upper half of the Bits of the result are assigned to *overflow
.
If <Type> is Core_Integer(8|16|32|64)
:
The values x
and y
are sign extended to twice their previous number of Bits and multiplied.
The lower half of the Bits of the result are assigned to *RETURN
. The upper half of the Bits of the result are assigned to *overflow
.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer |
Core_Error_ArgumentInvalid | overflow is a null pointer |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Scanner
Signature
typedef struct Core_Scanner Core_Scanner;
Extends
Description
The base of a lexical analysis (aka scanner, aka lexer, aka lexical analyzer, ...).A lexical analysis ensures a Byte sequence is an UTF-8 Byte sequence and splits the symbols into words (aka tokens, ...).A lexical analysis provides
- the Bytes of the word,
- the start offset and the end offset, in Bytes, of the word.
Core_Scanner_construct
Signature
Core_Result Core_Scanner_construct(Core_Scanner* SELF);
Description
Construct a Core_Scanner
object.
Parameters
SELF | Core_Scanner* | A pointer to this Core_Scanner object. |
Success
This Core_Scanner
object was constructed.
The scanner was assigned the empty input and is in its initial state wrt that input.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Scanner_getWordEndOffset
Signature
Core_Result Core_Scanner_getWordEndOffset(Core_Size* RETURN, Core_Scanner* SELF);
Description
Get the offset, in Bytes, at which the current word ends.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_Scanner* | A pointer to this Core_Scanner* object. |
Success
*RETURN
was assigned the offset, in Bytes, at which the current word ends.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Scanner_getWordStartOffset
Signature
Core_Result Core_Scanner_getWordStartOffset(Core_Size* RETURN, Core_Scanner* SELF);
Description
Get the offset, in Bytes, at which the current word starts.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_Scanner* | A pointer to this Core_Scanner* object. |
Success
*RETURN
was assigned the offset, in Bytes, at which the current word starts.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Scanner_getWordTextBytes
Signature
Core_Result Core_Scanner_getWordTextBytes(void** RETURN, Core_Scanner* SELF);
Description
Get a pointer to the Bytes of the current word.The pointer remains valid as long as the Core_Scanner
or derived type object is valid and the word does not change.
Parameters
RETURN | void** | A pointer to a void* variable. |
SELF | Core_Scanner* | A pointer to this Core_Scanner* object. |
Success
*RETURN
was assigned a pointer to the Bytes of the current word.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Scanner_getWordTextNumberOfBytes
Signature
Core_Result Core_Scanner_getWordTextNumberOfBytes(Core_Size* RETURN, Core_Scanner* SELF);
Description
Get the number of Bytes of the word text of the current word.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_Scanner* | A pointer to this Core_Scanner* object. |
Success
*RETURN
was assigned the number of Bytes of the word text of the current word.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Scanner_setInput
Signature
Core_Result Core_Scanner_setInput(Core_Scanner* SELF, void* bytes, Core_Size numberOfBytes);
Description
Set the input of the scanner.
Parameters
SELF | Core_Scanner* | A pointer to this Core_Scanner* object. |
bytes | void* | A pointer to an array of Bytes. |
numberOfBytes | Core_Size | The number of Bytes in the array pointed to by bytes . |
Success
The scanner was assigned the empty input and is in its initial state wrt that input.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | void* is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Scanner_step
Signature
Core_Result Core_Scanner_step(Core_Scanner* SELF);
Description
Advance to the next word.The scanner retains its current state
- the current word is the end of input word
- the current word is an error word
Parameters
SELF | Core_Scanner* | A pointer to this Core_Scanner* object. |
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Core_Error_LexicalAnalysisFailed | The lexical analysis of a word failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_setError
Signature
void Core_setError(Core_Error error);
Description
Set the value of the by-thread error variable.
Parameters
error | Core_Error | The Core_Error value to be assigned to the by-thread error variable. |
Success
This function cannot fail.
Core_sin
Signature
Core_Result Core_sin<Suffix>(<Type>* RETURN, <Type> x);
where <Suffix>
and <Type>
can assume the values of
<Suffix> | <Type> |
R32 | Core_Real32 |
R64 | Core_Real64 |
Description
Computes the sine value of the value x
.
Parameters
RETURN | <Type>* | A pointer to a <Type> variable |
Success
*RETURN
was assigned the sine value of the value x
.
Errors
| RETURN is a null pointer |
| x is ±∞ or NaN |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Size
Signature
typedef <implementation> Core_Size
Description
The greatest value of type Core_Size
.
Core_Size_Greatest
Signature
#define Core_Size_Greatest <implementation>
Description
The greatest value of type Core_Size
.
Core_Size_Least
Signature
#define Core_Size_Least <implementation>
Description
The least value of type Core_Size
.
Core_String
Signature
typedef struct Core_String Core_String;
Extends
Description
An immutable UTF-8 Byte sequence.
Core_StringBuffer
Signature
typedef struct Core_StringBuffer Core_StringBuffer;
Extends
Description
A mutable UTF-8 Byte sequence.
Core_StringBuffer_appendBytes
Signature
Core_Result Core_StringBuffer_appendBytes(Core_StringBuffer* SELF, Core_Natural8 const* bytes, Core_Size numberOfBytes);
Description
Append a UTF-8 Byte sequence to the UTF-8 Byte sequence of this Core_StringBuffer
object.
Parameters
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
bytes | Core_Natural8 const* | A pointer to an array of numberOfBytes Bytes. |
numberOfBytes | Core_Size | The number of Bytes in the array pointed to by bytes . |
Success
The Byte sequence is a valid UTF-8 Byte sequence and was appended to the UTF-8 Byte sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | bytes is a null pointer. |
Core_Error_ArgumentInvalid | The Byte sequence is not a valid UTF-8 Byte sequence. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_appendString
Signature
Core_Result Core_StringBuffer_appendString(Core_StringBuffer* SELF, Core_String* string);
Description
Append the UTF-8 Byte sequence of a Core_String
object to the UTF-8 Byte sequence of this Core_StringBuffer
object.
Parameters
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
string | Core_String* | A pointer to a Core_String object. |
Success
The UTF-8 Byte sequence of the Core_String
object was appended to the UTF-8 Byte sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | string is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_clear
Signature
Core_Result Core_StringBuffer_clear(Core_StringBuffer* SELF);
Description
Remove all Bytes.
Parameters
SELF | Core_StringBuffer* | A pointer to a Core_StringBuffer object. |
Success
All Bytes were removed from this Core_StringBuffer
object.
Consequently, the number of Bytes in this Core_StringBuffer
object is zero.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_getNumberOfBytes
Signature
Core_Result Core_StringBuffer_getNumberOfBytes(Core_Size* RETURN, Core_StringBuffer* SELF);
Description
Get the length of the UTF-8 Byte sequence of this Core_StringBuffer
object.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
Success
*RETURN
was assigned the length of this UTF-8 Byte sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_getNumberOfSymbols
Signature
Core_Result Core_StringBuffer_getNumberOfSymbols(Core_Size* RETURN, Core_StringBuffer* SELF);
Description
Get the length of the UTF-8 symbol sequence of this Core_StringBuffer
object.
Parameters
RETURN | Core_Size* | A pointer to a Core_Size variable. |
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
Success
*RETURN
was assigned the length of this UTF-8 symbol sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_getString
Signature
Core_Result Core_StringBuffer_getString(Core_String** RETURN, Core_StringBuffer* SELF);
Description
Get a copy of the UTF-8 symbol sequence of this Core_StringBuffer
object as a Core_String
object.
Parameters
RETURN | Core_String** | A pointer to a Core_String* variable. |
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
Success
*RETURN
was assigned a pointer to a Core_String
object.
The UTF-8 symbol sequencs of that Core_String
object is a copy of the UTF-8 symbol sequence of this Core_StringBuffer
object.
The caller acquired a reference to that Core_String
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_getSubString
Signature
Core_Result Core_StringBuffer_getSubString(Core_String** RETURN, Core_StringBuffer* SELF, Core_Size start, Core_Size length);
Description
Get a copy of a subsequence of the UTF-8 symbol sequence of this Core_StringBuffer
object as a Core_String
object.
Parameters
RETURN | Core_String** | A pointer to a Core_String* variable. |
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
start | Core_Size* | The index of the UTF-8 symbol at which the substring starts. |
length | Core_Size* | The length in UTF-8 symbols of the substring. |
Success
*RETURN
was assigned a pointer to a Core_String
object.
The UTF-8 symbol sequence of that Core_String
object is the subsequence of the UTF-8 symbol sequence of this Core_StringBuffer
object.
The subsequence starts at the symbol start
and ends before the symbol start+length
.
The caller acquired a reference to that Core_String
object.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | start+length is greater than the number of UTF-8 symbols in this Core_StringBuffer object. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_prependBytes
Signature
Core_Result Core_StringBuffer_prependBytes(Core_StringBuffer* SELF, Core_Natural8 const* bytes, Core_Size numberOfBytes);
Description
Prepend a UTF-8 Byte sequence to the UTF-8 Byte sequence of this Core_StringBuffer
object.
Parameters
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
bytes | Core_Natural8 const* | A pointer to an array of numberOfBytes Bytes. |
numberOfBytes | Core_Size | The number of Bytes in the array pointed to by bytes . |
Success
The Byte sequence is a valid UTF-8 Byte sequence and was prepended to the UTF-8 Byte sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | bytes is a null pointer. |
Core_Error_ArgumentInvalid | The Byte sequence is not a valid UTF-8 Byte sequence. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_prependString
Signature
Core_Result Core_StringBuffer_prependString(Core_StringBuffer* SELF, Core_String* string);
Description
Prepend the UTF-8 Byte sequence of a Core_String
object to the UTF-8 Byte seuqnece of this Core_StringBuffer
object.
Parameters
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
string | Core_String* | A pointer to a Core_String object. |
Success
The UTF-8 Byte sequence of the Core_String
object was prepended to the UTF-8 Byte sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | string is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_StringBuffer_setBytes
Signature
Core_Result Core_StringBuffer_setBytes(Core_StringBuffer* SELF, Core_Natural8 const* bytes, Core_Size numberOfBytes);
Description
Set the UTF-8 Byte sequence of this Core_StringBuffer
object.
Parameters
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
bytes | Core_Natural8 const* | A pointer to an array of numberOfBytes Bytes. |
numberOfBytes | Core_Size | The number of Bytes in the array pointed to by bytes . |
Success
The Byte sequence is a valid UTF-8 Byte sequence and was assigned as the UTF-8 Byte sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | bytes is a null pointer. |
Core_Error_ArgumentInvalid | The Byte sequence is not a valid UTF-8 Byte sequence. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.
Core_StringBuffer_setString
Signature
Core_Result Core_StringBuffer_setString(Core_StringBuffer* SELF, Core_String* string);
Description
Set the UTF-8 Byte sequence of this Core_StringBuffer
object.
Parameters
SELF | Core_StringBuffer* | A pointer to this Core_StringBuffer object. |
string | Core_String* | A pointer to a Core_String object. |
Success
The UTF-8 Byte sequence of the Core_String
object was assigned as the UTF-8 Byte sequence of this Core_StringBuffer
object.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_ArgumentInvalid | bytes is a null pointer. |
Core_Error_ArgumentInvalid | The Byte sequence is not a valid UTF-8 Byte sequence. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_Success
Signature
#define Core_Success <implementation>
Description
Symbolic constant for a zero value of type Core_Result indicating success.
Core_ThreadLocal
Signature
#define Core_ThreadLocal() <implementation>
Description
Variable annotation indicating thread local storage.
Core_True
Signature
#define Core_True <implementation>
Description
One the two values of the type Core_Boolean indicating logically true.
Core_Unlikely
Signature
#define Core_Unlikely() <implementation>
Description
Expression annotation aiding branch prediction by indicating an expression is unlikely to evaluate to logically true.In the following example, we use this function annotation to indicate that a call to malloc
is unlikely to fail.void* p = malloc(sizeof(char));if (Core_Unlikely(NULL == p)) }
Core_unreference
Signature
void Core_unreference(Core_Object* object);
Description
Decrement the reference count of an object.
Parameters
object | Core_Object* | A pointer to a Core_Object object. |
Success
This reference count of the object was decremented by 1
.
Core_Version_Major
Signature
#define Core_Version_Major <implementation>
Description
Symbolic constant defined to a non-negative integer value denoting the major version of this library.
Core_Version_Minor
Signature
#define Core_Version_Minor <implementation>
Description
Symbolic constant defined to a non-negative integer value denoting the minor version of this library.
Core_VisualsBackend
Signature
#define Core_VisualsBackend <implementation>
Description
Symbolic constant denoting the visuals backend this library was compiled for.It is always defined as one of the Core_VisualsBackend_*
constants.
Core_VisualsBackend_Direct3d12
Signature
#define Core_VisualsBackend_Direct3d12 <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_VisualsBackend_*
symbolic constants.The symbolic constant denotes the DIRECT3D 12 visuals.
Core_VisualsBackend_OpenGl4
Signature
#define Core_VisualsBackend_OpenGL4 <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_VisualsBackend_*
symbolic constants.The symbolic constant denotes the OPENGL4 visuals backend.
Core_VisualsBackend_Vulkan
Signature
#define Core_VisualsBackend_Vulkan <implementation>
Description
Symbolic constant defined to a numeric value that is different from the values of the other Core_VisualsBackend_*
symbolic constants.The symbolic constant denotes the VULKAN visuals.
Core_WeakReference
Signature
typedef struct Core_WeakReference Core_WeakReference;
Extends
Description
A weak reference.
Core_WeakReference_acquire
Signature
Core_Result Core_WeakReference_acquire(Core_Object** RETURN, Core_WeakReference* SELF);
Description
Acquire a strong reference from a weak reference.
Parameters
RETURN | Core_Object** | A pointer to this Core_Object* variable. |
SELF | Core_WeakReference* | A pointer to this Core_WeakReference* object. |
Success
*RETURN
was assigned pointer.
If this Core_WeakReference*
object references a Core_Object
, *RETURN
was assigned a pointer to the object and the caller acquired a reference to that object.
Otherwise *RETURN
was assigned a null pointer.
Errors
Core_Error_ArgumentInvalid | RETURN is a null pointer. |
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_WeakReference_construct
Signature
Core_Result Core_WeakReference_construct(Core_WeakReference* SELF, Core_Object* object);
Description
Construct a Core_WeakReference
object.
Parameters
SELF | Core_WeakReference* | A pointer to this Core_WeakReference object. |
object | Core_Object* | A pointer to a Core_Object object or a null pointer. |
Success
This Core_WeakReference
object was constructed.
The weak reference holds a null pointer if object
is a null pointer.
Otherwise it holds a pointer to the Core_Object
pointed to by object
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_WeakReference_create
Signature
Core_Result Core_WeakReference_create(Core_WeakReference** RETURN, Core_Object* object);
Description
Create a Core_WeakReference
object.
Parameters
SELF | Core_WeakReference* | A pointer to this Core_WeakReference object. |
object | Core_Object* | A pointer to a Core_Object object or a null pointer. |
Success
A Core_WeakReference
object was created. *RETURN
was assigned a pointer to that object.
The weak reference holds a null pointer if object
is a null pointer.
Otherwise it holds a pointer to the Core_Object
pointed to by object
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.
Core_WeakReference_set
Signature
Core_Result Core_WeakReference_set(Core_WeakReference* SELF, Core_Object* object);
Description
Create a Core_WeakReference
object.
Parameters
SELF | Core_WeakReference* | A pointer to this Core_WeakReference object. |
object | Core_Object* | A pointer to a Core_Object object or a null pointer. |
Success
The weak reference holds a null pointer if object
is a null pointer.
Otherwise it holds a pointer to the Core_Object
pointed to by object
.
Errors
Core_Error_ArgumentInvalid | SELF is a null pointer. |
Core_Error_AllocationFailed | An allocation failed. |
Return
Core_Success
on success. Core_Failure
on failure.
Remarks
This function sets the by-thread error variable on failure.