28 #ifndef IntPtrWrapper_h 29 #define IntPtrWrapper_h 31 #include "xc_utils/src/kernel/CommandEntity.h" 32 #include <boost/python/list.hpp> 41 static int ID_NOT_VALID_ENTRY;
46 void check_sizes(
void);
56 inline int Size(
void)
const 59 inline const int *getDataPtr(
void)
const 61 inline int *getDataPtr(
void)
63 bool isEmpty(
void)
const;
64 const int &
max(
void)
const;
65 const int &
min(
void)
const;
69 const int &at(
const int &)
const;
70 int &operator()(
const int &);
71 const int &operator()(
const int &)
const;
72 int &operator[](
const int &i)
74 const int &operator[](
const int &i)
const 77 int setData(
int *newData,
int size,
bool cleanIt =
false);
78 int getLocation(
int value)
const;
79 int getLocationOrdered(
int value)
const;
80 int removeValue(
int value);
82 friend std::ostream &operator<<(std::ostream &,
const IntPtrWrapper &);
91 std::ostream &operator<<(std::ostream &,
const IntPtrWrapper &);
95 inline bool IntPtrWrapper::isEmpty(
void)
const 96 {
return (data==
nullptr); }
101 if((i < 0) || (i >= sz))
103 std::cerr <<
"IntPtrWrapper::(loc) - loc " 104 << i <<
" outside range 0 - " << sz-1 << std::endl;
111 inline int &IntPtrWrapper::at(
const int &i)
116 return ID_NOT_VALID_ENTRY;
119 inline const int &IntPtrWrapper::at(
const int &i)
const 124 return ID_NOT_VALID_ENTRY;
128 inline int &IntPtrWrapper::operator()(
const int &i)
133 return ID_NOT_VALID_ENTRY;
138 inline const int &IntPtrWrapper::operator()(
const int &i)
const 143 return ID_NOT_VALID_ENTRY;
const int & min(void) const
Returns the minimum of vector components.
Definition: IntPtrWrapper.cc:264
IntPtrWrapper(void)
Standard constructor, sets size = 0;.
Definition: IntPtrWrapper.cc:88
TCP_Socket is a sub-class of channel.
Definition: TCP_Socket.h:71
TCP_SocketNoDelay is a sub-class of channel.
Definition: TCP_SocketNoDelay.h:72
const int & max(void) const
Returns the maximum of vector components.
Definition: IntPtrWrapper.cc:260
bool checkRange(const int &) const
check if argument is inside range [0,sz-1]
Definition: IntPtrWrapper.h:99
MPI_Channel is a sub-class of channel.
Definition: MPI_Channel.h:69
std::vector< int > id_to_std_vector(const IntPtrWrapper &)
Convierte el vector en un std::vector<double>.
Definition: IntPtrWrapper.cc:307
Definition: IntPtrWrapper.h:38
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
DP_Socket is a sub-class of channel.
Definition: UDP_Socket.h:76