From 6cb95c5cfca47fee098f482f77ddd18f62dc17b3 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Wed, 11 Feb 2015 07:26:04 -0500 Subject: [PATCH] fixed possible SEGFAULT in ceateRequest; new stream operator for Field and PVField --- documentation/RELEASE_NOTES.html | 45 +++++++++++++++++++++-- documentation/RELEASE_NOTES.md | 56 ++++++++++++++++++++++++++++- src/copy/createRequest.cpp | 2 ++ src/factory/FieldCreateFactory.cpp | 9 +++++ src/factory/PVDataCreateFactory.cpp | 9 +++++ src/pv/pvData.h | 8 +++++ src/pv/pvIntrospect.h | 8 +++++ testApp/copy/testCreateRequest.cpp | 42 +++++++++++++--------- testApp/pv/testStandardField.cpp | 2 +- testApp/pv/testStandardPVField.cpp | 2 +- 10 files changed, 161 insertions(+), 22 deletions(-) diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 70a2f0f..a4d6997 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -1,4 +1,45 @@ -

Release 4.0 IN DEVELOPMENT

+

Release 4.1 IN DEVELOPMENT

+

The main changes since release 4.0 are:

+ +

Convert::copyUnion

+

Before this method, depending on types for to and from, +sometimes did a shallow cppy, i. e. just made to shared_ptr for to +share the same data as from. +Now it always copies between the subfield of to and from.

+

CreateRequest change

+

createRequest could cause a SEGFAULT if passed a bad argument. +This has been changed so the it returns a null pvStructure +and provies an error.

+

New stream operators

+

New steam operators are available for Field and PVField. +Before to print a Field (or any extension) or a PVField (or any extension) +it was necessary to have code like:

+
 void print(StructureConstPtr struct, PVStructurePtr pv)
+ {
+     if(struct) {
+         cout << *struct << endl;
+     } else {
+         cout << "nullptr\n"
+     }
+     if(pv) {
+         cout << *.struct << endl;
+     } else {
+         cout << "nullptr\n"
+     }
+ }
+
+

Now it can be done as follows:

+
 void print(StructureConstPtr struct, PVStructurePtr pv)
+ {
+     cout << struct << endl;
+     cout << pv << endl;
+ }
+
+

Release 4.0

The main changes since release 3.0.2 are: