Main MRPT website > C++ reference for MRPT 1.9.9
xsintarray.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef XSINTARRAY_H
10 #define XSINTARRAY_H
11 
12 #include "xsarray.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
19 
20 #ifdef XSENS_NOITERATOR
21 //%rename(intArray) XsArrayImpl<int,g_xsIntArrayDescriptor>;
22 //
23 // struct XsArrayImpl<int,g_xsIntArrayDescriptor> {
24 // XsArrayImpl<int,g_xsIntArrayDescriptor>(XsSize sz = 0, int const* src = 0);
25 // ~XsArrayImpl<int,g_xsIntArrayDescriptor>();
26 //};
27 //
28 #endif
29 
30 #ifndef __cplusplus
31 #define XsIntArray_INITIALIZER XSARRAY_INITIALIZER(&g_xsIntArrayDescriptor)
32 
34 typedef struct XsIntArray XsIntArray;
35 
37  XsIntArray* thisPtr, XsSize count, int const* src);
38 #else
39 } // extern "C"
40 #endif
41 
42 #ifdef __cplusplus
43 struct XsIntArray : public XsArrayImpl<int, g_xsIntArrayDescriptor, XsIntArray>
44 {
45  //! \brief Constructs an XsIntArray
46  inline explicit XsIntArray(XsSize sz = 0, int const* src = 0)
47  : ArrayImpl(sz, src)
48  {
49  }
50 
51  //! \brief Constructs an XsIntArray as a copy of \a other
52  inline XsIntArray(XsIntArray const& other) : ArrayImpl(other) {}
53  //! \brief Constructs an XsIntArray that references the data supplied in \a
54  //! ref
55  inline explicit XsIntArray(
56  int* ref, XsSize sz, XsDataFlags flags = XSDF_None)
57  : ArrayImpl(ref, sz, flags)
58  {
59  }
60 
61 #ifndef XSENS_NOITERATOR
62  //! \brief Constructs an XsIntArray with the array bound by the supplied
63  //! iterators \a beginIt and \a endIt
64  template <typename Iterator>
65  inline XsIntArray(Iterator beginIt, Iterator endIt)
66  : ArrayImpl(beginIt, endIt)
67  {
68  }
69 #endif
70 };
71 #endif
72 
73 #endif // file guard
XsArrayDescriptor
This object describes how to treat the data in an array.
Definition: xsarray.h:63
XsIntArray_construct
XSTYPES_DLL_API void XsIntArray_construct(XsIntArray *thisPtr, XsSize count, int const *src)
src
GLuint src
Definition: glext.h:7278
XSARRAY_STRUCT
XSARRAY_STRUCT(XsIntArray, int)
count
GLuint GLuint GLsizei count
Definition: glext.h:3528
XsSize
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:19
xsarray.h
XsIntArray
struct XsIntArray XsIntArray
Definition: xsintarray.h:34
XSDF_None
@ XSDF_None
No flag set.
Definition: xstypedefs.h:44
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
XsDataFlags
XsDataFlags
These flags define the behaviour of data contained by Xsens data structures.
Definition: xstypedefs.h:41
ref
GLenum GLint ref
Definition: glext.h:4050
g_xsIntArrayDescriptor
const XsArrayDescriptor XSTYPES_DLL_API g_xsIntArrayDescriptor



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST