xsstring.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification,
6 // are permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice,
9 // this list of conditions, and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice,
12 // this list of conditions, and the following disclaimer in the documentation
13 // and/or other materials provided with the distribution.
14 //
15 // 3. Neither the names of the copyright holders nor the names of their contributors
16 // may be used to endorse or promote products derived from this software without
17 // specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
26 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
28 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
29 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
30 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
31 //
32 
33 
34 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
35 // All rights reserved.
36 //
37 // Redistribution and use in source and binary forms, with or without modification,
38 // are permitted provided that the following conditions are met:
39 //
40 // 1. Redistributions of source code must retain the above copyright notice,
41 // this list of conditions, and the following disclaimer.
42 //
43 // 2. Redistributions in binary form must reproduce the above copyright notice,
44 // this list of conditions, and the following disclaimer in the documentation
45 // and/or other materials provided with the distribution.
46 //
47 // 3. Neither the names of the copyright holders nor the names of their contributors
48 // may be used to endorse or promote products derived from this software without
49 // specific prior written permission.
50 //
51 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
52 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
53 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
54 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
56 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
58 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
59 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
60 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
61 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
62 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
63 //
64 
65 #ifndef XSSTRING_H
66 #define XSSTRING_H
67 
68 #include "xstypesconfig.h"
69 #include "xsarray.h"
70 #ifndef XSENS_NO_WCHAR
71  #include <wchar.h>
72 #endif // XSENS_NO_WCHAR
73 #include <string.h>
74 
75 #ifdef __cplusplus
76 #include <string>
77 #include <cstdlib>
78 #include <cstdio>
79 extern "C" {
80 #endif
81 
83 
84 #ifndef __cplusplus
85 #define XsString_INITIALIZER XSARRAY_INITIALIZER(&g_xsStringDescriptor)
87 typedef struct XsString XsString;
88 // obsolete:
89 #define XSSTRING_INITIALIZER XsString_INITIALIZER
90 #else
91 struct XsString;
92 #endif
93 
96 XSTYPES_DLL_API void XsString_assign(XsString* thisPtr, XsSize count, const char* src);
97 XSTYPES_DLL_API void XsString_assignCharArray(XsString* thisPtr, const char* src);
98 XSTYPES_DLL_API void XsString_resize(XsString* thisPtr, XsSize count);
99 XSTYPES_DLL_API void XsString_append(XsString* thisPtr, XsString const* other);
100 XSTYPES_DLL_API void XsString_erase(XsString* thisPtr, XsSize index, XsSize count);
101 XSTYPES_DLL_API void XsString_push_back(XsString* thisPtr, char c);
103 XSTYPES_DLL_API int XsString_endsWith(XsString const* thisPtr, XsString const* other, int caseSensitive);
104 XSTYPES_DLL_API int XsString_startsWith(XsString const* thisPtr, XsString const* other, int caseSensitive);
105 XSTYPES_DLL_API int XsString_contains(XsString const* thisPtr, XsString const* other, int caseSensitive, XsSize* offset);
106 XSTYPES_DLL_API int XsString_empty(XsString const* thisPtr);
107 XSTYPES_DLL_API void XsString_sort(XsString* thisPtr);
109 XSTYPES_DLL_API ptrdiff_t XsString_findSubStr(XsString const* thisPtr, XsString const* needle);
110 XSTYPES_DLL_API void XsString_mid(XsString* thisPtr, XsString const* source, XsSize start, XsSize count);
111 XSTYPES_DLL_API void XsString_replaceAll(XsString* thisPtr, XsString const* src, XsString const* dst);
112 XSTYPES_DLL_API void XsString_trimmed(XsString* thisPtr, XsString const* source);
113 
114 #ifndef XSENS_NO_WCHAR
115 XSTYPES_DLL_API XsSize XsString_copyToWCharArray(const XsString* thisPtr, wchar_t* dest, XsSize size);
116 XSTYPES_DLL_API wchar_t XsString_utf8At(const XsString* thisPtr, XsSize index);
117 XSTYPES_DLL_API void XsString_assignWCharArray(XsString* thisPtr, const wchar_t* src);
118 XSTYPES_DLL_API void XsString_push_backWChar(XsString* thisPtr, wchar_t c);
119 #endif // XSENS_NO_WCHAR
120 
121 #ifndef __cplusplus
122 // obsolete:
123 #define XsString_copy(thisPtr, copy) XsArray_copy(copy, thisPtr)
124 #define XsString_swap(a, b) XsArray_swap(a, b)
125 #endif
126 #ifdef __cplusplus
127 } // extern "C"
128 #endif
129 
130 #ifdef __cplusplus
131 /* We need some special template implementations for strings to keep them 0-terminated
132 */
133 // this typedef is not _always_ interpreted correctly by doxygen, hence the occasional function where we're NOT using it.
134 typedef XsArrayImpl<char, g_xsStringDescriptor, XsString> XsStringType;
135 
141 template<> inline XsSize XsStringType::size() const noexcept
142 {
143  return m_size ? m_size - 1 : 0;
144 }
145 
147 template<> inline void XsStringType::reserve(XsSize count)
148 {
149  if (count)
150  XsArray_reserve(this, count + 1);
151  else
152  XsArray_reserve(this, 0);
153 }
154 
156 template<> inline XsSize XsStringType::reserved() const
157 {
158  return m_reserved ? m_reserved - 1 : 0;
159 }
160 
162 template<> inline void XsStringType::erase(XsSize index, XsSize count)
163 {
164  XsString_erase((XsString*) this, index, count);
165 }
166 
173 template<> inline void XsArrayImpl<char, g_xsStringDescriptor, XsString>::insert(char const* items, XsSize index, XsSize count)
174 {
175  if (size())
176  {
177  if (index >= size())
178  index = size();
179  XsArray_insert(this, index, count, items);
180  }
181  else
182  XsString_assign((XsString*) this, count, items);
183 }
184 
193 template<> inline void XsArrayImpl<char, g_xsStringDescriptor, XsString>::assign(XsSize count, char const* src)
194 {
195  XsString_assign((XsString*) this, count, src);
196 }
197 
202 template<> inline void XsArrayImpl<char, g_xsStringDescriptor, XsString>::resize(XsSize count)
203 {
204  XsString_resize((XsString*) this, count);
205 }
206 
212 template<> inline void XsArrayImpl<char, g_xsStringDescriptor, XsString>::setSize(XsSize count)
213 {
214  if (count != size())
215  XsString_assign((XsString*) this, count, 0);
216 }
217 
219 template<> inline void XsArrayImpl<char, g_xsStringDescriptor, XsString>::append(const XsStringType& other)
220 {
221  XsString_append((XsString*) this, (XsString const*) &other);
222 }
223 
224 struct XsString : public XsStringType
225 {
227  inline explicit XsString(XsSize sz = 0, char const* src = 0)
228  : XsStringType()
229  {
230  if (sz || src)
231  XsString_assign(this, sz, src);
232  }
233 
234 #ifndef SWIG
235  inline XsString(const XsStringType& other)
237  : XsStringType(other)
238  {
239  }
240 #else
241  inline XsString(const XsString& other)
242  : XsStringType(other)
243  {
244  }
245 #endif
246 
248  inline explicit XsString(char* ref, XsSize sz, XsDataFlags flags /* = XSDF_None */)
249  : XsStringType(ref, sz + 1, flags)
250  {
251  }
252 #ifndef XSENS_NOITERATOR
253  template <typename Iterator>
255  inline explicit XsString(Iterator const& beginIt, Iterator const& endIt)
256  : XsStringType(beginIt, endIt)
257  {
258  }
259 #endif
260 
262  inline XsString(char const* src)
263  : XsStringType()
264  {
265  if (src && src[0])
266  XsString_assignCharArray(this, src);
267  }
268 
269 #ifndef XSENS_NO_WCHAR
270  inline XsString(wchar_t const* src)
272  : XsStringType()
273  {
274  if (src && src[0])
275  XsString_assignWCharArray(this, src);
276  }
277 #endif
278 
279 #ifndef XSENS_NO_STL
280  inline XsString(std::string const& src)
282  : XsStringType()
283  {
284  if (!src.empty())
285  XsString_assign(this, (XsSize)src.size() + 1, src.c_str());
286  }
287 
289  inline XsString(std::wstring const& src)
290  : XsStringType()
291  {
292  if (!src.empty())
293  XsString_assignWCharArray(this, src.c_str());
294  }
295 #endif // XSENS_NO_STL
296 
298  inline char* c_str()
299  {
300  static const char nullChar = 0;
301  if (empty())
302  return const_cast<char*>(&nullChar);
303 #ifdef XSENS_NO_EXCEPTION
304  try
305  {
306  return begin().operator ->();
307  }
308  catch (...)
309  {
310  return const_cast<char*>(&nullChar);
311  }
312 #else
313  return begin().operator->();
314 #endif
315  }
316 
318  inline char const* c_str() const
319  {
320  static const char nullChar = 0;
321  if (empty())
322  return &nullChar;
323 #ifdef XSENS_NO_EXCEPTION
324  try
325  {
326  return begin().operator ->();
327  }
328  catch (...)
329  {
330  return &nullChar;
331  }
332 #else
333  return begin().operator->();
334 #endif
335  }
336 
337 #ifndef XSENS_NO_STL
338  inline std::string toStdString() const
340  {
341  if (empty())
342  return std::string();
343  return std::string((char const*)begin().operator ->());
344  }
345 #endif // XSENS_NO_STL
346 
348  XsString operator + (XsString const& other) const
349  {
350  XsString tmp;
351  tmp.reserve(size() + other.size());
352  tmp.append(*this);
353  tmp.append(other);
354  return tmp;
355  }
356 
357 #ifndef XSENS_NO_STL
358  std::wstring toStdWString() const
360  {
361  if (empty())
362  return std::wstring();
363  size_t s = XsString_copyToWCharArray(this, NULL, 0);
364  std::wstring w;
365  w.resize(s - 1);
366  (void) XsString_copyToWCharArray(this, &w[0], (XsSize)s);
367  return w;
368  }
369 #endif // XSENS_NO_STL
370 
372  using XsStringType::operator ==;
373  using XsStringType::operator !=;
374 #ifndef XSENS_NOITERATOR
375  using XsStringType::operator <<;
376 #endif
377 
379  inline bool operator == (char const* str) const
381  {
382  if (!str)
383  return empty();
384  return !strcmp(c_str(), str);
385  }
386 
388  inline bool operator == (XsString const& str) const
389  {
390  return XsStringType::operator ==(str);
391  }
392 
394  inline bool operator != (char const* str) const
395  {
396  return !(*this == str);
397  }
398 
400  inline bool operator != (XsString const& str) const
401  {
402  return !(*this == str);
403  }
404 
406  inline XsString& operator << (char const* str)
407  {
408  if (str && str[0])
409  {
410  XsString const ref(const_cast<char*>(str), (XsSize)strlen(str), XSDF_None);
411  append(ref);
412  }
413  return *this;
414  }
415 
417  inline XsString& operator << (int i)
418  {
419  char buffer[32];
421  append(XsString(buffer, (XsSize)(ptrdiff_t) std::sprintf(buffer, "%d", i), XSDF_None));
422  return *this;
423  }
424 
426  inline XsString& operator << (XsString const& s)
427  {
428  append(s);
429  return *this;
430  }
431 
433  inline bool operator < (const XsString& str) const
434  {
435 #ifdef XSENS_NO_STL
436  return (strcmp(c_str(), str.c_str()) < 0);
437 #else
438  return (this->toStdString() < str.toStdString());
439 #endif
440  }
441 
443  inline bool operator > (const XsString& str) const
444  {
445 #ifdef XSENS_NO_STL
446  return (strcmp(c_str(), str.c_str()) > 0);
447 #else
448  return (this->toStdString() > str.toStdString());
449 #endif
450  }
451 
452 #ifndef SWIG
453 
454  friend inline void swap(XsString& first, XsString& second)
455  {
456  first.swap(second);
457  }
458 #endif
459 
461  inline XsString& push_back(char c)
462  {
463  XsString_push_back(this, c);
464  return *this;
465  }
466 
468  inline bool empty() const
469  {
470  return !!XsString_empty(this);
471  }
472 
473 #ifndef SWIG
474  using XsStringType::append;
475 #else
476  void append(XsString const& other)
477  {
478  XsStringType::append(other);
479  }
480 #endif
481 
483  inline void append(char const* other)
484  {
485  if (other)
486  {
487  XsString tmp(other);
488  XsString_append(this, &tmp);
489  }
490  }
491 
492 #ifndef XSENS_NO_WCHAR
493  inline void append(wchar_t const* other)
495  {
496  if (other)
497  {
498  XsString tmp(other);
499  XsString_append(this, &tmp);
500  }
501  }
502 #endif
503 
505  inline XsSize utf8Len() const
506  {
507  return XsString_utf8Len(this);
508  }
509 
515  inline bool endsWith(XsString const& other, bool caseSensitive = false) const
516  {
517  return 0 != XsString_endsWith(this, &other, caseSensitive ? 1 : 0);
518  }
519 
525  inline bool startsWith(XsString const& other, bool caseSensitive = false) const
526  {
527  return 0 != XsString_startsWith(this, &other, caseSensitive ? 1 : 0);
528  }
529 
536  inline bool contains(XsString const& other, bool caseSensitive = false, XsSize* offset = 0) const
537  {
538  return 0 != XsString_contains(this, &other, caseSensitive ? 1 : 0, offset);
539  }
540 
541 #ifndef XSENS_NO_WCHAR
542 
547  inline wchar_t utf8At(XsSize index) const
548  {
549  return XsString_utf8At(this, index);
550  }
551 
553  inline XsString& push_back(wchar_t c)
554  {
555  XsString_push_backWChar(this, c);
556  return *this;
557  }
558 #endif
559 
561  inline void sort()
562  {
563  XsString_sort(this);
564  }
565 
569  inline void reverse()
570  {
571  XsString_reverse(this);
572  }
573 
578  inline ptrdiff_t findSubStr(XsString const& needle) const
579  {
580  return XsString_findSubStr(this, &needle);
581  }
582 
589  inline XsString mid(XsSize start, XsSize count) const
590  {
591  XsString rv;
592  XsString_mid(&rv, this, start, count);
593  return rv;
594  }
595 
600  inline void replaceAll(XsString const& src, XsString const& dst)
601  {
602  XsString_replaceAll(this, &src, &dst);
603  }
604 
609  inline XsString replacedAll(XsString const& src, XsString const& dst) const
610  {
611  XsString rv(*this);
612  XsString_replaceAll(&rv, &src, &dst);
613  return rv;
614  }
615 
618  inline void trim()
619  {
620  XsString rv;
621  XsString_trimmed(&rv, this);
622  swap(rv);
623  }
624 
627  inline XsString trimmed() const
628  {
629  XsString rv;
630  XsString_trimmed(&rv, this);
631  return rv;
632  }
633 
635  inline char last() const
636  {
637  if (size())
638  return at(size() - 1);
639  return 0;
640  }
641 
642 };
643 
644 #ifndef XSENS_NO_STL
645 namespace std
646 {
647 template<typename _CharT, typename _Traits>
648 basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& o, XsString const& xs)
649 {
650  return (o << xs.toStdString());
651 }
652 }
653 #endif
654 
655 #endif
656 #endif
XsArrayDescriptor
This object describes how to treat the data in an array.
Definition: xsarray.h:103
XsString
struct XsString XsString
Definition: xsstring.h:87
XsString_copyToWCharArray
XSTYPES_DLL_API XsSize XsString_copyToWCharArray(const XsString *thisPtr, wchar_t *dest, XsSize size)
This function copies the contents of the object to a unicode wchar_t array.
Definition: xsstring.c:215
XsString_append
XSTYPES_DLL_API void XsString_append(XsString *thisPtr, XsString const *other)
This function concatenates the other to this.
Definition: xsstring.c:257
s
XmlRpcServer s
XsString_contains
XSTYPES_DLL_API int XsString_contains(XsString const *thisPtr, XsString const *other, int caseSensitive, XsSize *offset)
Returns whether this string contains other.
Definition: xsstring.c:460
XsString_mid
XSTYPES_DLL_API void XsString_mid(XsString *thisPtr, XsString const *source, XsSize start, XsSize count)
Copy a substring of the source string.
Definition: xsstring.c:568
XsString_push_backWChar
XSTYPES_DLL_API void XsString_push_backWChar(XsString *thisPtr, wchar_t c)
Append unicode character c to the string.
Definition: xsstring.c:227
XsString_utf8At
XSTYPES_DLL_API wchar_t XsString_utf8At(const XsString *thisPtr, XsSize index)
The decoded UTF-8 character at index index in the UTF-8 encoded string.
Definition: xsstring.c:355
XsString_assignWCharArray
XSTYPES_DLL_API void XsString_assignWCharArray(XsString *thisPtr, const wchar_t *src)
This function determines the size of src and copies the contents to the object after converting it fr...
Definition: xsstring.c:181
XsString_replaceAll
XSTYPES_DLL_API void XsString_replaceAll(XsString *thisPtr, XsString const *src, XsString const *dst)
Replace all occurrences of src with dst, modifying thisPtr.
Definition: xsstring.c:586
XsString_assign
XSTYPES_DLL_API void XsString_assign(XsString *thisPtr, XsSize count, const char *src)
Reinitializes the XsArray with space for count items and copies them from src.
Definition: xsstring.c:142
XsString_destruct
XSTYPES_DLL_API void XsString_destruct(XsString *thisPtr)
Clears and frees memory allocated by the XsArray.
Definition: xsstring.c:134
operator==
bool operator==(const XsFilterProfile &lhs, const XsFilterProfile &rhs)
Returns true if lhs has the same type as rhs.
Definition: scenariomatchpred.h:81
XsString_endsWith
XSTYPES_DLL_API int XsString_endsWith(XsString const *thisPtr, XsString const *other, int caseSensitive)
Returns whether this string ends with other.
Definition: xsstring.c:398
XsString_findSubStr
XSTYPES_DLL_API ptrdiff_t XsString_findSubStr(XsString const *thisPtr, XsString const *needle)
Find the first occurrence of needle in the string.
Definition: xsstring.c:537
XsSize
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:74
XsString_trimmed
XSTYPES_DLL_API void XsString_trimmed(XsString *thisPtr, XsString const *source)
Fills thisPtr with a copy of source with all its leading and trailing whitespace removed.
Definition: xsstring.c:633
xsarray.h
XsArray::XsArray_insert
void XsArray_insert(void *thisPtr, XsSize index, XsSize count, void const *src)
Insert count items from src at index in the array.
Definition: xsarray.c:372
XsString_empty
XSTYPES_DLL_API int XsString_empty(XsString const *thisPtr)
Returns true when the supplied string is empty.
Definition: xsstring.c:493
XsArray::XsArray_reserve
void XsArray_reserve(void *thisPtr, XsSize count)
Reserves space for count items.
Definition: xsarray.c:256
xstypesconfig.h
XsString_push_back
XSTYPES_DLL_API void XsString_push_back(XsString *thisPtr, char c)
Append character c to the string.
Definition: xsstring.c:292
append
ROSCPP_DECL std::string append(const std::string &left, const std::string &right)
XsString_assignCharArray
XSTYPES_DLL_API void XsString_assignCharArray(XsString *thisPtr, const char *src)
This function determines the size of src and copies the contents to the object.
Definition: xsstring.c:172
XsString_erase
XSTYPES_DLL_API void XsString_erase(XsString *thisPtr, XsSize index, XsSize count)
Removes a count items from the list starting at index.
Definition: xsstring.c:276
g_xsStringDescriptor
const XsArrayDescriptor XSTYPES_DLL_API g_xsStringDescriptor
Descriptor for XsInt64Array.
Definition: xsstring.c:111
std
XsString_startsWith
XSTYPES_DLL_API int XsString_startsWith(XsString const *thisPtr, XsString const *other, int caseSensitive)
Returns whether this string starts with other.
Definition: xsstring.c:430
XSDF_None
@ XSDF_None
No flag set.
Definition: xstypedefs.h:109
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:65
XsString_construct
XSTYPES_DLL_API void XsString_construct(XsString *thisPtr)
Initializes the XsString object as an empty string.
Definition: xsstring.c:126
XsString_utf8Len
XSTYPES_DLL_API XsSize XsString_utf8Len(XsString const *thisPtr)
Returns the number of characters in a UTF-8 encoded string.
Definition: xsstring.c:325
XsString_reverse
XSTYPES_DLL_API void XsString_reverse(XsString *thisPtr)
Reverses the contents of the string.
Definition: xsstring.c:515
operator<<
std::ostream & operator<<(std::ostream &os, JlHexLogger< char > const &hex)
Definition: journaller.cpp:388
XsDataFlags
XsDataFlags
These flags define the behaviour of data contained by Xsens data structures.
Definition: xstypedefs.h:107
XSARRAY_STRUCT
XSARRAY_STRUCT(XsString, char)
XSENS_MSC_WARNING_SUPPRESS
#define XSENS_MSC_WARNING_SUPPRESS(...)
Definition: xstypesconfig.h:89
XsString_sort
XSTYPES_DLL_API void XsString_sort(XsString *thisPtr)
Sorts the string.
Definition: xsstring.c:505
XsString
A 0-terminated managed string of characters.
XsString_resize
XSTYPES_DLL_API void XsString_resize(XsString *thisPtr, XsSize count)
This function resizes the contained string to the desired size, while retaining its contents.
Definition: xsstring.c:243


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:20