Commit Graph

64 Commits

Author SHA1 Message Date
Marty Kraimer cb15a8676b remove PVData methods that change introspection interface
remove deprecated methods
move CreateRequest from pvAccessCPP to pvDataCPP
move pvCopy from pvDatabaseCPP to pvDataCPP
2014-04-01 09:35:29 -04:00
Matej Sekoranja 301038664e win32 port: visibility, warnings, templates 2013-11-27 01:11:12 +01:00
Matej Sekoranja a574dbf89b start of Win32 port 2013-11-20 13:04:28 +01:00
Matej Sekoranja 1aff2ec112 tempalte helpers; static initialization order 2013-11-08 13:50:54 +01:00
Matej Sekoranja d40c41048d PVUnion/PVUnionArray support and tests 2013-11-07 14:12:26 +01:00
Michael Davidsaver 8fd9bf10e5 update pvD array implementation 2013-07-25 17:30:18 -04:00
Michael Davidsaver 6900d4bbec make boolean type unambiguous
"char", "signed char", and "unsigned char"
are distinct types.  Define "boolean" to
be whichever is not "int8" or "uint8".
2013-07-08 09:58:37 -04:00
Michael Davidsaver 7f9745c8d1 Implement PVStructureArray with shared_vector
Combine as much as possible with scalar array handling.

PVStructureArray becomes PVValueArray<shared_ptr<PVStructure> >

Bulk of shared implementation moved the PVVectorStorage
which has a parametrized base to avoid using multiple inheritance.
2013-06-11 17:42:30 -04:00
Michael Davidsaver 1bf2ff430a array resize respect immutability 2013-05-23 17:51:52 -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 a6bfab2d74 replace copyScalarArray with PVScalarArray::assign 2013-04-30 18:14:04 -04:00
Michael Davidsaver 0e0ab66d45 add PVScalarArray::getAs and PVScalarArray::putFrom 2013-04-30 18:14:02 -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
Matej Sekoranja 0dd6f01ef6 direct, i.e. no-copy, de/serialization support 2013-04-12 21:54:11 +02:00
Matej Sekoranja 675243061d -Wextra compiler warnings fixed 2013-02-16 12:50:36 +01:00
Marty Kraimer 4bc7e9c8fe several minor problems found while developing pvDatabaseCPP 2012-12-12 14:59:33 -05:00
Marty Kraimer 1d3c4d1762 get rid of unnecessary copies for StringArray 2012-10-29 13:32:34 -04:00
Marty Kraimer 5ba0209f39 get rid of all static global objects 2012-10-03 08:59:23 -04:00
Marty Kraimer ced439f4c4 fix for crash in pvDataCPP testV3Channel 2012-10-02 16:01:03 -04:00
Matej Sekoranja cf44ec1191 scalar array (de)serialization fixed 2012-10-01 21:47:43 +02:00
Marty Kraimer a23631a8ca fix bug related to PVStructurePtr createPVStructure(
StringArray const & fieldNames,PVFieldPtrArray const & pvFields);
The old implementation created a new version of each element of pvField.
The new version uses the version from pvFields.
There is a new shared pointer but the new shared pointer referenced the
same PVField as the original.
2012-09-28 06:33:39 -04:00
Unknown 55df2e06e2 compatibility with vxWorks 2012-09-05 14:11:07 +02:00
Matej Sekoranja cfc9ebefb0 merge 2012-09-03 23:46:06 +02:00
Matej Sekoranja 516518529c VxWorks ports from Dirk 2012-09-03 23:43:26 +02:00
Marty Kraimer 5e3311a024 LICENSE, COPYRIGHT, file header 2012-08-22 14:39:19 -04:00
Marty Kraimer 9061e8f731 better implementation of setCapacity 2012-08-20 07:13:05 -04:00
Matej Sekoranja 0e48497cd4 array deserialization fixed 2012-08-20 09:01:51 +02:00
Marty Kraimer 66fb300873 documentation updated; changes for Field::ID 2012-08-17 06:45:20 -04:00
Marty Kraimer 126fe9c711 use const where appropriate 2012-05-22 11:51:53 -04:00
Marty Kraimer e9b0dcd9f4 lots of work on Scalar Arrays 2012-05-21 10:06:28 -04:00
Matej Sekoranja 8040ad5fc7 serialization test, shared-ptr const 2012-05-18 11:42:57 +02:00
Marty Kraimer 87bff33c30 support unsigned; move fieldName; pvData use shared_pointer everywhere 2012-05-08 09:29:30 -04: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 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
Marty Kraimer 3a00b879ee Added a new method to PVDataCreate that allows a PVStructure to be created from a PVField array where the elements have a null parent.
PVField::message was changed to pass the message to the top level field adding the field name at each level.
2011-04-15 14:21:55 -04:00
Matej Sekoranja 6357722bb1 PVString now extends Serializable array, serialization/deserialization template of all scalars fixed 2011-03-03 09:39:43 +01:00
Marty Kraimer 6d3ef2f5b6 use & instead of * in misc.
Simplify lock.h
2011-02-18 08:17:17 -05:00
Matej Sekoranja b0c04eea53 Status changes 2011-02-17 01:21:16 +01:00
Marty Kraimer 54782139c7 simplified definition and implementation of PVAuxInfo. 2011-02-10 07:46:38 -05:00
Michael Davidsaver 89f5e27577 not everything is boolean
Use correct calls to (de)serialize POD types
2011-02-09 21:07:52 -05:00
Michael Davidsaver 08d99f2da2 Revert "specialized serialization for all (not nice)" 2011-02-09 21:07:52 -05:00
Matej Sekoranja 355f43fb97 capacity fix 2011-02-09 23:06:20 +01:00
Matej Sekoranja 62b285e79d specialized serialization for all (not nice) 2011-02-09 22:05:09 +01:00
Michael Davidsaver 890c72bad4 factory: templates for BasePV*Array implementations 2011-02-08 13:28:03 -05:00
Michael Davidsaver 3dae9f8728 factory: templates for BasePV* implementations 2011-02-08 13:28:03 -05:00
Marty Kraimer 52ee919845 Massive name changes to factory.
The changes make it clear what is a default implementation and
what implements base classes defined in pvData.h.
2011-02-01 05:31:55 -05:00
Marty Kraimer 608d74c400 Fix many memory leaks 2011-01-12 10:28:00 -05:00