Michael Davidsaver
54ee8bf7a0
PVStructureArray: setLength before postPut
...
Ensure that the correct (new) length is seen.
2013-05-23 17:51:52 -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
1bf2ff430a
array resize respect immutability
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
e843779555
New array API for PVValueArray using shared_vector<T>
...
* In PVScalarArray
Add methods assign, getAs/putFrom, and copyOut/copyIn to allow get/put
with implicit convert.
assign() copys on PVScalarArray to another converting as necessary.
If the types do not match then an allocate and convert is done.
getAs/putFrom work with shared_vector<T> and can avoid a allocate
and convert operation if the types match.
copyOut/copyIn use plain C arrays will do either a copy if the types
match, and a convert otherwise. No allocation is performed.
* In PVValueArray<T>
All array operations re-implemented in terms of
two virtual methods
virtual const shared_vector<T>& viewUnsafe() const;
virtual void swap(shared_vector<T>&);
Some convienence methods are also included:
shared_vector<const T> view() const
shared_vector<T> take()
shared_vector<T> reuse()
Deprecate get(...), put(...), and shareData(...)
Remove getVector() and getSharedVector()
Adjust DefaultPVArray accordingly
2013-05-08 18:35:51 -04:00
Michael Davidsaver
5f4ca240b4
add ScalarTypeFunc::elementSize
2013-05-08 18:35:50 -04:00
Michael Davidsaver
79cd374f16
add ScalarTypeFunc::allocArray
2013-05-08 18:35:50 -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
3cd2bfdef0
shared_vector implementation
...
Shared ownership of a single C array.
Tracks offset and length for each instance
allowing each owner to "view" a different
piece of the array.
Parts of shared_vector<T> which can work
for T=void are in shared_vector_base<T>.
Specializations shared_vector<void>
and shared_vector<const void> handle
un-typed arrays.
Allow casting to/from typed vector
Offsets and sizes of untyped vectors are tracked in
bytes. Therefore casting to types where sizeof(T)>1
is undefined if the offset is not a multiple of
sizeof(T).
2013-05-08 18:21:34 -04:00
Michael Davidsaver
461dbdf0f8
remove Convert pointer from PVField
...
Allow inline construction of Convert
2013-05-08 17:46:31 -04:00
Michael Davidsaver
9e8a6b6304
fix const-ness in PVField compare
2013-05-08 17:46:31 -04:00
Michael Davidsaver
fd5ea89340
typo
2013-05-01 14:27:00 -04:00
Michael Davidsaver
1d1d2b31cd
remove remaining state from Convert
2013-05-01 14:20:01 -04:00
Michael Davidsaver
d75656dad7
testTypeCast use epicsUnitTest
2013-05-01 12:41:19 -04:00
Michael Davidsaver
f0aa2fe0e0
fix printer
...
Don't overflow the stack for deep structures!
2013-05-01 12:18:21 -04:00
Michael Davidsaver
ae847aea2b
allow putFrom to implicitly resize
2013-05-01 12:18:21 -04:00
Michael Davidsaver
00ac5bf64f
PVStructure::getNumberFields != Structure::getNumberFields
...
Apparently PVStructure::getNumberFields is one indexed???
2013-05-01 12:18:21 -04:00
Michael Davidsaver
61e8024c65
fix mapping between int* and epicsInt* types
2013-04-30 18:14:05 -04:00
Michael Davidsaver
ee5a370c01
misc
2013-04-30 18:14:05 -04:00
Michael Davidsaver
659ce13e98
replace vector to/from in Convert
2013-04-30 18:14:04 -04:00
Michael Davidsaver
a7fde21300
replace scalar to/from in Convert
2013-04-30 18:14:04 -04:00
Michael Davidsaver
a6bfab2d74
replace copyScalarArray with PVScalarArray::assign
2013-04-30 18:14:04 -04:00
Michael Davidsaver
e948af1851
PVScalar::assign and PVScalarArray::assign
2013-04-30 18:14:04 -04:00
Michael Davidsaver
2062cc5d10
Convert::toStringArray with castUnsafe
2013-04-30 18:14:02 -04:00
Michael Davidsaver
e85d10c6d9
Convert::fromStringArray with castUnsafe
2013-04-30 18:14:02 -04:00
Michael Davidsaver
0e0ab66d45
add PVScalarArray::getAs and PVScalarArray::putFrom
2013-04-30 18:14:02 -04:00
Michael Davidsaver
f2635c7fdc
Convert::fromString with castUnsafe
2013-04-30 18:14:02 -04:00
Michael Davidsaver
4d92bbe541
Use PrinterPlain in Convert
2013-04-30 18:14:01 -04:00
Michael Davidsaver
e6e1434fc1
Add PrinterPlain
2013-04-30 18:13:32 -04:00
Michael Davidsaver
5e689f94f4
add PVScalar::getAs and PVScalar::putFrom
...
Allow get/put to a scalar without knowledge of ScalarType
Currently won't work correctly for PVBoolean
2013-04-26 15:44:05 -04:00
Michael Davidsaver
c1b6d26b8e
Convert::equals: move to operator==(PVField&,PVField&)
2013-04-22 16:12:03 -04:00
Michael Davidsaver
f72c5dba84
PVStructure compare typo
2013-04-22 15:47:51 -04:00
Michael Davidsaver
704007092c
Convert::getFullName becomes PVField::getFullName
...
Compatibility wrapper using current Convert API
Allow PVField::getFieldName to be inline'd
Avoid multiple resize and copy operations
on result String.
2013-04-22 14:48:59 -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
7ff1a93e72
parseToPOD: fix 64-bit
...
Try again to detect if uint16_t is long or long long.
2013-04-18 13:54:04 -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
cd95b75563
gcc 4.7+ compiler warnings removed
2013-02-27 11:44:00 +01:00
Ralph Lange
4122e772c1
merge SF changes
2013-02-26 17:22:16 +01:00
Ralph Lange
2fbe99909c
documentation: update Doxyfile
2013-02-26 17:21:28 +01:00
Ralph Lange
d4f3d6209c
jenkins: fix URLs for dependencies
2013-02-26 17:20:52 +01:00
Ralph Lange
641a51aa4f
Fix .hgignore to use patterns
2013-02-26 17:20:28 +01:00
Matej Sekoranja
67afe84593
mb moved to pvCommonCPP
2013-02-25 10:29:34 +01:00