Main MRPT website > C++ reference for MRPT 1.5.7
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-2017, 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 #else
38 } // extern "C"
39 #endif
40 
41 #ifdef __cplusplus
42 struct XsIntArray : public XsArrayImpl<int, g_xsIntArrayDescriptor, XsIntArray> {
43  //! \brief Constructs an XsIntArray
44  inline explicit XsIntArray(XsSize sz = 0, int const* src = 0)
45  : ArrayImpl(sz, src)
46  {
47  }
48 
49  //! \brief Constructs an XsIntArray as a copy of \a other
50  inline XsIntArray(XsIntArray const& other)
51  : ArrayImpl(other)
52  {
53  }
54 
55  //! \brief Constructs an XsIntArray that references the data supplied in \a ref
56  inline explicit XsIntArray(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 iterators \a beginIt and \a endIt
63  template <typename Iterator>
64  inline XsIntArray(Iterator beginIt, Iterator endIt)
65  : ArrayImpl(beginIt, endIt)
66  {
67  }
68 #endif
69 };
70 #endif
71 
72 
73 #endif // file guard
XsArrayDescriptor const XSTYPES_DLL_API g_xsIntArrayDescriptor
GLuint GLuint GLsizei count
Definition: glext.h:3512
This object describes how to treat the data in an array.
Definition: xsarray.h:51
GLenum GLint ref
Definition: glext.h:3888
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:17
GLuint src
Definition: glext.h:6303
No flag set.
Definition: xstypedefs.h:38
struct XsIntArray XsIntArray
Definition: xsintarray.h:34
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
XsDataFlags
These flags define the behaviour of data contained by Xsens data structures.
Definition: xstypedefs.h:37



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019