14 #ifndef XSENS_NO_WCHAR 16 #if !defined(XSENS_NO_STL) && defined(__cplusplus) && defined(WIN32) 19 #endif // XSENS_NO_WCHAR 33 #define XsString_INITIALIZER XSARRAY_INITIALIZER(&g_xsStringDescriptor) 37 #define XSSTRING_INITIALIZER XsString_INITIALIZER 48 #ifndef XSENS_NO_WCHAR 51 #endif // XSENS_NO_WCHAR 64 #define XsString_copy(thisPtr, copy) XsArray_copy(copy, thisPtr) 65 #define XsString_swap(a, b) XsArray_swap(a, b) 80 :
public XsArrayImpl<char, g_xsStringDescriptor, XsString>
82 inline XsStringType() : XsArrayImpl() {}
84 : XsArrayImpl(
ref, sz, flags)
98 return m_reserved ? m_reserved - 1 : 0;
104 return *ptrAt(m_data,
index);
168 inline void append(
const XsStringType& other)
174 struct XsString :
public XsStringType
184 inline XsString(
const XsStringType& other) : XsStringType(other) {}
189 : XsStringType(
ref, sz + 1, flags)
192 #ifndef XSENS_NOITERATOR 195 template <
typename Iterator>
196 inline XsString(Iterator
const& beginIt, Iterator
const& endIt)
197 : XsStringType(beginIt, endIt)
208 #ifndef XSENS_NO_WCHAR 210 inline XsString(
wchar_t const*
src) : XsStringType()
225 inline XsString(std::wstring
const&
src) : XsStringType()
229 #endif // XSENS_NO_STL 234 static const char nullChar = 0;
235 if (
empty())
return (
char*)&nullChar;
236 return begin().operator->();
240 inline char const* c_str()
const 242 static const char nullChar = 0;
243 if (
empty())
return &nullChar;
244 return begin().operator->();
254 #endif // XSENS_NO_STL 260 tmp.reserve(
size() + other.size());
268 std::wstring toStdWString()
const 270 if (
empty())
return std::wstring();
277 #endif // XSENS_NO_STL 280 using XsStringType::operator==;
281 using XsStringType::operator!=;
282 #ifndef XSENS_NOITERATOR 283 using XsStringType::operator<<;
291 if (!str)
return empty();
292 return !strcmp(c_str(), str);
298 return !(*
this == str);
306 const_cast<char*>(str), strlen(str),
XSDF_None);
331 template <
typename _CharT,
typename _Traits>
333 basic_ostream<_CharT, _Traits>& o,
XsString const& xs)
335 return (o << xs.toStdString());
std::ostream & operator<<(std::ostream &o, const TFTDIDevice &d)
Print out all the information of a FTDI device in textual form.
XSTYPES_DLL_API void XsArray_insert(void *thisPtr, XsSize index, XsSize count, void const *src)
GLuint GLuint GLsizei count
This object describes how to treat the data in an array.
XSARRAY_STRUCT(XsString, char)
XSTYPES_DLL_API void XsString_assignWCharArray(XsString *thisPtr, const wchar_t *src)
XSTYPES_DLL_API void XsString_resize(XsString *thisPtr, XsSize count)
XSTYPES_DLL_API void XsString_assign(XsString *thisPtr, XsSize count, const char *src)
size_t XsSize
XsSize must be unsigned number!
XSTYPES_DLL_API void XsString_append(XsString *thisPtr, XsString const *other)
TColor operator+(const TColor &first, const TColor &second)
Pairwise addition of their corresponding RGBA members.
VALUE & operator[](const KEY &key)
Write/read via [i] operator, that creates an element if it didn't exist already.
GLubyte GLubyte GLubyte GLubyte w
XSTYPES_DLL_API XsSize XsString_copyToWCharArray(const XsString *thisPtr, wchar_t *dest, XsSize size)
GLsizei const GLchar ** string
XSTYPES_DLL_API void XsString_erase(XsString *thisPtr, XsSize index, XsSize count)
XSTYPES_DLL_API void XsString_destruct(XsString *thisPtr)
bool operator==(const mrpt::img::TCamera &a, const mrpt::img::TCamera &b)
XSTYPES_DLL_API void XsString_construct(XsString *thisPtr)
const_iterator begin() const
XSTYPES_DLL_API void XsArray_reserve(void *thisPtr, XsSize count)
bool operator!=(const mrpt::img::TCamera &a, const mrpt::img::TCamera &b)
size_t m_size
Number of elements accessed with write access so far.
XSTYPES_DLL_API void XsString_assignCharArray(XsString *thisPtr, const char *src)
XsArrayDescriptor const XSTYPES_DLL_API g_xsStringDescriptor
int sprintf(char *buf, size_t bufSize, const char *format,...) noexcept MRPT_printf_format_check(3
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compiler...
XsDataFlags
These flags define the behaviour of data contained by Xsens data structures.