NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
SDKString Helpers

SDKString helpers. More...

Data Structures

class  SDKStringHandler
 This class wraps the SDKString type. More...
 
class  SDKStringWrapper
 Simple wrapper to access the SDKString properties. More...
 
class  SDKStringReturnHelper
 Helps to get wide string results from SDKString interface parameters. More...
 

Typedefs

typedef sdk::SDKStringHandler ScopedString
 Synonym for the SDKStringHandler.
 

Functions

static std::string SDKMakeString (const SDKString &sdk_string)
 Converts SDKString to std::string. More...
 
static std::wstring SDKMakeWString (const SDKString &sdk_string)
 Converts SDKString to std::wstring. More...
 
bool IsSDKStringEqual (const SDKString *str1, const SDKString *str2)
 Compares two SDKStrings. More...
 

Detailed Description

SDKString helpers.

Function Documentation

◆ SDKMakeString()

static std::string sdk::SDKMakeString ( const SDKString &  sdk_string)
static

Converts SDKString to std::string.

Parameters
[in]sdk_stringany SDKString instance.
Returns
corresponding std::string.
Exceptions
None
Thread safety:
Thread safe.

All 16 bit characters are just truncated to chars, no special conversion is made.

◆ SDKMakeWString()

static std::wstring sdk::SDKMakeWString ( const SDKString &  sdk_string)
static

Converts SDKString to std::wstring.

Parameters
[in]sdk_stringany SDKString instance.
Returns
corresponding std::wstring.
Exceptions
None
Thread safety:
Thread safe.

All characters are just copied to wchars, no special conversion is made

◆ IsSDKStringEqual()

bool sdk::IsSDKStringEqual ( const SDKString *  str1,
const SDKString *  str2 
)
inline

Compares two SDKStrings.

Special cases:
if both arguments are null, result is true,
if one argument is null, result false
if lengths differs, result is false
if lengths are equal to zero, result is true
if ant data pointer is null (when length >0), result is false