14 #define epicsExportSharedSymbols 22 namespace epics {
namespace pvData {
29 data.resize(data.size()+number);
35 *it = pvDataCreate->createPVUnion(punion);
37 size_t newLength = data.size();
56 size_t length = vec.size();
58 for(
size_t i = offset;
i+number < length;
i++) {
59 vec[
i].swap(vec[
i + number]);
62 vec.resize(length - number);
75 size_t length = vec.
size();
78 for(
size_t i=0;
i<length;
i++) {
85 for(
size_t j=i+1;j<length;j++) {
92 vec[
i] = vec[notNull];
114 value = freeze(mvalue);
128 if (length == value.
size())
133 if (length < value.
size()) {
134 value.
slice(0, length);
138 value = freeze(mvalue);
163 this->
getArray()->getMaximumCapacity() :
172 for(
size_t i = 0;
i<size;
i++) {
174 size_t temp = pbuffer->
getByte();
179 if(data[
i].
get()==
NULL || !data[
i].unique()) {
180 data[
i] = pvDataCreate->createPVUnion(punion);
182 data[
i]->deserialize(pbuffer, pcontrol);
192 temp.
slice(offset, count);
197 else if (count != array->getMaximumCapacity())
198 throw std::length_error(
"fixed array cannot be partially serialized");
200 for(
size_t i = 0;
i<count;
i++) {
204 if(temp[
i].
get()==
NULL) {
209 temp[
i]->serialize(pbuffer, pflusher);
222 for (
size_t i = 0;
i < length;
i++)
232 if (index<temp.
size())
245 throw std::invalid_argument(
"destination is immutable");
248 throw std::invalid_argument(
"unionArray definitions do not match");
const std::string & getFieldName() const
void resize(size_t i)
Grow or shrink array.
virtual const_svector view() const OVERRIDE FINAL
Fetch a read-only view of the current array data.
Data class for a unionArray.
void copyUnchecked(const PVUnionArray &from)
::epics::pvData::shared_vector< T > svector
virtual void serialize(ByteBuffer *pbuffer, SerializableControl *pflusher) const OVERRIDE FINAL
A holder for a contiguous piece of memory.
EPICS_ALWAYS_INLINE int8 getByte()
#define THROW_EXCEPTION2(TYPE, MSG)
virtual void setCapacity(size_t capacity) OVERRIDE FINAL
virtual void serialize(ByteBuffer *pbuffer, SerializableControl *pflusher) const OVERRIDE FINAL
shared_ptr< T > static_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
std::tr1::shared_ptr< const Array > ArrayConstPtr
void checkLength(size_t length) const
std::size_t append(std::size_t number)
TODO only here because of the Lockable.
static void writeSize(std::size_t s, ByteBuffer *buffer, SerializableControl *flusher)
static std::size_t readSize(ByteBuffer *buffer, DeserializableControl *control)
Callback class for deserialization.
std::tr1::shared_ptr< PVDataCreate > PVDataCreatePtr
virtual void replace(const const_svector &next) OVERRIDE FINAL
std::tr1::shared_ptr< const Union > UnionConstPtr
virtual std::ostream & dumpValue(std::ostream &o) const OVERRIDE FINAL
virtual void setLength(std::size_t length) OVERRIDE FINAL
virtual void flushSerializeBuffer()=0
virtual std::ostream & dumpValue(std::ostream &o) const OVERRIDE FINAL
virtual void swap(const_svector &other) OVERRIDE
void copy(const PVUnionArray &from)
virtual ArrayConstPtr getArray() const OVERRIDE FINAL
EPICS_ALWAYS_INLINE void putByte(int8 value)
This class implements a Bytebuffer that is like the java.nio.ByteBuffer.
virtual void swap(const_svector &other) OVERRIDE FINAL
std::size_t getRemaining() const
std::reverse_iterator< iterator > reverse_iterator
size_t size() const
Number of elements visible through this vector.
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *pflusher) OVERRIDE FINAL
bool remove(std::size_t offset, std::size_t number)
bool isCapacityMutable() const
virtual size_t getLength() const OVERRIDE FINAL
Callback class for serialization.
void slice(size_t offset, size_t length=(size_t)-1)
Reduce the view of this shared_vector.
virtual const_svector view() const OVERRIDE
Fetch a read-only view of the current array data.
virtual void ensureData(std::size_t size)=0
UnionArrayConstPtr getUnionArray() const
void reserve(size_t i)
Set array capacity.
void copyUnchecked(const PVScalarArray &from)
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()
::epics::pvData::shared_vector< const T > const_svector