RTI Connext DDS Micro  Version 2.4.11
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
reda_sequence_decl.h
1 /*
2  * FILE: reda_sequence_decl.h - Typed Sequence API
3  *
4  * Copyright 2008-2016 Real-Time Innovations, Inc.
5  *
6  * No duplications, whole or partial, manual or electronic, may be made
7  * without express written permission. Any such copies, or
8  * revisions thereof, must display this notice unaltered.
9  * This code contains trade secrets of Real-Time Innovations, Inc.
10  *
11  * Modification History
12  * --------------------
13  * 10feb2016,tk MICRO-1530 Unified REDA_StringSeq, CDR_StringSeq, and DDS_StringSeq
14  * 19may2015,as MICRO-1193 Refactoring of Sequence API levels
15  * 18feb2015,tk Factored out sequence declarations from reda_sequence.h
16  */
17 /*ci
18  * \file
19  *
20  * \brief The REDA Sequence API provides a strongly typed vector API.
21  *
22  * \defgroup REDASequenceClass REDA Sequence
23  * \ingroup REDAModule
24  *
25  * \details
26  *
27  * The REDA sequence API provides a strongly typed API to manage variable
28  * size vectors/arrays of the same type. The typing is achieved by encapsulating
29  * generic function in a typed wrapper using macro's. The documentation
30  * is for the generic functions.
31  */
32 /*ci
33  * \addtogroup REDASequenceClass
34  * @{
35  */
36 #ifndef reda_dll_h
37 #include "reda/reda_dll.h"
38 #endif
39 #ifndef osapi_types_h
40 #include "osapi/osapi_types.h"
41 #endif
42 #include "reda/reda_sequence.h"
43 
44 #ifdef REDADllExport
45 #undef REDADllExport
46 #endif
47 
48 #if defined(RTI_WIN32) || defined(RTI_WINCE30)
49 #define REDADllExport __declspec( dllexport )
50 #else
51 #define REDADllExport
52 #endif
53 
54 #define concatenate(A, B) A ## B
55 
56 #ifndef T
57 #define T RTI_INT32
58 #endif
59 
60 #ifdef REDA_SEQUENCE_USER_API
61 #ifndef REDA_SEQUENCE_API
62 #define REDA_SEQUENCE_API REDA_SEQUENCE_API_USER_DEFAULT
63 #else
64 #if REDA_SEQUENCE_API < REDA_SEQUENCE_API_BASIC
65 #error "REDA_SEQUENCE_USER_API defined along with API level < REDA_SEQUENCE_API_BASIC"
66 #endif
67 #endif
68 #endif /* REDA_SEQUENCE_USER_API */
69 
70 #ifndef REDA_SEQUENCE_API
71 #define REDA_SEQUENCE_API REDA_SEQUENCE_API_DEFAULT
72 #endif /* REDA_SEQUENCE_API */
73 
74 #if REDA_SEQUENCE_API < REDA_SEQUENCE_API_UNTYPED
75 #error "REDA_SEQUENCE_API_UNTYPED <= REDA_SEQUENCE_API <= REDA_SEQUENCE_API_FULL"
76 #endif
77 
78 /* This corresponds to the BASIC API, the lowest level */
79 #if REDA_SEQUENCE_API > REDA_SEQUENCE_API_UNTYPED
80 #ifndef TSeq_initialize
81 #define TSeq_initialize
82 #endif
83 #ifndef TSeq_get_maximum
84 #define TSeq_get_maximum
85 #endif
86 #ifndef TSeq_set_maximum
87 #define TSeq_set_maximum
88 #endif
89 #ifndef TSeq_get_length
90 #define TSeq_get_length
91 #endif
92 #ifndef TSeq_set_length
93 #define TSeq_set_length
94 #endif
95 #ifndef TSeq_get_reference
96 #define TSeq_get_reference
97 #endif
98 #ifndef RTI_CERT
99 #ifndef TSeq_finalize
100 #define TSeq_finalize
101 #endif
102 #endif /* RTI_CERT */
103 #ifdef REDA_SEQUENCE_USER_API
104 #ifndef TSeq_copy
105 #define TSeq_copy
106 #endif
107 #endif /* REDA_SEQUENCE_USER_API */
108 #endif /* REDA_SEQUENCE_API > REDA_SEQUENCE_API_UNTYPED */
109 
110 /* The FULL API adds the following methods */
111 #if REDA_SEQUENCE_API > REDA_SEQUENCE_API_BASIC
112 #ifndef TSeq_copy
113 #define TSeq_copy
114 #endif
115 #ifndef TSeq_is_equal
116 #define TSeq_is_equal
117 #endif
118 #ifndef TSeq_loan_contiguous
119 #define TSeq_loan_contiguous
120 #endif
121 #ifndef TSeq_loan_discontiguous
122 #define TSeq_loan_discontiguous
123 #endif
124 #ifndef TSeq_has_ownership
125 #define TSeq_has_ownership
126 #endif
127 #ifndef TSeq_has_discontiguous_buffer
128 #define TSeq_has_discontiguous_buffer
129 #endif
130 #ifndef TSeq_get_contiguous_buffer
131 #define TSeq_get_contiguous_buffer
132 #endif
133 #ifndef TSeq_get_discontiguous_buffer
134 #define TSeq_get_discontiguous_buffer
135 #endif
136 #ifndef TSeq_set_contiguous_buffer
137 #define TSeq_set_contiguous_buffer
138 #endif
139 #ifndef TSeq_unloan
140 #define TSeq_unloan
141 #endif
142 #ifndef TSeq_set_token
143 #define TSeq_set_token
144 #endif
145 #ifndef TSeq_get_token
146 #define TSeq_get_token
147 #endif
148 #ifndef TSeq_ensure_length
149 #define TSeq_ensure_length
150 #endif
151 #ifndef TSeq_from_array
152 #define TSeq_from_array
153 #endif
154 #ifndef TSeq_to_array
155 #define TSeq_to_array
156 #endif
157 #endif /* REDA_SEQUENCE_API > REDA_SEQUENCE_API_BASIC */
158 
159 #if REDA_SEQUENCE_API > REDA_SEQUENCE_API_FULL
160 #error "REDA_SEQUENCE_API_UNTYPED <= REDA_SEQUENCE_API <= REDA_SEQUENCE_API_FULL"
161 #endif /* REDA_SEQUENCE_API > REDA_SEQUENCE_API_FULL */
162 
163 /*ci
164  * \addtogroup REDASequenceClass
165  * @{
166  */
167 #ifndef REDA_SEQUENCE_EXCLUDE_STRUCT
168 
169 struct REDADllExport TSeq
170 {
171  T* _contiguous_buffer;
172  RTI_INT32 _maximum;
173  RTI_INT32 _length;
174  RTI_INT32 _element_size;
175  void *_token1;
176  void *_token2;
177  RTI_UINT8 _flags;
178 #ifdef RTI_CPP
179 public:
180 #ifdef TSeq_get_maximum
181  RTI_INT32 maximum() const;
182 #endif
183 #ifdef TSeq_set_maximum
184 #ifndef TSeq_isCDRStringType
185  bool maximum(RTI_INT32 new_max);
186 #else
187 #ifdef TSeq_isCDRStringType_no_max
188  bool maximum(RTI_INT32 new_max,RTI_UINT32 max_str_len);
189 #else
190  bool maximum(RTI_INT32 new_max,RTI_UINT32 max_str_len);
191  bool maximum(RTI_INT32 new_max);
192 #endif
193 #endif
194 #endif
195 #ifdef TSeq_get_length
196  RTI_INT32 length() const;
197 #endif
198 #ifdef TSeq_set_length
199  bool length(RTI_INT32 new_length);
200 #endif
201 #ifdef TSeq_get_reference
202  T* get_reference(RTI_INT32 i);
203 #endif
204 
205 #ifdef TSeq_copy
206 #ifndef TSeq_isCDRStringType
207  bool copy(const TSeq& src_seq);
208 #else
209  bool copy(const TSeq& src_seq,RTI_UINT32 max_str_len);
210  bool copy(const TSeq& src_seq);
211 #endif
212 #endif
213 
214 #ifdef TSeq_is_equal
215  bool is_equal(const TSeq& other) const;
216 #endif
217 #ifdef TSeq_loan_contiguous
218  bool loan_contiguous(void* buffer, RTI_INT32 new_length, RTI_INT32 new_max);
219 #endif
220 #ifdef TSeq_loan_discontiguous
221  bool loan_discontiguous(void* buffer, RTI_INT32 new_length, RTI_INT32 new_max);
222 #endif
223 #ifdef TSeq_unloan
224  bool unloan();
225 #endif
226 #ifdef TSeq_has_ownership
227  bool has_ownership();
228 #endif
229 #ifdef TSeq_get_contiguous_buffer
230  T* get_contiguous_buffer() const;
231 #endif
232 #ifdef TSeq_set_contiguous_buffer
233  bool set_contiguous_buffer(T* buffer);
234 #endif
235 #ifdef TSeq_has_discontiguous_buffer
236  bool has_discontiguous_buffer();
237 #endif
238 #ifdef TSeq_set_token
239  void set_token(void *token1,void *token2);
240 #endif
241 #ifdef TSeq_get_token
242  void get_token(void **token1,void **token2);
243 #endif
244 #ifdef TSeq_ensure_length
245 #ifndef TSeq_isCDRStringType
246  bool ensure_length(RTI_INT32 length, RTI_INT32 max);
247 #else
248 #ifdef TSeq_isCDRStringType_no_max
249  bool ensure_length(RTI_INT32 length, RTI_INT32 max,RTI_UINT32 max_str_len);
250 #else
251  bool ensure_length(RTI_INT32 length, RTI_INT32 max,RTI_UINT32 max_str_len);
252  bool ensure_length(RTI_INT32 length, RTI_INT32 max);
253 #endif
254 #endif
255 #endif
256 
257 #ifdef TSeq_from_array
258 #ifndef TSeq_isCDRStringType
259  bool from_array(const T elv[], RTI_INT32 length);
260 #else
261 #ifdef TSeq_isCDRStringType_no_max
262  bool from_array(const T elv[], RTI_INT32 length,RTI_UINT32 max_str_len);
263 #else
264  bool from_array(const T elv[], RTI_INT32 length,RTI_UINT32 max_str_len);
265  bool from_array(const T elv[], RTI_INT32 length);
266 #endif
267 #endif
268 #endif
269 
270 #ifdef TSeq_to_array
271 #ifndef TSeq_isCDRStringType
272  bool to_array(T elv[], RTI_INT32 length);
273 #else
274 #ifdef TSeq_isCDRStringType_no_max
275  bool to_array(T elv[], RTI_INT32 length,RTI_UINT32 max_str_len);
276 #else
277  bool to_array(T elv[], RTI_INT32 length,RTI_UINT32 max_str_len);
278  bool to_array(T elv[], RTI_INT32 length);
279 #endif
280 #endif
281 #endif
282  TSeq();
283  ~TSeq();
284 
285 #ifdef RTI_CERT
286 private:
287 #else
288 public:
289 #endif /* RTI_CERT */
290  TSeq(const TSeq& seq);
291 #ifdef TSeq_copy
292  TSeq& operator=(const TSeq& src_seq);
293 #endif
294 #ifdef TSeq_get_reference
295  T& operator[] (RTI_INT32 index);
296  const T& operator[] (RTI_INT32 index) const;
297 #endif
298 #ifdef TSeq_is_equal
299  bool operator==(const TSeq& other) const;
300  bool operator!=(const TSeq& other) const;
301 #endif
302 
303 #endif /* RTI_CPP */
304 };
305 
306 /* REDA_DEFINE_SEQUENCE_OVERLOADED_METHODS(TSeq,T) */
307 
308 #if REDA_SEQUENCE_API > REDA_SEQUENCE_API_FULL
309 #error "REDA_SEQUENCE_API_UNTYPED <= REDA_SEQUENCE_API <= REDA_SEQUENCE_API_FULL"
310 #endif
311 #endif /* REDA_SEQUENCE_EXCLUDE_STRUCT */
312 
313 #ifndef REDA_SEQUENCE_EXCLUDE_C_METHODS
314 
315 #if defined(__cplusplus) && !defined(REDA_SEQUENCE_USER_CPP)
316 extern "C"
317 {
318 #endif
319 
320 #ifdef TSeq_initialize
321 #undef TSeq_initialize
322 #define _initialize(TSeq) concatenate(TSeq, _initialize)
323 #define TSeq_initialize _initialize(TSeq)
324 /*ci
325  * \brief Initialize a sequence of type T
326  *
327  * \details
328  *
329  * Initializes a sequence structure TSeq based on the element size of
330  * sequence type T. The initialization may call a type specific T_initialize
331  * for each element type T if it is defined.
332  *
333  * \return RTI_TRUE on success, RTI_FALSE on failure
334  *
335  * \param[in] self Sequence structure to initialize
336  *
337  * \sa TSeq_finalize
338  */
339 REDADllExport RTI_BOOL
340 TSeq_initialize(struct TSeq* self);
341 #undef _initialize
342 #undef TSeq_initialize
343 #endif
344 
345 #ifdef TSeq_finalize
346 #undef TSeq_finalize
347 #define _finalize(TSeq) concatenate(TSeq, _finalize)
348 #define TSeq_finalize _finalize(TSeq)
349 /*ci
350  * \brief Finalize a sequence of type T
351  *
352  * \details
353  *
354  * Finalizes a sequence TSeq based and releases all memory allocated to it.
355  * Each sequence element may be finalized individually if T_finalize is defined
356  * for the sequence type.
357  *
358  * \return RTI_TRUE on success, RTI_FALSE on failure
359  *
360  * \param[in] self Sequence structure to finalize
361  *
362  * \sa TSeq_finalize
363  */
364 REDADllExport RTI_BOOL
365 TSeq_finalize(struct TSeq *self);
366 #undef _finalize
367 #undef TSeq_finalize
368 #endif
369 
370 #ifdef TSeq_get_maximum
371 #undef TSeq_get_maximum
372 #define _get_maximum(TSeq) concatenate(TSeq, _get_maximum)
373 #define TSeq_get_maximum _get_maximum(TSeq)
374 REDADllExport RTI_INT32
375 TSeq_get_maximum(const struct TSeq *self);
376 #undef _get_maximum
377 #undef TSeq_get_maximum
378 #endif
379 
380 #ifdef TSeq_set_maximum
381 #undef TSeq_set_maximum
382 #define _set_maximum(TSeq) concatenate(TSeq, _set_maximum)
383 #define TSeq_set_maximum _set_maximum(TSeq)
384 #ifndef TSeq_isCDRStringType
385 REDADllExport RTI_BOOL
386 TSeq_set_maximum(struct TSeq *self, RTI_INT32 new_max);
387 #else
388 #ifdef TSeq_isCDRStringType_no_max
389 REDADllExport RTI_BOOL
390 TSeq_set_maximum(struct TSeq *self, RTI_INT32 new_max, RTI_UINT32 max_str_len);
391 #else
392 #undef TSeq_set_maximum_w_max
393 #define _set_maximum_w_max(TSeq) concatenate(TSeq,_set_maximum_w_max)
394 #define TSeq_set_maximum_w_max _set_maximum_w_max(TSeq)
395 REDADllExport RTI_BOOL
396 TSeq_set_maximum_w_max(struct TSeq *self, RTI_INT32 new_max, RTI_UINT32 max_str_len);
397 
398 REDADllExport RTI_BOOL
399 TSeq_set_maximum(struct TSeq *self, RTI_INT32 new_max);
400 #endif
401 #endif
402 #undef _set_maximum
403 #undef TSeq_set_maximum
404 #undef _set_maximum_w_max
405 #undef TSeq_set_maximum_w_max
406 #endif
407 
408 #ifdef TSeq_get_length
409 #undef TSeq_get_length
410 #define _get_length(TSeq) concatenate(TSeq, _get_length)
411 #define TSeq_get_length _get_length(TSeq)
412 REDADllExport RTI_INT32
413 TSeq_get_length(const struct TSeq *self);
414 #undef _get_length
415 #undef TSeq_get_length
416 #endif
417 
418 #ifdef TSeq_set_length
419 #undef TSeq_set_length
420 #define _set_length(TSeq) concatenate(TSeq, _set_length)
421 #define TSeq_set_length _set_length(TSeq)
422 REDADllExport RTI_BOOL
423 TSeq_set_length(struct TSeq *self, RTI_INT32 new_length);
424 #undef _set_length
425 #undef TSeq_set_length
426 #endif
427 
428 #ifdef TSeq_get_reference
429 #undef TSeq_get_reference
430 #define _get_reference(TSeq) concatenate(TSeq, _get_reference)
431 #define TSeq_get_reference _get_reference(TSeq)
432 REDADllExport T*
433 TSeq_get_reference(const struct TSeq *self, RTI_INT32 i);
434 #undef _get_reference
435 #undef TSeq_get_reference
436 #endif
437 
438 #ifdef TSeq_copy
439 #undef TSeq_copy
440 #define _copy(TSeq) concatenate(TSeq, _copy)
441 #define TSeq_copy _copy(TSeq)
442 #ifndef TSeq_isCDRStringType
443 REDADllExport struct TSeq*
444 TSeq_copy(struct TSeq *self, const struct TSeq *src);
445 #else
446 #ifdef TSeq_isCDRStringType_no_max
447 REDADllExport struct TSeq*
448 TSeq_copy(struct TSeq *self, const struct TSeq *src, RTI_UINT32 max_str_len);
449 #else
450 #undef TSeq_copy_w_max
451 #define _copy_w_max(TSeq) concatenate(TSeq, _copy_w_max)
452 #define TSeq_copy_w_max _copy_w_max(TSeq)
453 REDADllExport struct TSeq*
454 TSeq_copy_w_max(struct TSeq *self, const struct TSeq *src, RTI_UINT32 max_str_len);
455 
456 REDADllExport struct TSeq*
457 TSeq_copy(struct TSeq *self, const struct TSeq *src);
458 #endif
459 #endif
460 #undef _copy
461 #undef TSeq_copy
462 #undef _copy_w_max
463 #undef TSeq_copy_w_max
464 #endif
465 
466 #ifdef TSeq_is_equal
467 #undef TSeq_is_equal
468 #define _is_equal(TSeq) concatenate(TSeq, _is_equal)
469 #define TSeq_is_equal _is_equal(TSeq)
470 REDADllExport RTI_BOOL
471 TSeq_is_equal(const struct TSeq *left, const struct TSeq *right);
472 #undef _is_equal
473 #undef TSeq_is_equal
474 #endif
475 
476 #ifdef TSeq_loan_contiguous
477 #undef TSeq_loan_contiguous
478 #define _loan_contiguous(TSeq) concatenate(TSeq, _loan_contiguous)
479 #define TSeq_loan_contiguous _loan_contiguous(TSeq)
480 REDADllExport RTI_BOOL
481 TSeq_loan_contiguous(struct TSeq *self, void *buffer,
482  RTI_INT32 new_length, RTI_INT32 new_max);
483 #undef _loan_contiguous
484 #undef TSeq_loan_contiguous
485 #endif
486 
487 #ifdef TSeq_loan_discontiguous
488 #undef TSeq_loan_discontiguous
489 #define _loan_discontiguous(TSeq) concatenate(TSeq, _loan_discontiguous)
490 #define TSeq_loan_discontiguous _loan_discontiguous(TSeq)
491 REDADllExport RTI_BOOL
492 TSeq_loan_discontiguous(struct TSeq *self, void *buffer,
493  RTI_INT32 new_length, RTI_INT32 new_max);
494 #undef _loan_discontiguous
495 #undef TSeq_loan_discontiguous
496 #endif /* TSeq_loan_discontiguous */
497 
498 #ifdef TSeq_unloan
499 #undef TSeq_unloan
500 #define _unloan(TSeq) concatenate(TSeq, _unloan)
501 #define TSeq_unloan _unloan(TSeq)
502 REDADllExport RTI_BOOL
503 TSeq_unloan(struct TSeq *self);
504 #undef _unloan
505 #undef TSeq_unloan
506 #endif /* TSeq_unloan */
507 
508 #ifdef TSeq_has_ownership
509 #undef TSeq_has_ownership
510 #define _has_ownership(TSeq) concatenate(TSeq, _has_ownership)
511 #define TSeq_has_ownership _has_ownership(TSeq)
512 REDADllExport RTI_BOOL
513 TSeq_has_ownership(const struct TSeq *self);
514 #undef _has_ownership
515 #undef TSeq_has_ownership
516 #endif /* TSeq_has_ownership */
517 
518 #ifdef TSeq_get_contiguous_buffer
519 #undef TSeq_get_contiguous_buffer
520 #define _get_contiguous_buffer(TSeq) concatenate(TSeq, _get_contiguous_buffer)
521 #define TSeq_get_contiguous_buffer _get_contiguous_buffer(TSeq)
522 REDADllExport T*
523 TSeq_get_contiguous_buffer(const struct TSeq *self);
524 #undef _get_contiguous_buffer
525 #undef TSeq_get_contiguous_buffer
526 #endif /* TSeq_get_buffer */
527 
528 #ifdef TSeq_get_discontiguous_buffer
529 #undef TSeq_get_discontiguous_buffer
530 #define _get_discontiguous_buffer(TSeq) concatenate(TSeq, TSeq_get_discontiguous_buffer)
531 #define TSeq_get_discontiguous_buffer _get_discontiguous_buffer(TSeq)
532 REDADllExport T*
533 TSeq_get_discontiguous_buffer(const struct TSeq *self);
534 #undef _get_discontiguous_buffer
535 #undef TSeq_get_discontiguous_buffer
536 #endif /* TSeq_get_discontiguous_buffer */
537 
538 #ifdef TSeq_set_contiguous_buffer
539 #undef TSeq_set_contiguous_buffer
540 #define _set_contiguous_buffer(TSeq) concatenate(TSeq, _set_contiguous_buffer)
541 #define TSeq_set_contiguous_buffer _set_contiguous_buffer(TSeq)
542 REDADllExport RTI_BOOL
543 TSeq_set_contiguous_buffer(struct TSeq *self, T *buffer);
544 #undef _set_contiguous_buffer
545 #undef TSeq_set_contiguous_buffer
546 #endif /* TSeq_set_buffer */
547 
548 #ifdef TSeq_has_discontiguous_buffer
549 #undef TSeq_has_discontiguous_buffer
550 #define _has_discontiguous_buffer(TSeq) concatenate(TSeq, _has_discontiguous_buffer)
551 #define TSeq_has_discontiguous_buffer _has_discontiguous_buffer(TSeq)
552 REDADllExport RTI_BOOL
553 TSeq_has_discontiguous_buffer(const struct TSeq *self);
554 #undef _has_discontiguous_buffer
555 #undef TSeq_has_discontiguous_buffer
556 #endif /* TSeq_has_discontiguous_buffer */
557 
558 #ifdef TSeq_set_token
559 #undef TSeq_set_token
560 #define _set_token(TSeq) concatenate(TSeq, _set_token)
561 #define TSeq_set_token _set_token(TSeq)
562 REDADllExport void
563 TSeq_set_token(struct TSeq *self,void *token1,void *token2);
564 #undef _set_token
565 #undef TSeq_set_token
566 #endif /* TSeq_set_token */
567 
568 #ifdef TSeq_get_token
569 #undef TSeq_get_token
570 #define _get_token(TSeq) concatenate(TSeq, _get_token)
571 #define TSeq_get_token _get_token(TSeq)
572 REDADllExport void
573 TSeq_get_token(struct TSeq *self,void **token1,void **token2);
574 #undef _get_token
575 #undef TSeq_get_token
576 #endif /* TSeq_get_token */
577 
578 #ifdef TSeq_ensure_length
579 #undef TSeq_ensure_length
580 #define _ensure_length(TSeq) concatenate(TSeq, _ensure_length)
581 #define TSeq_ensure_length _ensure_length(TSeq)
582 #ifndef TSeq_isCDRStringType
583 REDADllExport RTI_BOOL
584 TSeq_ensure_length(struct TSeq *self,RTI_INT32 length, RTI_INT32 max);
585 #else
586 #ifdef TSeq_isCDRStringType_no_max
587 REDADllExport RTI_BOOL
588 TSeq_ensure_length(struct TSeq *self,RTI_INT32 length, RTI_INT32 max,
589  RTI_INT32 max_str_len);
590 #else
591 #undef TSeq_ensure_length_w_max
592 #define _ensure_length_w_max(TSeq) concatenate(TSeq, _ensure_length_w_max)
593 #define TSeq_ensure_length_w_max _ensure_length_w_max(TSeq)
594 REDADllExport RTI_BOOL
595 TSeq_ensure_length_w_max(struct TSeq *self,RTI_INT32 length, RTI_INT32 max,
596  RTI_INT32 max_str_len);
597 REDADllExport RTI_BOOL
598 TSeq_ensure_length(struct TSeq *self,RTI_INT32 length, RTI_INT32 max);
599 #endif
600 #endif
601 #undef _ensure_length
602 #undef TSeq_ensure_length
603 #undef _ensure_length_w_max
604 #undef TSeq_ensure_length_max
605 #endif /* TSeq_ensure_length */
606 
607 #ifdef TSeq_from_array
608 #undef TSeq_from_array
609 #define _from_array(TSeq) concatenate(TSeq, _from_array)
610 #define TSeq_from_array _from_array(TSeq)
611 #ifndef TSeq_isCDRStringType
612 REDADllExport RTI_BOOL
613 TSeq_from_array(struct TSeq *self, const T elms_seq[], RTI_INT32 length);
614 #else
615 #ifdef TSeq_isCDRStringType_no_max
616 REDADllExport RTI_BOOL
617 TSeq_from_array(struct TSeq *self, const T elms_seq[], RTI_INT32 length,RTI_INT32 max_str_len);
618 #else
619 #undef TSeq_from_array_w_max
620 #define _from_array_w_max(TSeq) concatenate(TSeq, _from_array_w_max)
621 #define TSeq_from_array_w_max _from_array_w_max(TSeq)
622 REDADllExport RTI_BOOL
623 TSeq_from_array_w_max(struct TSeq *self, const T elms_seq[], RTI_INT32 length,RTI_INT32 max_str_len);
624 
625 REDADllExport RTI_BOOL
626 TSeq_from_array(struct TSeq *self, const T elms_seq[], RTI_INT32 length);
627 #endif
628 #endif
629 #undef _from_array
630 #undef TSeq_from_array
631 #undef _from_array_w_max
632 #undef TSeq_from_array_w_max
633 #endif /* TSeq_from_array */
634 
635 #ifdef TSeq_to_array
636 #undef TSeq_to_array
637 #define _to_array(TSeq) concatenate(TSeq, _to_array)
638 #define TSeq_to_array _to_array(TSeq)
639 #ifndef TSeq_isCDRStringType
640 REDADllExport RTI_BOOL
641 TSeq_to_array(struct TSeq *self,T elms_seq[], RTI_INT32 length);
642 #else
643 #ifdef TSeq_isCDRStringType_no_max
644 REDADllExport RTI_BOOL
645 TSeq_to_array(struct TSeq *self,T elms_seq[], RTI_INT32 length,RTI_INT32 max_str_len);
646 #else
647 #undef TSeq_to_array_w_max
648 #define _to_array_w_max(TSeq) concatenate(TSeq, _to_array_w_max)
649 #define TSeq_to_array_w_max _to_array_w_max(TSeq)
650 REDADllExport RTI_BOOL
651 TSeq_to_array_w_max(struct TSeq *self,T elms_seq[], RTI_INT32 length,RTI_INT32 max_str_len);
652 
653 REDADllExport RTI_BOOL
654 TSeq_to_array(struct TSeq *self,T elms_seq[], RTI_INT32 length);
655 #endif
656 #endif
657 #undef _to_array
658 #undef TSeq_to_array
659 #undef _to_array_w_max
660 #undef TSeq_to_array_max
661 #endif /* TSeq_to_array */
662 
663 #if defined(__cplusplus) && !defined(REDA_SEQUENCE_USER_CPP)
664 } /* extern "C" */
665 #endif
666 
667 #endif /* REDA_SEQUENCE_EXCLUDE_C_METHODS */
668 
669 #undef TSeq
670 #undef T
671 #undef REDA_SEQUENCE_API
672 #undef concatenate
673 #undef TSeq_isCDRStringType
674 #undef TSeq_isCDRStringType_no_max
675 #undef TSeq_isCDRCharStringType
676 #undef REDA_SEQUENCE_EXCLUDE_STRUCT
677 #undef REDA_SEQUENCE_EXCLUDE_C_METHODS
678 #undef REDA_SEQUENCE_USER_API
679 #undef REDA_SEQUENCE_USER_CPP
680 
681 /*ci @} */

RTI Connext DDS Micro Version 2.4.11 Copyright © Mon Jul 23 2018 Real-Time Innovations, Inc