Commit Graph

58 Commits

Author SHA1 Message Date
Michael Davidsaver
cf8c6718dd test PVStructureArray in testSerialization 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
3b6268a4fc add const_iterator to shared_vector 2013-05-31 09:58:52 -04:00
Michael Davidsaver
3c08834377 update testSerialization 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
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
Matej Sekoranja
0dd6f01ef6 direct, i.e. no-copy, de/serialization support 2013-04-12 21:54:11 +02:00
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
Unknown
6a378dae0d removed sprintf format warnings 2012-09-14 13:54:35 +02: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
Matej Sekoranja
ac10b73e69 Field::getID() added 2012-07-31 10:30:50 +02:00
Marty Kraimer
022e6304a3 call epicsExitCallAtExits() 2012-07-17 09:40:41 -04:00
Marty Kraimer
5dcd864c58 more shared_pointer everywhere 2012-07-17 09:23:53 -04:00
Matej Sekoranja
3991a51fd6 size_t changes 2012-06-07 14:15:12 +02:00
Matej Sekoranja
90960d370d added unsigned ints to the test 2012-05-23 08:08:00 +02:00
Matej Sekoranja
8040ad5fc7 serialization test, shared-ptr const 2012-05-18 11:42:57 +02:00
Marty Kraimer
198eb453be add testConvert 2012-05-17 16:04:49 -04:00
Marty Kraimer
e6a97e83ab fix more bugs 2012-05-17 09:15:19 -04:00
Marty Kraimer
d320f00e96 fix messageType name 2012-05-10 06:28:27 -04:00
Marty Kraimer
7a60e02d5c make methods non inline 2012-05-09 15:38:19 -04:00
Marty Kraimer
fb453ea9e5 working on queue code 2012-05-09 14:06:17 -04:00
Marty Kraimer
87bff33c30 support unsigned; move fieldName; pvData use shared_pointer everywhere 2012-05-08 09:29:30 -04:00
Matej Sekoranja
6caa725f5a Field serialization moved to pvData 2012-03-27 10:32:37 +02:00
Matej Sekoranja
ed0e8d0782 alignData/Buffer methods 2011-09-21 22:27:53 +02:00
jrowlandls
90bc9dbfac merged 2011-09-16 09:06:37 +01:00
jrowlandls
1abdde0c3d fixes for windows xp sp3 sdk 7.1, typedefs for non-portable types, removed variable-length stack allocated arrays in tests, fixed inconsistent timeFunction interface declaraion, replaced variable-length stack allocated array in with std::vector in PVStructure factory as it is followed immediately by further heap allocation 2011-09-16 09:04:00 +01:00
Matej Sekoranja
9c56b0604e added byteorder util 2011-09-15 20:11:13 +02:00
Matej Sekoranja
c762d94f7a new ByteBuffer and faster/fixed array serialization support 2011-09-08 10:59:56 +02:00
Marty Kraimer
619534b984 include files put into include/pv 2011-06-07 08:30:15 -04:00
Marty Kraimer
95ae684d3d add == for introspection; == of PVField is done in base class via convert.
Make monitorQueue compatible with monitor, i.e. shared_pointer
2011-04-27 08:27:10 -04:00
Marty Kraimer
fc74317993 use Michael Davidsaver version of introspection 2011-04-21 15:21:18 -04:00
Michael Davidsaver
4c88ef8e99 switch to epicsThread
Create a thin wrapper to account for the current interface and behavior
differences.
2011-03-07 12:23:51 -05:00
Michael Davidsaver
0c61ac0833 stack traces with any exception class
Define THROW_EXCEPTION(E) which takes an exception class instance,
and uses it to construct an instance of a class which is a subclass
of E and ExceptionMixin.  The original instance is discarded, and
the newly constructed sub-class is thrown.  Equivalent to
"throw E;".

Define THROW_EXCEPTION2(ETYPE,MSG) which takes an exception class
type, and argument.  Directly constructs a ExceptionMixin sub-class
with the given message argument.  Equivalent to
"throw ETYPE(MSG);".

Define PRINT_EXCEPTION2(E, FP) If E is a instance of a sub-class of
ExceptionMixin then write information to FP (FILE*).

Define SHOW_EXCEPTION(E) If E is a instance of a sub-class of
ExceptionMixin then return a std::string with information.
2011-03-07 12:23:51 -05:00
Matej Sekoranja
9fd158df1f string serialization optimization 2011-03-04 12:13:57 +01:00
Marty Kraimer
6d3ef2f5b6 use & instead of * in misc.
Simplify lock.h
2011-02-18 08:17:17 -05:00
Michael Davidsaver
277c71c7de add remaining tests to testAll 2011-02-09 21:08:45 -05:00
Michael Davidsaver
fc932f1ad2 add testSerialization to testAll 2011-02-09 21:08:23 -05:00
Matej Sekoranja
355f43fb97 capacity fix 2011-02-09 23:06:20 +01:00
Michael Davidsaver
25af62a096 warning: minimum values
Compiler is parsing this const expression as
-(2147483648) and 2147483648 is too large.
Workaround is to use -(2147483647) - (1)
2011-02-08 13:28:03 -05:00
Michael Davidsaver
8adb8b7766 rename showConstructDestruct.h to CDRMonitor.h 2011-02-02 10:11:07 -05:00