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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019