From 29dee42d349fde1d70b531b889ad8a9ce011c394 Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Tue, 26 Nov 2013 13:45:30 +0100 Subject: [PATCH] FieldBuilder: typo addNested() -> endNested() --- pvDataApp/factory/FieldCreateFactory.cpp | 2 +- pvDataApp/pv/pvIntrospect.h | 18 +++++++++--------- testApp/misc/testSerialization.cpp | 4 ++-- testApp/pv/testFieldBuilder.cpp | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pvDataApp/factory/FieldCreateFactory.cpp b/pvDataApp/factory/FieldCreateFactory.cpp index 547a80a..1fda3b4 100644 --- a/pvDataApp/factory/FieldCreateFactory.cpp +++ b/pvDataApp/factory/FieldCreateFactory.cpp @@ -740,7 +740,7 @@ FieldBuilderPtr FieldBuilder::addNestedUnionArray(std::string const & name) return FieldBuilderPtr(new FieldBuilder(shared_from_this(), name, union_, true)); } -FieldBuilderPtr FieldBuilder::addNested() +FieldBuilderPtr FieldBuilder::endNested() { if (!parentBuilder.get()) throw std::runtime_error("this method can only be called to create nested fields"); diff --git a/pvDataApp/pv/pvIntrospect.h b/pvDataApp/pv/pvIntrospect.h index 78aee54..f85d57d 100644 --- a/pvDataApp/pv/pvIntrospect.h +++ b/pvDataApp/pv/pvIntrospect.h @@ -711,41 +711,41 @@ public: /** * Add new nested {@code Structure}. - * {@code addNested()} method must be called + * {@code endNested()} method must be called * to complete creation of the nested {@code Structure}. * @param name nested structure name. * @return a new instance of a {@code FieldBuilder} is returned. - * @see #addNested() + * @see #endNested() */ FieldBuilderPtr addNestedStructure(std::string const & name); /** * Add new nested {@code Union}. - * {@code addNested()} method must be called + * {@code endNested()} method must be called * to complete creation of the nested {@code Union}. * @param name nested union name. * @return a new instance of a {@code FieldBuilder} is returned. - * @see #addNested() + * @see #endNested() */ FieldBuilderPtr addNestedUnion(std::string const & name); /** * Add new nested {@code Structure[]}. - * {@code addNested()} method must be called + * {@code endNested()} method must be called * to complete creation of the nested {@code Structure}. * @param name nested structure name. * @return a new instance of a {@code FieldBuilder} is returned. - * @see #addNested() + * @see #endNested() */ FieldBuilderPtr addNestedStructureArray(std::string const & name); /** * Add new nested {@code Union[]}. - * {@code addNested()} method must be called + * {@code endNested()} method must be called * to complete creation of the nested {@code Union}. * @param name nested union name. * @return a new instance of a {@code FieldBuilder} is returned. - * @see #addNested() + * @see #endNested() */ FieldBuilderPtr addNestedUnionArray(std::string const & name); @@ -755,7 +755,7 @@ public: * @see #addNestedUnion(String) * @return a previous (parent) {@code FieldBuilder}. */ - FieldBuilderPtr addNested(); + FieldBuilderPtr endNested(); private: FieldBuilder(); diff --git a/testApp/misc/testSerialization.cpp b/testApp/misc/testSerialization.cpp index 2b6a885..59457b6 100644 --- a/testApp/misc/testSerialization.cpp +++ b/testApp/misc/testSerialization.cpp @@ -196,7 +196,7 @@ void testEquals() { setId("nestedId")-> add("short", pvShort)-> add("long", pvLong)-> - addNested()-> + endNested()-> addArray("intArray", pvInt)-> createUnion(); PVUnionPtr union1 = factory->createPVUnion(punion); @@ -690,7 +690,7 @@ void testIntrospectionSerialization() setId("nestedId")-> add("short", pvShort)-> add("long", pvLong)-> - addNested()-> + endNested()-> addArray("intArray", pvInt)-> createUnion(); serializatioTest(punion); diff --git a/testApp/pv/testFieldBuilder.cpp b/testApp/pv/testFieldBuilder.cpp index bd290c5..ab5a765 100644 --- a/testApp/pv/testFieldBuilder.cpp +++ b/testApp/pv/testFieldBuilder.cpp @@ -86,12 +86,12 @@ void test_invalid() { fieldCreate->createFieldBuilder()-> add("f1", pvByte)-> - addNested(); - testFail("addNested() allowed in non-nested FieldBuilder"); + endNested(); + testFail("endNested() allowed in non-nested FieldBuilder"); } catch (std::runtime_error& re) { // ok - testPass("addNested() disallowed in non-nested FieldBuilder"); + testPass("endNested() disallowed in non-nested FieldBuilder"); } try @@ -123,7 +123,7 @@ void test_nestedStructure() setId(NESTED_ID)-> add("short", pvShort)-> add("long", pvLong)-> - addNested()-> + endNested()-> addArray("intArray", pvInt)-> createStructure(); testOk1(s.get() != 0); @@ -179,7 +179,7 @@ void test_nestedStructureArray() setId(NESTED_ID)-> add("short", pvShort)-> add("long", pvLong)-> - addNested()-> + endNested()-> addArray("intArray", pvInt)-> createStructure(); testOk1(s.get() != 0);