66 #include "xc_utils/src/nucleo/EntCmd.h" 68 #include <boost/python/list.hpp> 77 class ID:
public EntCmd,
public std::vector<int>
80 typedef std::vector<int> v_int;
82 static int ID_NOT_VALID_ENTRY;
86 explicit ID(
const int &);
87 explicit ID(
const v_int &);
88 ID(
const boost::python::list &);
89 explicit ID(
const std::set<int> &);
90 template <
class InputIterator>
91 inline ID(InputIterator first, InputIterator last)
92 : EntCmd(), std::vector<int>(first,last) {}
93 inline virtual ~
ID(){}
96 inline int Size(
void)
const 99 inline const int *getDataPtr(
void)
const 100 {
return &(*this)[0]; }
101 inline int *getDataPtr(
void)
102 {
return &(*this)[0]; }
103 inline bool Nulo(
void)
const 105 int resize(
const int &newSize);
106 const int &
max(
void)
const;
107 const int &
min(
void)
const;
110 int &operator()(
const int &);
111 const int &operator()(
const int &)
const;
112 inline int &operator[](
const int &i)
113 {
return this->at(i); }
114 inline const int &operator[](
const int &i)
const 115 {
return this->at(i); }
119 int getLocationOrdered(
const int &)
const;
120 int removeValue(
const int &);
122 friend std::ostream &operator<<(std::ostream &,
const ID &);
132 ID getIDFromIntPtr(
const int *,
const int &);
134 std::ostream &operator<<(std::ostream &,
const ID &);
139 const int sz= Size();
140 if((i < 0) || (i >= sz))
142 std::cerr <<
"ID::(loc) - loc " 143 << i <<
" outside range 0 - " << sz-1 << std::endl;
150 inline int &ID::operator()(
const int &i)
155 return ID_NOT_VALID_ENTRY;
160 inline const int &ID::operator()(
const int &i)
const 165 return ID_NOT_VALID_ENTRY;
bool checkRange(const int &) const
check if argument is inside range [0,sz-1]
Definition: ID.h:137
const int & min(void) const
Returns the minimum of vector components.
Definition: ID.cpp:174
int getLocation(const int &) const
Returns the position of 'value' in the vector.
Definition: ID.cpp:106
MPI_Channel is a sub-class of channel. It is implemented with Berkeley stream sockets using the TCP p...
Definition: MPI_Channel.h:69
const int & max(void) const
Returns the maximum of vector components.
Definition: ID.cpp:170
DP_Socket is a sub-class of channel. It is implemented with Berkeley datagram sockets using the UDP p...
Definition: UDP_Socket.h:76
TCP_Socket is a sub-class of channel. It is implemented with Berkeley stream sockets using the TCP pr...
Definition: TCP_Socket.h:71
ID(void)
Standard constructor, sets size = 0;.
Definition: ID.cpp:68
TCP_SocketNoDelay is a sub-class of channel. It is implemented with Berkeley stream sockets using the...
Definition: TCP_SocketNoDelay.h:72
================================================================================
Definition: ContinuaReprComponent.h:34