Commit Graph

118 Commits

Author SHA1 Message Date
Michael Davidsaver b5b6ae100d update pvD array in tests 2013-07-25 17:30:33 -04:00
Michael Davidsaver 569bd3b681 update testSharedVector 2013-07-25 17:02:08 -04:00
Michael Davidsaver 70ae281f45 test freeze/thaw 2013-07-16 18:59:04 -04:00
Michael Davidsaver 2e3cbed520 restart testConvert
start with fromStringArray
2013-07-16 10:47:11 -04:00
Michael Davidsaver cff59487ae shared_vector freeze and thaw 2013-07-09 18:24:51 -04:00
Michael Davidsaver cdcbfe7378 update testPVScalarArray 2013-07-09 18:24:51 -04:00
Michael Davidsaver 46feb86a99 test shared_vector_convert 2013-07-09 18:24:41 -04:00
Michael Davidsaver d319e2ed7b add ScalarTypeID template
Define a compile time mapping from
type to ScalarType enum value.
2013-07-09 11:19:46 -04:00
Michael Davidsaver cf8c6718dd test PVStructureArray in testSerialization 2013-06-11 17:42:30 -04:00
Michael Davidsaver b0c8249562 re-write testPVStructureArray 2013-06-11 17:42:30 -04:00
Michael Davidsaver 8cb0b1a7d6 use new PVStructureArray api 2013-06-11 17:42:30 -04:00
Michael Davidsaver 4e749cc8be Improve shared_vector::push_back
push_back now allocates additional space
in powers of 2 up to 1k elements, then
in blocks of 1k elements.
2013-06-11 17:42:30 -04:00
Michael Davidsaver be4738f59c remove weak_vector
It seems that shared_ptr::use_count() does
not include weak_ptr instances.  Therefore
shared_ptr::use_count()==1 (aka unique())
does *not* ensure exclusive ownership!

This breaks the assumption used by
shared_vector::make_unique() to avoid
allocating a new array in some cases.
2013-06-10 15:09:42 -04:00
Michael Davidsaver 0b89f08d09 explicit copy and assignment for shared_vector
Add explicit copy constructor and
assignment operator for shared_vector.
2013-06-10 12:09:29 -04:00
Michael Davidsaver ac53153bea shared_vector: test reference and const_reference
Ensure that these typedefs are present and work
for 'T' and 'const T'.
2013-06-05 16:15:49 -04:00
Michael Davidsaver bc3187a3f6 optimize shared_vector for storing non-POD types
pass values by reference where appropriate.
When reallocating arrays of shared_ptr
"move" with swap() instead of operator=
to avoid ref counter inc and dec for each
element.
2013-06-03 19:31:05 -04:00
Michael Davidsaver 4294710d9e make viewUnsafe protected
No longer part of the public API of PVValueArray
2013-06-03 19:31:05 -04:00
Michael Davidsaver 3b6268a4fc add const_iterator to shared_vector 2013-05-31 09:58:52 -04:00
Michael Davidsaver 41425b3fa1 more testIntrospect 2013-05-31 09:58:52 -04:00
Michael Davidsaver 9039a10c9a update testIntrospect with epicsUnitTest 2013-05-24 18:28:54 -04:00
Michael Davidsaver 629c8346d2 postPut in new array API
Call when appropriate (putFrom(), copyIn(), and replace()).
Not called by swap(), take(), reuse(), or shareData().
Users of the second set of methods are expected to call
one of the methods in the first set, or call postPut() directly.

Document when postPut is (not) called.
2013-05-23 17:51:52 -04:00
Michael Davidsaver 572c02bf6e update testOperators 2013-05-08 18:35:51 -04:00
Michael Davidsaver 80777b293f rewrite testPVScalarArray 2013-05-08 18:35:51 -04:00
Michael Davidsaver 3c08834377 update testSerialization 2013-05-08 18:35:51 -04:00
Michael Davidsaver eeae12e3d4 Convert: remove to/from*Array 2013-05-08 18:35:51 -04:00
Michael Davidsaver 992ac73068 use new API
make copying explicit and replace some
use of PVValueArray<T>::put and get
2013-05-08 18:35:51 -04:00
Michael Davidsaver b137b32fc6 test shared_vector<T>
use epicsUnitTest
test handling of void and const void instances
2013-05-08 18:35:50 -04:00
Michael Davidsaver d75656dad7 testTypeCast use epicsUnitTest 2013-05-01 12:41:19 -04:00
Michael Davidsaver a6bfab2d74 replace copyScalarArray with PVScalarArray::assign 2013-04-30 18:14:04 -04:00
Michael Davidsaver 2f8c434429 add castUnsafeV
non-template version of castUnsafe<TO>(FROM v)).
2013-04-22 11:59:20 -04:00
Michael Davidsaver b0c57e7ae3 test castUnsafe w/ transform() 2013-04-22 11:59:20 -04:00
Michael Davidsaver 0e57391b4d vxWorks compatibility 2013-04-22 11:59:20 -04:00
Michael Davidsaver d7eada7216 type casting with castUnsafe<TO>(FROM val) 2013-04-15 14:39:42 -04:00
Michael Davidsaver c435f71592 testOperators: avoid warning 2013-04-15 14:34:45 -04:00
Matej Sekoranja 0dd6f01ef6 direct, i.e. no-copy, de/serialization support 2013-04-12 21:54:11 +02:00
Matej Sekoranja 67afe84593 mb moved to pvCommonCPP 2013-02-25 10:29:34 +01:00
zimoch 5e810c704f Missing library reference in Makefile 2013-02-21 15:50:57 +01:00
Matej Sekoranja 675243061d -Wextra compiler warnings fixed 2013-02-16 12:50:36 +01:00
Matej Sekoranja aa1a67d6c1 added micro-benchmark 2013-02-13 14:18:42 +01:00
Matej Sekoranja 97b1848ba3 added array_at manip test 2013-02-11 10:30:30 +01:00
Matej Sekoranja c4f6132aca added simple operators 'test', added <<= >>= operators to PVScalar 2013-02-08 22:45:04 +01:00
Marty Kraimer 1d3c4d1762 get rid of unnecessary copies for StringArray 2012-10-29 13:32:34 -04:00
Marty Kraimer d627e08419 fix bug in PVStructure::appendPVField and PVStructure::appendPVFields 2012-10-11 06:19:08 -04:00
Unknown 6a378dae0d removed sprintf format warnings 2012-09-14 13:54:35 +02:00
Unknown 55df2e06e2 compatibility with vxWorks 2012-09-05 14:11:07 +02:00
Marty Kraimer 6b4eb1a1b0 StandardField: fix enumeratedAlarm ; testConvert fix uint64 integer constants 2012-08-28 13:09:37 -04:00
Marty Kraimer 5e3311a024 LICENSE, COPYRIGHT, file header 2012-08-22 14:39:19 -04:00
Marty Kraimer fbfed5bab1 make tests more like regresion tests 2012-08-17 14:13:18 -04:00
Marty Kraimer 66fb300873 documentation updated; changes for Field::ID 2012-08-17 06:45:20 -04:00
Matej Sekoranja ac10b73e69 Field::getID() added 2012-07-31 10:30:50 +02:00