PIP 5.9.0
Platform-Independent Primitives
Loading...
Searching...
No Matches
picontainers.h File Reference

Base macros for generic containers. More...

#include "picout.h"
#include "piintrospection_containers.h"
#include <stdlib.h>
#include <algorithm>
#include <functional>
#include <initializer_list>
#include <new>
#include <string.h>
#include <type_traits>

Macros

#define piForTimes(c)
 Macro for short replacement of standart "for".
#define piForeach(i, c)
 Macro for iterate any container.
#define piForeachC(i, c)
 Macro for iterate any container.
#define piForeachR(i, c)
 Macro for iterate any container.
#define piForeachRC(i, c)
 Macro for iterate any container.

Enumerations

enum  ReshapeOrder { ReshapeByRow , ReshapeByColumn }
 Reshape order enum for reshape() function. More...

Detailed Description

Base macros for generic containers.

Authors

Ivan Pelipenko peri4.nosp@m.ko@y.nosp@m.andex.nosp@m..ru; Andrey Bychkov work..nosp@m.a.b@.nosp@m.yande.nosp@m.x.ru;

Macro Definition Documentation

◆ piForTimes

#define piForTimes ( c)
Value:
for (int _i##c = 0; _i##c < c; ++_i##c)

Macro for short replacement of standart "for".

Parameters
cIteration times in loop

◆ piForeach

#define piForeach ( i,
c )
Value:
for (i: c)

Macro for iterate any container.

Deprecated
Deprecated, using only for backward compatibility. Use C++ Range-based for loop.

Get read/write access to each element of container. Iterating in forward direction. Example of using:

vec << 1 << 2 << 3;
piForeach(int & i, vec) piCout << i;
// 1
// 2
// 3
piForeach(int & i, vec) i++;
piForeach(int & i, vec) piCout << i;
// 2
// 3
// 4
Sequence linear container - dynamic size array of any type.
Definition pivector.h:118
#define piForeach(i, c)
Macro for iterate any container.
Definition picontainers.h:160
#define piCout
Macro used for conditional (piDebug) output to PICout(StdOut).
Definition picout.h:36
See also
piForeachC, piForeachR, piForeachRC

◆ piForeachC

#define piForeachC ( i,
c )
Value:
for (const i: c)

Macro for iterate any container.

Deprecated
Deprecated, using only for backward compatibility. Use C++ Range-based for loop.

Get read only access to each element of container. Iterating in forward direction.

See also
piForeach, piForeachR, piForeachRC

◆ piForeachR

#define piForeachR ( i,
c )
Value:
for (i: PIReverseWrap(c))

Macro for iterate any container.

Deprecated
Deprecated, using only for backward compatibility. Use C++ Range-based for loop.

Get read/write access to each element of container. Iterating in backward direction.

See also
piForeach, piForeachC, piForeachRC

◆ piForeachRC

#define piForeachRC ( i,
c )
Value:
for (const i: PIReverseWrap(c))

Macro for iterate any container.

Deprecated
Deprecated, using only for backward compatibility. Use C++ Range-based for loop.

Get read only access to each element of container. Iterating in backward direction. Also has alias piForeachCR

See also
piForeach, piForeachC, piForeachR

Enumeration Type Documentation

◆ ReshapeOrder

Reshape order enum for reshape() function.

See also
PIVector::reshape(), PIDeque::reshape()
Enumerator
ReshapeByRow 

Traversing elements by line, just as they stay in memory

ReshapeByColumn 

Traversing elements by column