summaryrefslogtreecommitdiff
path: root/cppe/test/IceE/custom/MyByteSeq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/test/IceE/custom/MyByteSeq.cpp')
-rw-r--r--cppe/test/IceE/custom/MyByteSeq.cpp104
1 files changed, 0 insertions, 104 deletions
diff --git a/cppe/test/IceE/custom/MyByteSeq.cpp b/cppe/test/IceE/custom/MyByteSeq.cpp
deleted file mode 100644
index 9df5e556182..00000000000
--- a/cppe/test/IceE/custom/MyByteSeq.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice-E is licensed to you under the terms described in the
-// ICEE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#include <MyByteSeq.h>
-#include <cstdlib>
-
-MyByteSeq::MyByteSeq()
- : _size(0),
- _data(0)
-{
-}
-
-MyByteSeq::MyByteSeq(size_t size)
- : _size(size),
- _data(0)
-{
- if(_size != 0)
- {
- _data = (Ice::Byte*)malloc(_size);
- }
-}
-
-MyByteSeq::MyByteSeq(const MyByteSeq& seq)
-{
- _size = seq._size;
- if(_size != 0)
- {
- _data = (Ice::Byte*)malloc(_size);
- memcpy(_data, seq._data, _size);
- }
- else
- {
- _data = 0;
- }
-}
-
-MyByteSeq::~MyByteSeq()
-{
- if(_data != 0)
- {
- free(_data);
- }
-}
-
-size_t
-MyByteSeq::size() const
-{
- return _size;
-}
-
-void
-MyByteSeq::swap(MyByteSeq& seq)
-{
- size_t tmpSize = seq._size;
- Ice::Byte* tmpData = seq._data;
- seq._size = _size;
- seq._data = _data;
- _size = tmpSize;
- _data = tmpData;
-}
-
-MyByteSeq::const_iterator
-MyByteSeq::begin() const
-{
- return _data;
-}
-
-MyByteSeq::const_iterator
-MyByteSeq::end() const
-{
- return _data + _size;
-}
-
-void
-MyByteSeq::operator=(const MyByteSeq& rhs)
-{
- if(_data != 0)
- {
- free(_data);
- _data = 0;
- }
- _size = rhs._size;
- if(_size != 0)
- {
- _data = (Ice::Byte*)malloc(_size);
- memcpy(_data, rhs._data, _size);
- }
-}
-
-bool
-MyByteSeq::operator==(const MyByteSeq& rhs) const
-{
- if(_size != rhs._size)
- {
- return _size == rhs._size;
- }
- return memcmp(_data, rhs._data, _size) == 0;
-}