NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
base_types_functions.h File Reference

Functions to work with SDK basic types. More...

#include <time.h>
#include <base/inc/platform.h>
#include <base/inc/base_types.h>
#include <base/inc/sdk_results.h>
#include <base/inc/sdk_component_interface.h>

Go to the source code of this file.

Functions

SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKTimeToSDKTimeStruct (const SDKTime &time, SDKTimeStruct &time_struct)
 Splits specified SDKTime value to SDKTimeStruct values.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKTimeStructToSDKTime (const SDKTimeStruct &time_struct, SDKTime &time)
 Combines SDKTimeStruct values to one SDKTime value.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKTimeFromTimeT (const time_t &timet, SDKTime &time)
 Converts time_t value to SDKTime value.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKTimeToTimeT (const SDKTime &time, time_t &timet)
 Converts SDKTime value to time_t value.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKTimeInMilliseconds (const SDKTime &time, double &time_delta)
 Returns SDKTime as the time delta in milliseconds.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKTimeDeltaInMilliseconds (SDKTimeDelta time_delta, double &time_delta_ms)
 Returns SDKTimeDelta in milliseconds.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringInit (SDKString *str)
 Initializes SDKString structure.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringCreateA (SDKString *str, const char *ascii_string, SDKUInt32 size)
 Creates SDKString and initializes it with specified string, if 'size' is not 0, only 'size' chars are taken.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringCreateI (SDKString *str, const SDKUInt16 *int_string, SDKUInt32 size)
 Creates SDKString from its internal representation. 'size' should contain length of the initialization string.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringCreateW (SDKString *str, const wchar_t *wide_string, SDKUInt32 size)
 Creates SDKString and initializes it with specified string if 'size' is not 0, only 'size' chars are taken.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringDelete (SDKString *str)
 Deletes SDKString instance.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringDuplicate (const SDKString *src, SDKString *dst)
 Duplicates SDKString instance.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringCompare (const SDKString *str1, const SDKString *str2)
 Compares strings. More...
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKStringGetSize (const SDKString *str, SDKUInt32 *size)
 Returns SDKString size.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyInit (SDKAny *any)
 Initializes SDKAny value to empty state.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyInitString (SDKAny *any)
 Initializes SDKAny value to contain pointer to empty SDKString.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyInitAny (SDKAny *any)
 Initializes SDKAny value to contain pointer to empty SDKAny.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyInitArray (SDKAny *any, SDKAnyType element_type, SDKUInt32 element_size)
 Initializes SDKAny value to contain pointer to empty SDKArray.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyClear (SDKAny *any)
 Clears SDKAny value (deleting complex types)
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyDuplicate (const SDKAny *any_src, SDKAny *any_dest)
 Duplicates SDKAny value (deep copy)
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyChangeType (SDKAny *any, SDKAnyType new_type)
 Converts SDKAny value of one type to SDKAny value of another type.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyCompare (const SDKAny *any1, const SDKAny *any2)
 Compares two SDKAny. More...
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAnyCompareValue (const SDKAny *any1, const SDKAny *any2)
 Compares values of two SDKAny. More...
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKArrayInit (SDKArray *arr)
 Initialize SDKArray structure.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKArrayCreate (SDKArray *arr, SDKAnyType element_type, SDKUInt32 element_size, SDKUInt64 num_of_elements)
 Creates SDKArray value.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKArrayDelete (SDKArray *arr)
 Deletes SDKArray instance.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKArrayDuplicate (const SDKArray *arr_src, SDKArray *arr_dest)
 Duplicates SDKArray instance.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKArrayResize (SDKArray *arr, SDKUInt64 new_num_of_elements)
 Expands or shrinks SDKArray to specified size.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKArrayCompare (const SDKArray *arr1, const SDKArray *arr2)
 Compares arrays. More...
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKShutdown ()
 Shutdowns the base library Call to given method is highly recommended on shutdown of application. This will unload all of the libraries in use, therefore all of SDK components in use should be already released before given call.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKAtomicRefCount SDK_APICALLTYPE SDKAtomicRefCountInc (volatile SDKAtomicRefCount *ptr)
 Atomic increment a reference count by 1.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKAtomicRefCount SDK_APICALLTYPE SDKAtomicRefCountDec (volatile SDKAtomicRefCount *ptr)
 Atomic decrement a reference count by 1. Decrement a reference count by 1.Returns the new value of *ptr with the increment applied.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKAtomicRefCountIsZero (volatile SDKAtomicRefCount *ptr)
 Return whether the reference count is zero. Returns 1 if zero 0 otherwise.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKAtomicRefCount SDK_APICALLTYPE SDKAtomicRefCountExchange (volatile SDKAtomicRefCount *ptr, SDKAtomicRefCount new_value)
 Atomically store new_value into *ptr. Returns the previous value held in *ptr.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKSetLastError (SDKUInt32 error_id, sdk::ISDKProperties *error_params)
 Remembers last error in a errors stack.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKGetLastError (sdk::IEnumSDKProperty **errors)
 Returns list of last errors.
 
SDK_EXTERN_C SDK_BASE_LIBRARY_EXPORT_API SDKResult SDK_APICALLTYPE SDKClearLastError ()
 Resets list of last errors.
 

Detailed Description

Functions to work with SDK basic types.

Copyright (c) 2011 The NAVTOR SDK. All Rights Reserved.

Author
The NAVTOR SDK authors
Date
08/2011
Maintenance:
The NAVTOR SDK authors