Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed NrtErrorHandling C API #592

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ extern "C"

size_t Nrt_ComponentBufferMemoryContainer_GetImmutableDataLength(NrtComponentBufferMemoryContainerHandle container);

NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_ComponentBufferMemoryContainer_begin(
NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_ComponentBufferMemoryContainer_Begin(
NrtComponentBufferMemoryContainerHandle container);

NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_ComponentBufferMemoryContainer_end(
NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_ComponentBufferMemoryContainer_End(
NrtComponentBufferMemoryContainerHandle container);

NrtResult Nrt_ComponentBufferMemoryContainer_Destroy(NrtComponentBufferMemoryContainerHandle container);
Expand Down
8 changes: 4 additions & 4 deletions include/NovelRT.Interop/Ecs/NrtSparseSetMemoryContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ extern "C"
NrtSparseSetMemoryContainerHandle container,
size_t key);

NrtSparseSetMemoryContainer_IteratorHandle Nrt_SparseSetMemoryContainer_begin(
NrtSparseSetMemoryContainer_IteratorHandle Nrt_SparseSetMemoryContainer_Begin(
NrtSparseSetMemoryContainerHandle container);

NrtSparseSetMemoryContainer_IteratorHandle Nrt_SparseSetMemoryContainer_end(
NrtSparseSetMemoryContainer_IteratorHandle Nrt_SparseSetMemoryContainer_End(
NrtSparseSetMemoryContainerHandle container);

NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_SparseSetMemoryContainer_cbegin(
NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_SparseSetMemoryContainer_Cbegin(
NrtSparseSetMemoryContainerHandle container);

NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_SparseSetMemoryContainer_cend(
NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_SparseSetMemoryContainer_Cend(
NrtSparseSetMemoryContainerHandle container);

NrtResult Nrt_SparseSetMemoryContainer_Destroy(NrtSparseSetMemoryContainerHandle container);
Expand Down
4 changes: 2 additions & 2 deletions include/NovelRT.Interop/Ecs/NrtUnsafeComponentView.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ extern "C"

size_t Nrt_UnsafeComponentView_GetImmutableDataLength(NrtUnsafeComponentViewHandle componentView);

NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_UnsafeComponentView_begin(
NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_UnsafeComponentView_Begin(
NrtUnsafeComponentViewHandle componentView);

NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_UnsafeComponentView_end(
NrtSparseSetMemoryContainer_ConstIteratorHandle Nrt_UnsafeComponentView_End(
NrtUnsafeComponentViewHandle componentView);

NrtResult Nrt_UnsafeComponentView_Destroy(NrtUnsafeComponentViewHandle componentView);
Expand Down
2 changes: 1 addition & 1 deletion include/NovelRT.Interop/Maths/NrtGeoBounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern "C"
{
#endif

NrtGeoBounds Nrt_GeoBounds_zero();
NrtGeoBounds Nrt_GeoBounds_Zero();
NrtGeoVector2F Nrt_GeoBounds_GetCornerInLocalSpace(NrtGeoBounds bounds, int32_t index);
NrtGeoVector2F Nrt_GeoBounds_GetCornerInWorldSpace(NrtGeoBounds bounds, int32_t index);
NrtBool Nrt_GeoBounds_PointIsWithinBounds(NrtGeoBounds bounds, NrtGeoVector2F point);
Expand Down
46 changes: 23 additions & 23 deletions include/NovelRT.Interop/NrtErrorHandling.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ extern "C"
{
#endif

const char* Nrt_getLastError();
const char* Nrt_GetLastError();

// Internal
const char* Nrt_getLastErrorInternal();
void Nrt_setErrMsgIsNullInstanceProvidedInternal();
void Nrt_setErrMsgIsNullArgumentProvidedInternal();
void Nrt_setErrMsgIsNaNInternal();
void Nrt_setErrMsgDupKeyGivenInternal();
void Nrt_setErrMsgCompilationErrorInternal();
void Nrt_setErrMsgIsFileNotFoundInternal();
void Nrt_setErrMsgIsDivideByZeroInternal();
void Nrt_setErrMsgIsAlreadyDeletedOrRemovedInternal();
void Nrt_setErrMsgIsNotSupportedInternal();
void Nrt_setErrMsgIsInitialisationFailureInternal();
void Nrt_setErrMsgIsFunctionNotFoundInternal();
void Nrt_setErrMsgIsNotInitialisedInternal();
void Nrt_setErrMsgIsArgumentOutOfRangeInternal();
void Nrt_setErrMsgIsInvalidOperationInternal();
void Nrt_setErrMsgIsCharacterNotFoundInternal();
void Nrt_setErrMsgIsOutOfMemoryInternal();
void Nrt_setErrMsgKeyNotFoundInternal();
void Nrt_setErrMsgRuntimeNotFoundInternal();
void Nrt_setErrMsgErrorUnknownInternal();
void Nrt_setErrMsgIsInvalidPathInternal();
void Nrt_setErrMsgCustomInternal(const char* message);
const char* Nrt_GetLastErrorInternal();
void Nrt_SetErrMsgIsNullInstanceProvidedInternal();
void Nrt_SetErrMsgIsNullArgumentProvidedInternal();
void Nrt_SetErrMsgIsNaNInternal();
void Nrt_SetErrMsgDupKeyGivenInternal();
void Nrt_SetErrMsgCompilationErrorInternal();
void Nrt_SetErrMsgIsFileNotFoundInternal();
void Nrt_SetErrMsgIsDivideByZeroInternal();
void Nrt_SetErrMsgIsAlreadyDeletedOrRemovedInternal();
void Nrt_SetErrMsgIsNotSupportedInternal();
void Nrt_SetErrMsgIsInitialisationFailureInternal();
void Nrt_SetErrMsgIsFunctionNotFoundInternal();
void Nrt_SetErrMsgIsNotInitialisedInternal();
void Nrt_SetErrMsgIsArgumentOutOfRangeInternal();
void Nrt_SetErrMsgIsInvalidOperationInternal();
void Nrt_SetErrMsgIsCharacterNotFoundInternal();
void Nrt_SetErrMsgIsOutOfMemoryInternal();
void Nrt_SetErrMsgKeyNotFoundInternal();
void Nrt_SetErrMsgRuntimeNotFoundInternal();
void Nrt_SetErrMsgErrorUnknownInternal();
void Nrt_SetErrMsgIsInvalidPathInternal();
void Nrt_SetErrMsgCustomInternal(const char* message);

#ifdef __cplusplus
}
Expand Down
22 changes: 11 additions & 11 deletions include/NovelRT.Interop/NrtLoggingService.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ extern "C"
{
#endif

NrtLoggingServiceHandle Nrt_LoggingService_create();
NrtLoggingServiceHandle Nrt_LoggingService_Create();
NrtLoggingServiceHandle Nrt_LoggingService_createCustomTitle(const char* core);
NrtLoggingServiceHandle Nrt_LoggingService_createCustomTitleAndLevel(const char* core, NrtLogLevel level);
NrtResult Nrt_LoggingService_log(NrtLoggingServiceHandle service, const char* message, NrtLogLevel level);
NrtResult Nrt_LoggingService_logInfoLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_logErrorLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_logWarningLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_logDebugLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_logInternal(NrtLoggingServiceHandle service, const char* message, NrtLogLevel level);
NrtResult Nrt_LoggingService_setLogLevel(NrtLoggingServiceHandle service, NrtLogLevel level);
NrtResult Nrt_LoggingService_throwIfNullPtr(NrtLoggingServiceHandle service,
NrtLoggingServiceHandle Nrt_LoggingService_CreateCustomTitleAndLevel(const char* core, NrtLogLevel level);
NrtResult Nrt_LoggingService_Log(NrtLoggingServiceHandle service, const char* message, NrtLogLevel level);
NrtResult Nrt_LoggingService_LogInfoLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_LogErrorLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_LogWarningLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_LogDebugLine(NrtLoggingServiceHandle service, const char* message);
NrtResult Nrt_LoggingService_LogInternal(NrtLoggingServiceHandle service, const char* message, NrtLogLevel level);
NrtResult Nrt_LoggingService_SetLogLevel(NrtLoggingServiceHandle service, NrtLogLevel level);
NrtResult Nrt_LoggingService_ThrowIfNullPtr(NrtLoggingServiceHandle service,
void* object,
const char* exceptionMessage);
NrtResult Nrt_LoggingService_throwIfNotZero(NrtLoggingServiceHandle service,
NrtResult Nrt_LoggingService_ThrowIfNotZero(NrtLoggingServiceHandle service,
int32_t error,
const char* exceptionMessage);

Expand Down
12 changes: 6 additions & 6 deletions include/NovelRT.Interop/SceneGraph/NrtQuadTreeNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ extern "C"
{
#endif

NrtResult Nrt_QuadTreeNode_create(NrtQuadTreeScenePointArrayHandle points, NrtQuadTreeNodeHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_getTopLeft(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_getTopRight(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_getBottomLeft(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_getBottomRight(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_Create(NrtQuadTreeScenePointArrayHandle points, NrtQuadTreeNodeHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_GetTopLeft(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_GetTopRight(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_GetBottomLeft(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeNode_GetBottomRight(NrtQuadTreeNodeHandle node, NrtQuadTreeScenePointHandle* outputPoint);

NrtResult Nrt_QuadTreeScenePointArray_create(NrtQuadTreeScenePointHandle pointOne,
NrtResult Nrt_QuadTreeScenePointArray_Create(NrtQuadTreeScenePointHandle pointOne,
NrtQuadTreeScenePointHandle pointTwo,
NrtQuadTreeScenePointHandle pointThree,
NrtQuadTreeScenePointHandle pointFour,
Expand Down
6 changes: 3 additions & 3 deletions include/NovelRT.Interop/SceneGraph/NrtQuadTreeScenePoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ extern "C"
{
#endif

NrtResult Nrt_QuadTreeScenePoint_createVector(NrtGeoVector2F position,
NrtResult Nrt_QuadTreeScenePoint_CreateVector(NrtGeoVector2F position,
NrtSceneNodeHandle node,
NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeScenePoint_createFloat(float x,
NrtResult Nrt_QuadTreeScenePoint_CreateFloat(float x,
float y,
NrtSceneNodeHandle node,
NrtQuadTreeScenePointHandle* outputPoint);
NrtResult Nrt_QuadTreeScenePoint_getSceneNode(NrtQuadTreeScenePointHandle point, NrtSceneNodeHandle* outputNode);
NrtResult Nrt_QuadTreeScenePoint_GetSceneNode(NrtQuadTreeScenePointHandle point, NrtSceneNodeHandle* outputNode);

#ifdef __cplusplus
}
Expand Down
8 changes: 4 additions & 4 deletions include/NovelRT.Interop/SceneGraph/NrtScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ extern "C"
{
#endif

NrtSceneHandle Nrt_Scene_create();
NrtResult Nrt_Scene_getNodes(NrtSceneHandle scene, NrtSceneNodeSetHandle* outputSet);
NrtBool Nrt_Scene_insert(NrtSceneHandle scene, NrtSceneNodeHandle nodeToInsert);
NrtBool Nrt_Scene_remove(NrtSceneHandle scene, NrtSceneNodeHandle nodeToRemove);
NrtSceneHandle Nrt_Scene_Create();
NrtResult Nrt_Scene_GetNodes(NrtSceneHandle scene, NrtSceneNodeSetHandle* outputSet);
NrtBool Nrt_Scene_Insert(NrtSceneHandle scene, NrtSceneNodeHandle nodeToInsert);
NrtBool Nrt_Scene_Remove(NrtSceneHandle scene, NrtSceneNodeHandle nodeToRemove);
NrtResult Nrt_Scene_Destroy(NrtSceneHandle scene);

#ifdef __cplusplus
Expand Down
26 changes: 13 additions & 13 deletions include/NovelRT.Interop/SceneGraph/NrtSceneNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ extern "C"
{
#endif

NrtSceneNodeHandle Nrt_SceneNode_create();
NrtResult Nrt_SceneNode_getChildren(NrtSceneNodeHandle node, NrtSceneNodeSetHandle* outputSet);
NrtResult Nrt_SceneNode_getParents(NrtSceneNodeHandle node, NrtSceneNodeSetHandle* outputSet);
NrtBool Nrt_SceneNode_insert(NrtSceneNodeHandle node, NrtSceneNodeHandle nodeToInsert);
NrtBool Nrt_SceneNode_remove(NrtSceneNodeHandle node, NrtSceneNodeHandle nodeToRemove);
NrtBool Nrt_SceneNode_isAdjacent(NrtSceneNodeHandle firstNode, NrtSceneNodeHandle secondNode);
NrtResult Nrt_SceneNode_traverseBreadthFirst(NrtSceneNodeHandle node,
NrtSceneNodeHandle Nrt_SceneNode_Create();
NrtResult Nrt_SceneNode_GetChildren(NrtSceneNodeHandle node, NrtSceneNodeSetHandle* outputSet);
NrtResult Nrt_SceneNode_GetParents(NrtSceneNodeHandle node, NrtSceneNodeSetHandle* outputSet);
NrtBool Nrt_SceneNode_Insert(NrtSceneNodeHandle node, NrtSceneNodeHandle nodeToInsert);
NrtBool Nrt_SceneNode_Remove(NrtSceneNodeHandle node, NrtSceneNodeHandle nodeToRemove);
NrtBool Nrt_SceneNode_IsAdjacent(NrtSceneNodeHandle firstNode, NrtSceneNodeHandle secondNode);
NrtResult Nrt_SceneNode_TraverseBreadthFirst(NrtSceneNodeHandle node,
void (*action)(NrtSceneNodeHandle, void*),
void* context);
NrtResult Nrt_SceneNode_traverseBreadthFirstWithIterator(NrtSceneNodeHandle node,
NrtResult Nrt_SceneNode_TraverseBreadthFirstWithIterator(NrtSceneNodeHandle node,
int32_t (*action)(NrtSceneNodeHandle, void*),
void* context,
NrtSceneNodeBreadthFirstIteratorHandle* outputIterator);
NrtResult Nrt_SceneNode_traverseDepthFirst(NrtSceneNodeHandle node,
NrtResult Nrt_SceneNode_TraverseDepthFirst(NrtSceneNodeHandle node,
void (*action)(NrtSceneNodeHandle, void*),
void* context);
NrtResult Nrt_SceneNode_traverseDepthFirstWithIterator(NrtSceneNodeHandle node,
NrtResult Nrt_SceneNode_TraverseDepthFirstWithIterator(NrtSceneNodeHandle node,
int32_t (*action)(NrtSceneNodeHandle, void*),
void* context,
NrtSceneNodeDepthFirstIteratorHandle* outputIterator);
NrtBool Nrt_SceneNode_canReach(NrtSceneNodeHandle firstNode, NrtSceneNodeHandle secondNode);
NrtBool Nrt_SceneNode_CanReach(NrtSceneNodeHandle firstNode, NrtSceneNodeHandle secondNode);
NrtResult Nrt_SceneNode_Destroy(NrtSceneNodeHandle node);

NrtResult Nrt_SceneNodeSet_Destroy(NrtSceneNodeSetHandle nodeSet);
size_t Nrt_SceneNodeSet_getSize(const NrtSceneNodeSetHandle nodeSet);
NrtResult Nrt_SceneNodeSet_getSceneNodeFromIndex(const NrtSceneNodeSetHandle nodeSet,
size_t Nrt_SceneNodeSet_GetSize(const NrtSceneNodeSetHandle nodeSet);
NrtResult Nrt_SceneNodeSet_GetSceneNodeFromIndex(const NrtSceneNodeSetHandle nodeSet,
size_t index,
NrtSceneNodeHandle* outputSceneNode);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ extern "C"
{
#endif

NrtResult Nrt_SceneNodeBreadthFirstIterator_create(NrtSceneNodeHandle node,
NrtResult Nrt_SceneNodeBreadthFirstIterator_Create(NrtSceneNodeHandle node,
int32_t (*func)(NrtSceneNodeHandle, void*),
void* context,
NrtSceneNodeBreadthFirstIteratorHandle* outputIterator);
NrtResult Nrt_SceneNodeBreadthFirstIterator_increment(NrtSceneNodeBreadthFirstIteratorHandle iterator);
NrtResult Nrt_SceneNodeBreadthFirstIterator_postFixIncrement(NrtSceneNodeBreadthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeBreadthFirstIterator_isEnd(NrtSceneNodeBreadthFirstIteratorHandle iterator);
int32_t Nrt_SceneNodeBreadthFirstIterator_runFunction(NrtSceneNodeBreadthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeBreadthFirstIterator_isEqual(NrtSceneNodeBreadthFirstIteratorHandle iterator,
NrtResult Nrt_SceneNodeBreadthFirstIterator_Increment(NrtSceneNodeBreadthFirstIteratorHandle iterator);
NrtResult Nrt_SceneNodeBreadthFirstIterator_PostFixIncrement(NrtSceneNodeBreadthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeBreadthFirstIterator_IsEnd(NrtSceneNodeBreadthFirstIteratorHandle iterator);
int32_t Nrt_SceneNodeBreadthFirstIterator_RunFunction(NrtSceneNodeBreadthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeBreadthFirstIterator_IsEqual(NrtSceneNodeBreadthFirstIteratorHandle iterator,
NrtSceneNodeBreadthFirstIteratorHandle other);
NrtBool Nrt_SceneNodeBreadthFirstIterator_isNotEqual(NrtSceneNodeBreadthFirstIteratorHandle iterator,
NrtBool Nrt_SceneNodeBreadthFirstIterator_IsNotEqual(NrtSceneNodeBreadthFirstIteratorHandle iterator,
NrtSceneNodeBreadthFirstIteratorHandle other);

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ extern "C"
{
#endif

NrtResult Nrt_SceneNodeDepthFirstIterator_create(NrtSceneNodeHandle node,
NrtResult Nrt_SceneNodeDepthFirstIterator_Create(NrtSceneNodeHandle node,
int32_t (*func)(NrtSceneNodeHandle, void*),
void* context,
NrtSceneNodeDepthFirstIteratorHandle* outputIterator);
NrtResult Nrt_SceneNodeDepthFirstIterator_increment(NrtSceneNodeDepthFirstIteratorHandle iterator);
NrtResult Nrt_SceneNodeDepthFirstIterator_postFixIncrement(NrtSceneNodeDepthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeDepthFirstIterator_isEnd(NrtSceneNodeDepthFirstIteratorHandle iterator);
int32_t Nrt_SceneNodeDepthFirstIterator_runFunction(NrtSceneNodeDepthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeDepthFirstIterator_isEqual(NrtSceneNodeDepthFirstIteratorHandle iterator,
NrtResult Nrt_SceneNodeDepthFirstIterator_Increment(NrtSceneNodeDepthFirstIteratorHandle iterator);
NrtResult Nrt_SceneNodeDepthFirstIterator_PostFixIncrement(NrtSceneNodeDepthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeDepthFirstIterator_IsEnd(NrtSceneNodeDepthFirstIteratorHandle iterator);
int32_t Nrt_SceneNodeDepthFirstIterator_RunFunction(NrtSceneNodeDepthFirstIteratorHandle iterator);
NrtBool Nrt_SceneNodeDepthFirstIterator_IsEqual(NrtSceneNodeDepthFirstIteratorHandle iterator,
NrtSceneNodeDepthFirstIteratorHandle other);
NrtBool Nrt_SceneNodeDepthFirstIterator_isNotEqual(NrtSceneNodeDepthFirstIteratorHandle iterator,
NrtBool Nrt_SceneNodeDepthFirstIterator_IsNotEqual(NrtSceneNodeDepthFirstIteratorHandle iterator,
NrtSceneNodeDepthFirstIteratorHandle other);

#ifdef __cplusplus
Expand Down
Loading
Loading