blockingTCP.h: added TransportRegistry, removed "using namespace"

BlockingTCPTransport: added TransportRegistry, using osiSock.h functions wherever possible
blockingUDP.h: removed "using namespace"
blockingUDPConnector.cpp: using osiSock.h functions wherever possible
blockingUDPTransport: using osiSock.h functions wherever possible, delete -> delete[]
remote.h: removed "using namespace"
arrayFIFO.h: fixed default ctor, delete -> delete[]
growingCircularBuffer.h: delete -> delete[]
testBlockingUDPClnt.cpp: using osiSock.h functions wherever possible
testBlockingUDPCSrv.cpp: using osiSock.h functions wherever possible
This commit is contained in:
miha_vitorovic
2011-01-03 14:30:38 +01:00
parent 95148e2d50
commit b6df9a4d89
10 changed files with 54 additions and 59 deletions
+5 -17
View File
@@ -25,21 +25,15 @@ namespace epics {
template<class T>
class ArrayFIFO {
public:
/**
* Constructs an empty array deque with an initial capacity
* sufficient to hold 16 elements. Array FIFO is designed to hold
* objects allocated on the heap.
*/
ArrayFIFO();
/**
* Constructs an empty array deque with an initial capacity
* sufficient to hold the specified number of elements. Array FIFO
* is designed to hold objects allocated on the heap.
*
* @param[in] numElements lower bound on initial capacity of the deque
* @param[in] numElements lower bound on initial capacity of the
* deque. Default value is 16 elements.
*/
ArrayFIFO(size_t numElements);
ArrayFIFO(size_t numElements = 16);
~ArrayFIFO();
/**
@@ -210,7 +204,7 @@ namespace epics {
T* a = new T[newCapacity];
arraycopy(_elements, p, a, 0, r);
arraycopy(_elements, 0, a, r, p);
delete _elements;
delete[] _elements;
_elements = a;
_size = newCapacity;
_head = 0;
@@ -218,12 +212,6 @@ namespace epics {
}
template<class T>
ArrayFIFO<T>::ArrayFIFO() :
_head(0), _tail(0), _size(16), _mutex() {
_elements = new T[16];
}
template<class T>
ArrayFIFO<T>::ArrayFIFO(size_t numElements) :
_head(0), _tail(0), _mutex() {
@@ -232,7 +220,7 @@ namespace epics {
template<class T>
ArrayFIFO<T>::~ArrayFIFO() {
delete _elements;
delete[] _elements;
}
template<class T>