28 #ifndef IntPtrWrapper_h 29 #define IntPtrWrapper_h 31 #include "xc_utils/src/nucleo/EntCmd.h" 32 #include <boost/python/list.hpp> 40 static int ID_NOT_VALID_ENTRY;
45 void check_sizes(
void);
55 inline int Size(
void)
const 58 inline const int *getDataPtr(
void)
const 60 inline int *getDataPtr(
void)
62 bool Nulo(
void)
const;
63 const int &
max(
void)
const;
64 const int &
min(
void)
const;
68 const int &at(
const int &)
const;
69 int &operator()(
const int &);
70 const int &operator()(
const int &)
const;
71 int &operator[](
const int &i)
73 const int &operator[](
const int &i)
const 76 int setData(
int *newData,
int size,
bool cleanIt =
false);
77 int getLocation(
int value)
const;
78 int getLocationOrdered(
int value)
const;
79 int removeValue(
int value);
81 friend std::ostream &operator<<(std::ostream &,
const IntPtrWrapper &);
90 std::ostream &operator<<(std::ostream &,
const IntPtrWrapper &);
94 inline bool IntPtrWrapper::Nulo(
void)
const 95 {
return (data==
nullptr); }
100 if((i < 0) || (i >= sz))
102 std::cerr <<
"IntPtrWrapper::(loc) - loc " 103 << i <<
" outside range 0 - " << sz-1 << std::endl;
110 inline int &IntPtrWrapper::at(
const int &i)
115 return ID_NOT_VALID_ENTRY;
118 inline const int &IntPtrWrapper::at(
const int &i)
const 123 return ID_NOT_VALID_ENTRY;
127 inline int &IntPtrWrapper::operator()(
const int &i)
132 return ID_NOT_VALID_ENTRY;
137 inline const int &IntPtrWrapper::operator()(
const int &i)
const 142 return ID_NOT_VALID_ENTRY;
IntPtrWrapper(void)
Standard constructor, sets size = 0;.
Definition: IntPtrWrapper.cc:88
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 & min(void) const
Returns the minimum of vector components.
Definition: IntPtrWrapper.cc:264
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
const int & max(void) const
Returns the maximum of vector components.
Definition: IntPtrWrapper.cc:260
std::vector< int > id_to_std_vector(const IntPtrWrapper &)
Convierte el vector en un std::vector<double>.
Definition: IntPtrWrapper.cc:307
Definition: IntPtrWrapper.h:37
bool checkRange(const int &) const
check if argument is inside range [0,sz-1]
Definition: IntPtrWrapper.h:98
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